run your tests after the package phase, i.e.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<testSourceDirectory>${basedir}/src/test2/java</testSourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
I have not tested it but it should work
regards,
Kristian
On Mon, May 24, 2010 at 11:23 PM, Ernst de Haan <[email protected]> wrote:
>> Instead of running that test in this module's build, add another
>> module alongside it that depends on this artifact, and run this test
>> there. It will bring in the jar which, as you said, has the manifest
>> in it. You will need a parent pom as well over both modules, and
>> always build your project from the parent.
>
> Another question: How do I make the test-module use the *JAR* instead of just
> the classes?
>
> Here's what I have done:
> - create a separate "base-test" module with a separate POM that depends on
> the "base" module
> - move all unit tests to the "base-test" module
> - run "mvn clean" and then "mvn test"
>
> What happens is:
> - the classes get compiled for the "base" module (but no JAR is generated)
> - the unit tests in "base-test" are executed, using the classes (not the JAR)
> - the tests (obviously) fail
>
> So I try forcing the JAR to be created, using "mvn install", which works. But
> still the unit tests fail, because they appear to use the classes instead of
> the JAR...
>
> Any hints to this next piece of the puzzle?
>
>
> Ernst
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA
tel: +91 468 2319577
protect your privacy while searching the net: www.ixquick.com
_=_
q(-_-)p
'_) (_`
/__/ \
_(<_ / )_
(__\_\_|_/__)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]