Hi!

Use the 'archiveClasses' and 'attachClasses' [1] options of the 
maven-war-plugin 
in your first WAR file. This way all your classes of this war will get jared 
and 
used this way in WEB-INF/lib as jar instead of WEB-INF/classes. The 2nd option 
will tell maven to treat this jar as 'attached artifact' [2]. If you look at 
your local repository in ~/.m2/repository/... for your WAR, you will see a 
'..-webclasses.jar' (not 100% sure about the qualifier name, this got changed 
since I first hacked this years ago). You can then use this jar as dependency 
with this classifier. The groupId and artifactId are the ones from your WAR 
file.


LieGrue,
strub

[1] http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#attachClasses
[2] 
http://docs.codehaus.org/display/MAVEN/Packaging+vs+Type+-+Derived+and+Attached+Artifacts



----- Original Message ----
> From: Aneesh K raj <neptune_pl...@rediffmail.com>
> To: users@maven.apache.org
> Sent: Sun, August 8, 2010 11:39:00 AM
> Subject: war dependent on another war
> 
> hi,
> 
> i am having trouble having classes of a war in the classpath for  another 
war..
> am using maven 2.x jdk1.5 windows 7
> 
> i had added the  below to the pom.xml for the dependent war but it didnt work 
>  
>out..
> 
> 
>   ..
>   ..
>   ..
>   war
>    ..
> 


      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to