Hi,
I've created simple test which uses native test container. It works if
it is executed by the maven, but it fails if it is executed from the
eclipse.
Here's the test, pom, and the stacktrace. It looks like
pax.exam.version is not properly decoded from the
pax-exam-version.properties.
------
package org.gs4tr.osgi.test;
import static org.ops4j.pax.exam.CoreOptions.equinox;
import static org.ops4j.pax.exam.CoreOptions.options;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.Configuration;
import org.ops4j.pax.exam.junit.JUnit4TestRunner;
@RunWith(JUnit4TestRunner.class)
public class SimpleTest {
@Configuration
public Option[] configure() {
return options(equinox().version("3.6.2"));
}
@Test
public void t1() {
System.out.println("----------------> test");
}
}
------
<properties>
<exam.version>2.4.0</exam.version>
<url.version>1.4.0</url.version>
</properties>
<dependencies>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-native</artifactId>
<version>${exam.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId>
<version>${exam.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-link-mvn</artifactId>
<version>${exam.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-aether</artifactId>
<version>${url.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.0.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonatype.tycho</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.6.2.R36x_v20110210</version>
</dependency>
</dependencies>
-----
java.lang.NumberFormatException: For input string: "${pom"
at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.lang.Integer.parseInt(Integer.java:499)
at org.osgi.framework.Version.<init>(Version.java:125)
at org.osgi.framework.Version.parseVersion(Version.java:218)
at
org.eclipse.osgi.internal.resolver.StateBuilder.addExportPackages(StateBuilder.java:319)
at
org.eclipse.osgi.internal.resolver.StateBuilder.createExportPackages(StateBuilder.java:301)
at
org.eclipse.osgi.internal.resolver.StateImpl.addSystemExports(StateImpl.java:758)
at
org.eclipse.osgi.internal.resolver.StateImpl.addSystemExports(StateImpl.java:749)
at
org.eclipse.osgi.internal.resolver.StateImpl.resetSystemExports(StateImpl.java:740)
at
org.eclipse.osgi.internal.resolver.StateImpl.addBundle(StateImpl.java:92)
at
org.eclipse.osgi.internal.baseadaptor.BaseStorage.readStateData(BaseStorage.java:779)
at
org.eclipse.osgi.internal.baseadaptor.BaseStorage.getStateManager(BaseStorage.java:724)
at
org.eclipse.osgi.baseadaptor.BaseAdaptor.getPlatformAdmin(BaseAdaptor.java:366)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorHook.frameworkStart(EclipseAdaptorHook.java:88)
at
org.eclipse.osgi.baseadaptor.BaseAdaptor.frameworkStart(BaseAdaptor.java:242)
at
org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:61)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
at
org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:207)
at
org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:654)
at
org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:70)
at
org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:38)
at org.eclipse.osgi.launch.Equinox.init(Equinox.java:176)
at
org.ops4j.pax.exam.nat.internal.NativeTestContainer.start(NativeTestContainer.java:162)
at
org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactor.invoke(AllConfinedStagedReactor.java:67)
at
org.ops4j.pax.exam.junit.JUnit4TestRunner$3.evaluate(JUnit4TestRunner.java:304)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:69)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:48)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
at
org.ops4j.pax.exam.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:93)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general