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:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<index>true</index>
<manifestEntries>
<url>${pom.url}</url>
<email>${myEmailAddress}</email>
<buildNumber>${buildNumber}</buildNumber>
</manifestEntries>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
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
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]