Hi, I'm running pax-exam using the maven-pax-plugin. I have setup my pom.xml like so (sorry for the long post):
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <!-- snipped parent, scn and other various properties --> <dependencies> <!-- Pax Exam API: --> <dependency> <groupId>org.ops4j.pax.exam</groupId> <artifactId>pax-exam</artifactId> <version>1.2.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.exam</groupId> <artifactId>pax-exam-container-default</artifactId> <version>1.2.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.ops4j.pax.exam</groupId> <artifactId>pax-exam-junit</artifactId> <version>1.2.1</version> <scope>test</scope> </dependency> <!-- Actual project dependencies here, snipped --> <dependency> <groupId>org.ops4j.pax.confman</groupId> <artifactId>pax-confman-propsloader</artifactId> <version>0.2.3-SNAPSHOT</version><scope>provided</scope> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.configadmin</artifactId> <version>1.2.4</version><scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> <!-- use pax exam maven plugin --> <plugin> <groupId>org.ops4j.pax.exam</groupId> <artifactId>maven-paxexam-plugin</artifactId> <executions> <execution> <id>generate-config</id> <goals><goal>generate-config</goal></goals> </execution> </executions> <configuration> <settings> <dependency_options>SNIPPED</dependency_options> </settings> <options> <platform>equinox</platform> <profiles>compendium/4.2.0</profiles> <vmOptions>-Dsome.path=../../../some/directory\ -Dorg.ops4j.pax.logging.DefaultServiceLog.level=WARN\ -Dosgi.bundles.defaultStartLevel=4\ -Dosgi.startLevel=6\ -Dbundles.configuration.location=../../bundle-configs\ -Dorg.osgi.framework.system.packages=javax.accessibility,\ ... </vmOptions> </options> </configuration> </plugin> </plugins> </build> </project> I run this project with 'mvn clean install' from the directory containing the pom.xml. Everything works okay, except that the vmOptions I pass in don't seem to be used. I get the following messages on the terminal: [INFO] Generated configuration as Pax Runner arguments file /home/vipul/repos/tests/test-projects/osgi-integration/target/test-classes/META-INF/maven/paxexam-config.args ... [INFO] Run - Using arguments from command line and file:/home/vipul/repos/tests/test-projects/osgi-integration/target/test-classes/META-INF/maven/paxexam-config.args I have verified that the specified file does indeed contain the correct vmOptions, however the -D properties that I have set don't seem to be passed through to the JVM launched by the test runner. If I set those properties inside the Java using vmOption("-Dsome.path=../../../some/directory") inside the configure() method (annotated with @Configuration) then they are set correctly. The class has been annotated with @RunWith(MavenConfiguredJUnit4TestRunner.class) too. Is pax-exam ignoring the vmOptions set in the config? Or is there something I have missed. Thanks, Vipul _______________________________________________ general mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/general
