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 2016/01/09 14:33:13 UTC
svn commit: r1723853 - in /webservices/axiom/trunk:
implementations/fom-impl/pom.xml
implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/OSGiITCase.java
pom.xml systests/osgi-tests/pom.xml
Author: veithen
Date: Sat Jan 9 13:33:13 2016
New Revision: 1723853
URL: http://svn.apache.org/viewvc?rev=1723853&view=rev
Log:
AXIOM-479, AXIOM-480: Tranform fom-impl into an OSGi bundle and add a basic integration test that verifies that successfully interacts with the StAX API.
Added:
webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/OSGiITCase.java (with props)
Modified:
webservices/axiom/trunk/implementations/fom-impl/pom.xml
webservices/axiom/trunk/pom.xml
webservices/axiom/trunk/systests/osgi-tests/pom.xml
Modified: webservices/axiom/trunk/implementations/fom-impl/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/pom.xml?rev=1723853&r1=1723852&r2=1723853&view=diff
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/pom.xml (original)
+++ webservices/axiom/trunk/implementations/fom-impl/pom.xml Sat Jan 9 13:33:13 2016
@@ -27,7 +27,7 @@
</parent>
<artifactId>fom-impl</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<name>Abdera Model (FOM) Implementation</name>
<description>Implementation of Abdera's Feed Object Model. Can be used as a drop in replacement for the abdera-parser artifact.</description>
@@ -80,6 +80,31 @@
<version>${project.version}</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-container-native</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit4</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-link-assembly</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
@@ -119,6 +144,43 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>com.github.veithen.alta</groupId>
+ <artifactId>alta-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>generate-files</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/links</outputDirectory>
+ <name>%bundle.symbolicName%.link</name>
+ <value>%url%</value>
+ <dependencySet>
+ <scope>test</scope>
+ <useProjectArtifact>true</useProjectArtifact>
+ </dependencySet>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${project.build.directory}/links</additionalClasspathElement>
+ </additionalClasspathElements>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Added: webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/OSGiITCase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/OSGiITCase.java?rev=1723853&view=auto
==============================================================================
--- webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/OSGiITCase.java (added)
+++ webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/OSGiITCase.java Sat Jan 9 13:33:13 2016
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.fom.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.ops4j.pax.exam.CoreOptions.junitBundles;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.url;
+
+import java.io.StringReader;
+
+import org.apache.abdera.Abdera;
+import org.apache.abdera.model.Document;
+import org.apache.abdera.model.Entry;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+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(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class OSGiITCase {
+ @Configuration
+ public static Option[] configuration() {
+ return options(
+ url("link:classpath:org.apache.geronimo.specs.geronimo-activation_1.1_spec.link"),
+ url("link:classpath:org.apache.commons.codec.link"),
+ url("link:classpath:org.apache.abdera.core.link"),
+ url("link:classpath:org.apache.abdera.i18n.link"),
+ url("link:classpath:jaxen.link"),
+ url("link:classpath:org.apache.james.apache-mime4j-core.link"),
+ url("link:classpath:org.apache.ws.commons.axiom.axiom-api.link"),
+ url("link:classpath:org.apache.ws.commons.axiom.fom-impl.link"),
+ junitBundles());
+ }
+
+ @Test
+ public void test() {
+ ClassLoader savedTCCL = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(OSGiITCase.class.getClassLoader());
+ try {
+ Document<Entry> document = Abdera.getInstance().getParser().parse(new StringReader(
+ "<entry xmlns='http://www.w3.org/2005/Atom'><id>urn:test</id></entry>"));
+ assertEquals("urn:test", document.getRoot().getId().toString());
+ } finally {
+ Thread.currentThread().setContextClassLoader(savedTCCL);
+ }
+ }
+}
Propchange: webservices/axiom/trunk/implementations/fom-impl/src/test/java/org/apache/axiom/fom/impl/OSGiITCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1723853&r1=1723852&r2=1723853&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sat Jan 9 13:33:13 2016
@@ -243,7 +243,7 @@
</distributionManagement>
<properties>
- <osgi.version>4.2.0</osgi.version>
+ <osgi.version>5.0.0</osgi.version>
<stax.impl.groupid>org.codehaus.woodstox</stax.impl.groupid>
<stax.impl.artifact>woodstox-core-asl</stax.impl.artifact>
<stax.impl.version>4.2.0</stax.impl.version>
@@ -262,6 +262,7 @@
<jacoco.version>0.7.5.201505241946</jacoco.version>
<spring.version>4.2.1.RELEASE</spring.version>
<springws.version>2.2.4.RELEASE</springws.version>
+ <exam.version>4.7.0</exam.version>
<skipDeploy>false</skipDeploy>
</properties>
@@ -518,6 +519,31 @@
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>3.1.3</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ <version>5.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-container-native</artifactId>
+ <version>${exam.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-junit4</artifactId>
+ <version>${exam.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.ops4j.pax.exam</groupId>
+ <artifactId>pax-exam-link-assembly</artifactId>
+ <version>${exam.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <version>1.5.11</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -794,7 +820,7 @@
<plugin>
<groupId>com.github.veithen.alta</groupId>
<artifactId>alta-maven-plugin</artifactId>
- <version>0.3.1</version>
+ <version>0.4</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
Modified: webservices/axiom/trunk/systests/osgi-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/pom.xml?rev=1723853&r1=1723852&r2=1723853&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/pom.xml (original)
+++ webservices/axiom/trunk/systests/osgi-tests/pom.xml Sat Jan 9 13:33:13 2016
@@ -31,10 +31,6 @@
<name>Axiom OSGi Tests</name>
- <properties>
- <exam.version>4.7.0</exam.version>
- </properties>
-
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -64,25 +60,22 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
- <version>5.0.0</version>
<scope>test</scope>
</dependency>
<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-assembly</artifactId>
- <version>${exam.version}</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
@@ -93,7 +86,6 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
- <version>1.5.11</version>
<scope>test</scope>
</dependency>
<dependency>