Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Custom positioning of the dependency libraries when publishing EAR file to the JBoss server
Custom positioning of the dependency libraries when publishing EAR file to the JBoss server [message #203892] Wed, 07 November 2007 12:49 Go to next message
Eclipse UserFriend
Originally posted by: list.inksystems.net

Hi all,

is there any way to explicitly specify where module dependency jars will
be stored in the resulting .ear file when project is published to the
server?

The problem i have is that there couple of jar files that should be
available (i.e. shared) to all modules in the ear file. The target
platform is Jboss which means that they have to be in lib directory
inside the .ear file. Application is 1.3 compliant hence there is no way
to use J2EE 5 methods of customizing location of the EAR libraries. But
when WTP publishing project (for internal run or debuging) to JBoss all
files appear in the root of the .ear file which makes them unavailable
to the EAR deployer classloader.

So, the question (as above) is can i explicitly specify where publisher
should put the jar files? I am digging into this problem for past couple
of weeks and seems like there is no easy way of doing this.

In case i am right and there is no easy way of doing this is there any
possible workaround for this. I can use ant build in order to do this
deployment to the externally configured server but it is confusing for
some developers in the team so it would be nice to have the easier
solution from the user's perspective.

Anyway, any help will be greatly appreciated.

Thanks in advance,

Igor.
Re: Custom positioning of the dependency libraries when publishing EAR file to the JBoss server [message #206022 is a reply to message #203892] Tue, 18 December 2007 16:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: list.inksystems.net

Answering to myself... May be it will be useful for the others.

Quite short patch would allow to hardcode /lib directory inside of the
..ear file as destination to the dependency libraries application is
being published by eclipse:

Index:
org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/interna l/deployables/J2EEFlexProjDeployable.java
============================================================ =======
RCS file:
/cvsroot/webtools/jeetools/plugins/org.eclipse.jst.j2ee/j2ee plugin/org/eclipse/jst/j2ee/internal/deployables/J2EEFlexPro jDeployable.java,v
retrieving revision 1.68.2.1
diff -r1.68.2.1 J2EEFlexProjDeployable.java
146c146
< if (J2EEProjectUtilities.isEARProject(component.getProject()))
---
> if (J2EEProjectUtilities.isEARProject(component.getProject())) {
148c148
< else
---
> } else {
149a150
> }
241c242
< addUtilMembers(component);
---
> addUtilMembers(component,
J2EEProjectUtilities.isDynamicWebProject(component.getProjec t()));
574c575
< addUtilMembers(consumedComponent);
---
> addUtilMembers(consumedComponent,
J2EEProjectUtilities.isDynamicWebProject(component.getProjec t()));
695c696,701
< cpRefRuntimePath = runtimePath;
---
> // JBoss should publish dependant libraries int lib directory
of the .ear file
> if (web) {
> cpRefRuntimePath = runtimePath;
> } else {
> cpRefRuntimePath = runtimePath.append("lib/");
> }
Index:
org.eclipse.jst.server.generic.core/src/org/eclipse/jst/serv er/generic/core/internal/publishers/EarModuleAssembler.java
============================================================ =======
RCS file:
/cvsroot/webtools/servertools/plugins/org.eclipse.jst.server .generic.core/src/org/eclipse/jst/server/generic/core/intern al/publishers/EarModuleAssembler.java,v
retrieving revision 1.7
diff -r1.7 EarModuleAssembler.java
95a96,97
> } else if(module.getModuleType().getId().equals("jst.utility")) {
> super.packModule(module, deploymentUnitName,
destination.append("lib/"));
Index:
org.eclipse.wst.web/static_web_project/org/eclipse/wst/web/i nternal/deployables/ComponentDeployable.java
============================================================ =======
RCS file:
/cvsroot/webtools/jeetools/plugins/org.eclipse.wst.web/stati c_web_project/org/eclipse/wst/web/internal/deployables/Compo nentDeployable.java,v
retrieving revision 1.20
diff -r1.20 ComponentDeployable.java
323c323
< public IModuleResource[] members() throws CoreException {
---
> public IModuleResource[] members(boolean web) throws CoreException {
333c333
< addUtilMembers(vc);
---
> addUtilMembers(vc, web);
345c345
< protected void addUtilMembers(IVirtualComponent vc) {
---
> protected void addUtilMembers(IVirtualComponent vc, boolean web) {
354c354,358
< addUtilMember(vc, reference, reference.getRuntimePath());
---
> if (web) {
> addUtilMember(vc, reference, reference.getRuntimePath());
> } else {
> addUtilMember(vc, reference,
reference.getRuntimePath().append("/lib"));
> }

Best regards,
Igor.

Igor Kolomiyets пишет:
> Hi all,
>
> is there any way to explicitly specify where module dependency jars will
> be stored in the resulting .ear file when project is published to the
> server?
...........
> Thanks in advance,
>
> Igor.
Re: Custom positioning of the dependency libraries when publishing EAR file to the JBoss server [message #206076 is a reply to message #206022] Thu, 20 December 2007 17:59 Go to previous message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Igor Kolomiyets wrote:
> Answering to myself... May be it will be useful for the others.
>
> Quite short patch would allow to hardcode /lib directory inside of the
> .ear file as destination to the dependency libraries application is
> being published by eclipse:

The patch would be better placed on a bug. I would recommend opening an
issue in bugzilla, for this with the patch attached to it. Otherwise,
it will get lost here.

http://bugs.eclipse.org/bugs


Dave
Previous Topic:Programmatically adding imports to jsp file
Next Topic:Error in Eclipse jsp file
Goto Forum:
  


Current Time: Fri Apr 26 21:27:57 GMT 2024

Powered by FUDForum. Page generated in 0.04167 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top