maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David J. M. Karlsen" <>
Subject Re: test-classes in War
Date Tue, 01 Aug 2006 10:07:14 GMT
devillina wrote:
> I think i'm doing something wrong.
> I put the thing for the jar-plugin in my pom.xml (the one that builds the
> war).
> And i do get a test-jar build.  But building this jar is the last thing
> maven does.
> So when i put the dependency in my war-plugin like this:
> <plugin>
>         <artifactId>maven-war-plugin</artifactId>
>         <configuration>
> 	    <excludes>**/_svn/**</excludes>
> 	    <archive>
> 	        <manifest>
> 		    <addClasspath>true</addClasspath>
> 		</manifest>
> 	    </archive>
>         </configuration>
>         <dependencies>
>             <dependency>
>                  <groupId>be.delaware.jpetstore.samples</groupId>
>                  <artifactId>jpetstore</artifactId>
>                  <version>0.0.1</version>
>                  <type>test-jar</type>
>             </dependency>
>         </dependencies>
> </plugin>
> But he keeps saying he's missing an artifact for the war-plugin (what would
> be logical because he tries to   make the war before the test-jar is even
> build).
> any ideas?

The artifact has to be installed for maven to use it.

in fact - I have these in separate projects. (The tests are build from a 
"server-project" - and I depend on these in a separate "testwar-project").

> (p.s. i can't put my tests in the main source tree, because they want me to
> follow the
> maven default directory structure).
Can you send the complete pom?

My jar-plugin configuration:




I think your approach should work as the test-jar will be executed 
before the war-step. The problem is that the artifact is not installed 
in your local repo at this point. If you're totally stuck I would 
recommend splitting it up into two artifacts.

David J. M. Karlsen - +47 90 68 22 43

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message