I had some recent, indirect experience with this in http://svn.apache.org/viewvc?view=revision&revision=1396011. In order to use versionAsInProject(), I believe you will find the need to use the maven-paxexam-plugin and annotate the test classes with @RunWith (MavenConfiguredJUnit4TestRunner.class) rather than @RunWith (JUnit4TestRunner.class).
You might be able to get away with not adding the maven-paxexam-plugin since the depends-maven-plugin is already generating the META-INF/maven/dependencies.properties file. John > > Re: Fw: svn commit: r1395921 - /aries/trunk/subsystem/subsystem- > itests/src/test/java/org/apache/aries/subsystem/itests/SubsystemTest.java > > Hi John, > You may well be right. My changes do seem to have upset build #1705. I'll > see if versionAsInProject() helps. > > On 9 October 2012 13:49, John W Ross <[email protected]> wrote: > > > > > > > Hi Mark, > > > > I don't know Pax Exam as well as I should, but if our intent is to ensure > > the versions specified in the pom are used, I think we need to use > > versionAsInProject()? Leaving the version unspecified means "use the latest > > version" I believe. That achieves what we want for now, but may not always > > be the case. Would it be considered a best practice to always use > > versionAsInProject()? > > > > John > > > > > > > > svn commit: r1395921 - /aries/trunk/subsystem/subsystem-itests/src/ > > > test/java/org/apache/aries/subsystem/itests/SubsystemTest.java > > > > > > Author: mnuttall > > > Date: Tue Oct 9 09:09:45 2012 > > > New Revision: 1395921 > > > > > > URL: http://svn.apache.org/viewvc?rev=1395921&view=rev > > > Log: > > > Remove bundle versions from the configuration() method - they're > > > declared in the pom.xml. > > > > > > Modified: > > > aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/ > > > aries/subsystem/itests/SubsystemTest.java > > > > > > Modified: aries/trunk/subsystem/subsystem-itests/src/test/java/org/ > > > apache/aries/subsystem/itests/SubsystemTest.java > > > URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem- > > > itests/src/test/java/org/apache/aries/subsystem/itests/ > > > SubsystemTest.java?rev=1395921&r1=1395920&r2=1395921&view=diff > > > > > > > > ============================================================================== > > > > > --- aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/ > > > aries/subsystem/itests/SubsystemTest.java (original) > > > +++ aries/trunk/subsystem/subsystem-itests/src/test/java/org/apache/ > > > aries/subsystem/itests/SubsystemTest.java Tue Oct 9 09:09:45 2012 > > > @@ -183,10 +183,10 @@ public abstract class SubsystemTest exte > > > // Bundles > > > mavenBundle("org.apache.aries", > > > "org.apache.aries.util"), > > > mavenBundle("org.apache.aries.application", > > > "org.apache.aries.application.api"), > > > - mavenBundle("org.apache.aries.application", > > > "org.apache.aries.application.modeller").version("1.0.0"), > > > + mavenBundle("org.apache.aries.application", > > > "org.apache.aries.application.modeller"), > > > mavenBundle("org.apache.aries.application", > > > "org.apache.aries.application.utils"), > > > - mavenBundle("org.apache.aries.blueprint", > > > "org.apache.aries.blueprint").version("1.0.0"), > > > - mavenBundle("org.apache.aries.proxy", > > > "org.apache.aries.proxy").version("1.0.1-SNAPSHOT"), > > > + mavenBundle("org.apache.aries.blueprint", > > > "org.apache.aries.blueprint"), > > > + mavenBundle("org.apache.aries.proxy", > > > "org.apache.aries.proxy"), > > > mavenBundle("org.apache.aries.subsystem", > > > "org.apache.aries.subsystem.api"), > > > mavenBundle("org.apache.aries.subsystem", > > > "org.apache.aries.subsystem.core"), > > > mavenBundle("org.apache.aries.subsystem", > > > "org.apache.aries.subsystem.itest.interfaces"), > > > > > > > >
