You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2013/09/14 23:47:14 UTC
svn commit: r1523335 - in /webservices/axiom/trunk: ./ systests/osgi-tests/
systests/osgi-tests/src/test/java/org/apache/axiom/test/
Author: veithen
Date: Sat Sep 14 21:47:14 2013
New Revision: 1523335
URL: http://svn.apache.org/r1523335
Log:
Upgraded to latest Pax Exam version.
Modified:
webservices/axiom/trunk/pom.xml
webservices/axiom/trunk/systests/osgi-tests/pom.xml
webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java
webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/OMAbstractFactoryTest.java
webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/ServiceTest.java
webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/StAXOMBuilderTest.java
Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1523335&r1=1523334&r2=1523335&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sat Sep 14 21:47:14 2013
@@ -213,10 +213,6 @@
</scm>
<dependencyManagement>
<dependencies>
- <!-- We use the 1.0 version of the StAX API as Maven dependency (because
- we need to ensure compatibility with that StAX version), but we need
- the 1.2 version because Geronimo's 1.0 bundles are not fully OSGi aware
- (they don't locate StAX implementations that are deployed as bundles). -->
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-stax-api_1.0_spec</artifactId>
@@ -224,12 +220,6 @@
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-stax-api_1.2_spec</artifactId>
- <version>1.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-activation_1.1_spec</artifactId>
<version>1.1</version>
</dependency>
Modified: webservices/axiom/trunk/systests/osgi-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/pom.xml?rev=1523335&r1=1523334&r2=1523335&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/pom.xml (original)
+++ webservices/axiom/trunk/systests/osgi-tests/pom.xml Sat Sep 14 21:47:14 2013
@@ -35,22 +35,9 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-stax-api_1.2_spec</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <!-- Used by geronimo-stax-api_1.2_spec to locate the StAX implementation;
- only required in an OSGi environment -->
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-osgi-registry</artifactId>
- <version>1.1</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.log</artifactId>
- <version>1.0.1</version>
+ <groupId>org.apache.servicemix.specs</groupId>
+ <artifactId>org.apache.servicemix.specs.stax-api-1.0</artifactId>
+ <version>2.2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -95,12 +82,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.ops4j.pax.logging</groupId>
- <artifactId>pax-logging-api</artifactId>
- <version>1.7.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.apache.servicemix.specs</groupId>
<artifactId>org.apache.servicemix.specs.jaxb-api-2.1</artifactId>
<version>2.0.0</version>
@@ -114,24 +95,42 @@
</dependency>
<dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ <version>3.2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam</artifactId>
+ <artifactId>pax-exam-container-native</artifactId>
<version>${exam.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-container-default</artifactId>
+ <artifactId>pax-exam-junit4</artifactId>
<version>${exam.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
- <artifactId>pax-exam-junit</artifactId>
+ <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>1.6.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.5.11</version>
@@ -144,27 +143,34 @@
</dependency>
</dependencies>
<properties>
- <exam.version>1.2.4</exam.version>
+ <exam.version>3.2.0</exam.version>
</properties>
<build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ </testResource>
+ <testResource>
+ <directory>${project.build.directory}/test-resources</directory>
+ </testResource>
+ </testResources>
<plugins>
<plugin>
- <groupId>org.ops4j.pax.exam</groupId>
- <artifactId>maven-paxexam-plugin</artifactId>
- <version>${exam.version}</version>
+ <groupId>org.apache.servicemix.tooling</groupId>
+ <artifactId>depends-maven-plugin</artifactId>
+ <version>1.2</version>
<executions>
<execution>
+ <id>generate-depends-file</id>
+ <phase>generate-test-resources</phase>
<goals>
- <goal>generate-config</goal>
+ <goal>generate-depends-file</goal>
</goals>
+ <configuration>
+ <outputFile>${project.build.directory}/test-resources/META-INF/maven/dependencies.properties</outputFile>
+ </configuration>
</execution>
</executions>
- <configuration>
- <settings>
- <platform>felix</platform>
- <profiles>log,url</profiles>
- </settings>
- </configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
Modified: webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java?rev=1523335&r1=1523334&r2=1523335&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java (original)
+++ webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/JAXBTest.java Sat Sep 14 21:47:14 2013
@@ -18,6 +18,12 @@
*/
package org.apache.axiom.test;
+import static org.ops4j.pax.exam.CoreOptions.frameworkProperty;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.MavenUtils.asInProject;
+
import java.io.ByteArrayOutputStream;
import javax.xml.bind.JAXBContext;
@@ -28,13 +34,35 @@ import org.apache.axiom.om.OMSourcedElem
import org.apache.axiom.om.ds.jaxb.JAXBOMDataSource;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.junit.MavenConfiguredJUnit4TestRunner;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
/**
* Tests that the axiom-jaxb bundle can be loaded successfully and is operational.
*/
-@RunWith(MavenConfiguredJUnit4TestRunner.class)
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
public class JAXBTest {
+ @Configuration
+ public static Option[] configuration() {
+ return options(
+ mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-activation_1.1_spec").version(asInProject()),
+ mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.stax-api-1.0").version(asInProject()),
+ mavenBundle().groupId("org.codehaus.woodstox").artifactId("stax2-api").version(asInProject()),
+ mavenBundle().groupId("org.codehaus.woodstox").artifactId("woodstox-core-asl").version(asInProject()),
+ mavenBundle().groupId("org.apache.james").artifactId("apache-mime4j-core").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-api").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-impl").version(asInProject()),
+ mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.jaxb-api-2.1").version(asInProject()),
+ mavenBundle().groupId("org.apache.servicemix.bundles").artifactId("org.apache.servicemix.bundles.jaxb-impl").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-jaxb").version(asInProject()),
+ junitBundles(),
+ frameworkProperty("foo").value("bar"));
+ }
+
@Test
public void test() throws Exception {
OMFactory factory = OMAbstractFactory.getOMFactory();
Modified: webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/OMAbstractFactoryTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/OMAbstractFactoryTest.java?rev=1523335&r1=1523334&r2=1523335&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/OMAbstractFactoryTest.java (original)
+++ webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/OMAbstractFactoryTest.java Sat Sep 14 21:47:14 2013
@@ -19,14 +19,38 @@
package org.apache.axiom.test;
import static org.junit.Assert.assertNotNull;
+import static org.ops4j.pax.exam.CoreOptions.frameworkProperty;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.MavenUtils.asInProject;
import org.apache.axiom.om.OMAbstractFactory;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.junit.MavenConfiguredJUnit4TestRunner;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
-@RunWith(MavenConfiguredJUnit4TestRunner.class)
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
public class OMAbstractFactoryTest {
+ @Configuration
+ public static Option[] configuration() {
+ return options(
+ mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-activation_1.1_spec").version(asInProject()),
+ mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.stax-api-1.0").version(asInProject()),
+ mavenBundle().groupId("org.codehaus.woodstox").artifactId("stax2-api").version(asInProject()),
+ mavenBundle().groupId("org.codehaus.woodstox").artifactId("woodstox-core-asl").version(asInProject()),
+ mavenBundle().groupId("org.apache.james").artifactId("apache-mime4j-core").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-api").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-impl").version(asInProject()),
+ junitBundles(),
+ frameworkProperty("foo").value("bar"));
+ }
+
@Test
public void testgetOMFactory() throws Exception {
assertNotNull(OMAbstractFactory.getOMFactory());
Modified: webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/ServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/ServiceTest.java?rev=1523335&r1=1523334&r2=1523335&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/ServiceTest.java (original)
+++ webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/ServiceTest.java Sat Sep 14 21:47:14 2013
@@ -20,16 +20,42 @@ package org.apache.axiom.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.ops4j.pax.exam.CoreOptions.frameworkProperty;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.MavenUtils.asInProject;
+
+import javax.inject.Inject;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.Inject;
-import org.ops4j.pax.exam.junit.MavenConfiguredJUnit4TestRunner;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
-@RunWith(MavenConfiguredJUnit4TestRunner.class)
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
public class ServiceTest {
+ @Configuration
+ public static Option[] configuration() {
+ return options(
+ mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-activation_1.1_spec").version(asInProject()),
+ mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.stax-api-1.0").version(asInProject()),
+ mavenBundle().groupId("org.codehaus.woodstox").artifactId("stax2-api").version(asInProject()),
+ mavenBundle().groupId("org.codehaus.woodstox").artifactId("woodstox-core-asl").version(asInProject()),
+ mavenBundle().groupId("org.apache.james").artifactId("apache-mime4j-core").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-api").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-impl").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-dom").version(asInProject()),
+ junitBundles(),
+ frameworkProperty("foo").value("bar"));
+ }
+
@Inject BundleContext context;
@Test
Modified: webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/StAXOMBuilderTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/StAXOMBuilderTest.java?rev=1523335&r1=1523334&r2=1523335&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/StAXOMBuilderTest.java (original)
+++ webservices/axiom/trunk/systests/osgi-tests/src/test/java/org/apache/axiom/test/StAXOMBuilderTest.java Sat Sep 14 21:47:14 2013
@@ -19,6 +19,11 @@
package org.apache.axiom.test;
import static org.junit.Assert.assertEquals;
+import static org.ops4j.pax.exam.CoreOptions.frameworkProperty;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.MavenUtils.asInProject;
import java.io.ByteArrayInputStream;
@@ -26,10 +31,28 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.ops4j.pax.exam.junit.MavenConfiguredJUnit4TestRunner;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
-@RunWith(MavenConfiguredJUnit4TestRunner.class)
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
public class StAXOMBuilderTest {
+ @Configuration
+ public static Option[] configuration() {
+ return options(
+ mavenBundle().groupId("org.apache.geronimo.specs").artifactId("geronimo-activation_1.1_spec").version(asInProject()),
+ mavenBundle().groupId("org.apache.servicemix.specs").artifactId("org.apache.servicemix.specs.stax-api-1.0").version(asInProject()),
+ mavenBundle().groupId("org.codehaus.woodstox").artifactId("stax2-api").version(asInProject()),
+ mavenBundle().groupId("org.codehaus.woodstox").artifactId("woodstox-core-asl").version(asInProject()),
+ mavenBundle().groupId("org.apache.james").artifactId("apache-mime4j-core").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-api").version(asInProject()),
+ mavenBundle().groupId("org.apache.ws.commons.axiom").artifactId("axiom-impl").version(asInProject()),
+ junitBundles(),
+ frameworkProperty("foo").value("bar"));
+ }
private String xmlString = "<a:testElement xmlns:a=\"http://test/namespace\" />";