maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daivish Shah <daivish.s...@gmail.com>
Subject Re: How to include WAR dependency in project
Date Tue, 01 May 2012 20:42:24 GMT
Thanks Stanimir,


I modified my code like this.

JUNIT Module POM.XML

<dependency>
    <groupId>sample-project-ws</****groupId>
    <artifactId>sample-project-ws<****/artifactId>

     <version>${project.version}</****version>
     <classifier>classes</classes>
    <scope>test</scope>
</dependency>


My sample-project-ws POM.XML

<plugins>
    <plugin>
        <groupId>org.apache.maven.****plugins</groupId>
        <artifactId>maven-war-plugin</****artifactId>
        <configuration>
               <attachClasses>true</attachClasses>
        </configuration>
    </plugin>


Thanks a lot for your help.




On Tue, May 1, 2012 at 1:08 PM, Stanimir Stamenkov <s7an10@netscape.net>wrote:

> Tue, 1 May 2012 11:44:27 -0700, /Daivish Shah/:
>
>  I have following dependency declared in my UNIT Testing module project.
>>
>> <dependency>
>>    <groupId>sample-project-ws</**groupId>
>>    <artifactId>sample-project-ws<**/artifactId>
>>    <version>${project.version}</**version>
>>    <type>war</type>
>>    <scope>test</scope>
>> </dependency>
>> [...]
>>
>
> If you control the POM of "sample-project-ws" you could produce additional
> 'classes' jar artifact:
>
> http://maven.apache.org/**plugins/maven-war-plugin/war-**
> mojo.html#attachClasses<http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#attachClasses>
>
> which you could then refer to as dependency from other modules:
>
>
> <dependency>
>    <groupId>sample-project-ws</**groupId>
>    <artifactId>sample-project-ws<**/artifactId>
>    <version>${project.version}</**version>
>    <classifier>classes</**classifier>
>    <scope>test</scope>
> </dependency>
>
> --
> Stanimir
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<users-unsubscribe@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message