Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] .war project not copying .jar project dependency to WAS tmp folder



I have a bizarre situation that I can’t wrap my head around.


I have 4 projects that comprise a multi-module project: a parent pom, an ear, a war, and a jar.  The problem is with the jar project.


The jar project is listed as a dependency in my war’s pom.  The jar is listed correctly.  It shows up under “Resolved Dependencies” within the “Dependency Hierarchy” tab.  The bizarre part is when I publish the ear project to my WAS 6.1 test server within the IDE.  During application bootstrap/initialization, all 3rd-party .jar’s on the classpath are loaded as indicated by the console.  I get 1 error.  That 1 error indicates that the a class listed in the jar project could not be found.


I located the tmp folder where the published application resides:



My war project is listed in this tmp folder.  If I navigate down to the war project’s WEB-INF/lib folder, I find all the 3rd-party jar dependencies listed except for my jar project.  My jar project’s artifact should be in here.


If I build the project using “Run As… à Maven install” or build the project using Maven itself, the jar project’s artifact .jar is sitting inside the .war artifact upon inspection of my local repo.


As an experiment, I copied the missing .jar project artifact into the tmp folder and restarted WAS.   Sure enough, the app initialized just fine without any ClassNotFoundException’s complaining about any classes from the jar project.


The jar project is listed in my war’s org.eclipse.wst.common.component:

<dependent-module archiveName="AppJar-2.0.0-Final.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/AppJar/AppJar">




My war’s pom lists the jar project dependency as such:









Do I have something wrong with the configuration?  Is this a bug?




The information transmitted is intended only for the person(s)or entity to which it is addressed and may contain confidential and/or legally privileged material. Delivery of this message to any person other than the intended recipient(s) is not intended in any way to waive privilege or confidentiality. Any review, retransmission, dissemination or other use of , or taking of any action in reliance upon, this information by entities other than the intended recipient is prohibited. If you receive this in error, please contact the sender and delete the material from any computer.

For Translation:

Back to the top