Re: Unit tests depending on manifest

2010-05-24 Thread Justin Edelson
On 5/24/10 5:54 PM, Ernst de Haan wrote: >> better off using maven-failsafe-plugin for that > > > How do I know for sure "verify" is using my JAR? You could inspect the classloader. Something like: URLClassLoader ucl = (URLClassLoader) getClass().getClassLoader(); System.out.println

Re: Unit tests depending on manifest

2010-05-24 Thread Stephen Connolly
failsafe is surefire just bound to theintegration-test phase. changing surefire to be bound to the integration-test phase can cause subtle issues as you use more plugins. we should be able to convince failsafe to use the jars if they are available... can you file an enhancement request in JIRA?

Re: Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
> better off using maven-failsafe-plugin for that How do I know for sure "verify" is using my JAR? I tried the failsafe plugin, but it still /appears/ to be using the classes, not the JAR, even from my new LibraryIT.java integration test. It does execute, but the test fails. Here's my POM for

Re: Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
> better off using maven-failsafe-plugin for that Stephen, thanks for the pointer. Will give that a try. I was getting nowhere (yet) with all sorts of variants of the snippet Kristian sent. An alternative route is welcomed :) /me struggles on... Cheers, Ernst

Re: Unit tests depending on manifest

2010-05-24 Thread Stephen Connolly
better off using maven-failsafe-plugin for that On 24 May 2010 20:00, kristian wrote: > run your tests after the package phase, i.e. > > >org.apache.maven.plugins >maven-surefire-plugin >2.5 > > >integration-test > >

Re: Unit tests depending on manifest

2010-05-24 Thread kristian
run your tests after the package phase, i.e. org.apache.maven.plugins maven-surefire-plugin 2.5 integration-test test ${basedir}/src/test2/java

Re: Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
> 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 pro

Re: Unit tests depending on manifest

2010-05-24 Thread Justin Edelson
On 5/24/10 1:04 PM, Ernst de Haan wrote: > Wayne, > > >>> How can I make sure the manifest file gets generated before the unit tests >>> are executed? >>> >>> - the unit tests attempt to validate that Java code, but the manifest file >>> is not generated, it's only part of the JAR >> >> Instead

Re: Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
Wayne, >> How can I make sure the manifest file gets generated before the unit tests >> are executed? >> >> - the unit tests attempt to validate that Java code, but the manifest file >> is not generated, it's only part of the JAR > > Instead of running that test in this module's build, add an

Re: Unit tests depending on manifest

2010-05-24 Thread Wayne Fay
> How can I make sure the manifest file gets generated before the unit tests > are executed? > > - the unit tests attempt to validate that Java code, but the manifest file is > not generated, it's only part of the JAR Instead of running that test in this module's build, add another module alongs

Unit tests depending on manifest

2010-05-24 Thread Ernst de Haan
How can I make sure the manifest file gets generated before the unit tests are executed? My use case is: - a Java code base, under src/main/java - unit tests under src/test/java - pom.xml specifies packaging "jar" - JUnit 4.8.1 is a dependency - Java code uses a property from the manifest to dete