ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1523428 - in /webservices/axiom/trunk: ./ buildutils/ buildutils/paxexam-maven-plugin/ buildutils/paxexam-maven-plugin/src/ buildutils/paxexam-maven-plugin/src/main/ buildutils/paxexam-maven-plugin/src/main/java/ buildutils/paxexam-maven-p...
Date Sun, 15 Sep 2013 11:24:09 GMT
Author: veithen
Date: Sun Sep 15 11:24:08 2013
New Revision: 1523428

URL: http://svn.apache.org/r1523428
Log:
Work around PAXEXAM-543: instead of letting Pax Exam resolve Maven artifact itself (which
sucks because the mvn URL provider doesn't use the same configuration as the Maven build),
use a custom Maven plugin that scans Maven dependencies for OSGi bundles and that generates
a set of link files. The bundles can then be provisioned using link:classpath:*.link URLs.

Added:
    webservices/axiom/trunk/buildutils/   (with props)
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/   (with props)
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/pom.xml   (with props)
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/exam/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/exam/maven/
    webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/exam/maven/GenerateLinkFilesMojo.java
  (with props)
    webservices/axiom/trunk/buildutils/pom.xml   (with props)
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

Propchange: webservices/axiom/trunk/buildutils/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Sep 15 11:24:08 2013
@@ -0,0 +1 @@
+target

Propchange: webservices/axiom/trunk/buildutils/paxexam-maven-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Sep 15 11:24:08 2013
@@ -0,0 +1,4 @@
+.settings
+.classpath
+.project
+target

Added: webservices/axiom/trunk/buildutils/paxexam-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/buildutils/paxexam-maven-plugin/pom.xml?rev=1523428&view=auto
==============================================================================
--- webservices/axiom/trunk/buildutils/paxexam-maven-plugin/pom.xml (added)
+++ webservices/axiom/trunk/buildutils/paxexam-maven-plugin/pom.xml Sun Sep 15 11:24:08 2013
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.ws.commons.axiom</groupId>
+        <artifactId>buildutils</artifactId>
+        <version>1.2.15-SNAPSHOT</version>
+    </parent>
+    <artifactId>paxexam-maven-plugin</artifactId>
+    <name>Pax Exam Maven plugin</name>
+    <packaging>maven-plugin</packaging>
+    <properties>
+        <maven.version>2.0.11</maven.version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+            <version>${maven.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-artifact</artifactId>
+            <version>${maven.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven.shared</groupId>
+            <artifactId>maven-common-artifact-filters</artifactId>
+            <version>1.4</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-plugin-plugin</artifactId>
+                <version>3.2</version>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: webservices/axiom/trunk/buildutils/paxexam-maven-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/exam/maven/GenerateLinkFilesMojo.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/exam/maven/GenerateLinkFilesMojo.java?rev=1523428&view=auto
==============================================================================
--- webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/exam/maven/GenerateLinkFilesMojo.java
(added)
+++ webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/exam/maven/GenerateLinkFilesMojo.java
Sun Sep 15 11:24:08 2013
@@ -0,0 +1,124 @@
+/*
+ * 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.buildutils.pax.exam.maven;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintWriter;
+import java.util.Set;
+import java.util.jar.Manifest;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Build;
+import org.apache.maven.model.Resource;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.shared.artifact.filter.collection.ArtifactFilterException;
+import org.apache.maven.shared.artifact.filter.collection.FilterArtifacts;
+import org.apache.maven.shared.artifact.filter.collection.ScopeFilter;
+import org.apache.maven.shared.artifact.filter.collection.TypeFilter;
+
+/**
+ * @goal generate-link-files
+ * @phase generate-test-resources
+ * @requiresDependencyResolution test
+ */
+public class GenerateLinkFilesMojo extends AbstractMojo {
+    /**
+     * @parameter property="project.artifacts"
+     * @readonly
+     * @required
+     */
+    private Set<Artifact> projectArtifacts;
+    
+    /**
+     * @parameter property="project.build"
+     * @readonly
+     * @required
+     */
+    private Build build;
+    
+    /**
+     * @parameter default-value="${project.build.directory}/pax-exam-links"
+     */
+    private File outputDirectory;
+
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        FilterArtifacts filter = new FilterArtifacts();
+        filter.addFilter(new ScopeFilter(Artifact.SCOPE_TEST, null));
+        filter.addFilter(new TypeFilter("jar", null));
+        Set<Artifact> artifacts;
+        try {
+            artifacts = filter.filter(projectArtifacts);
+        } catch (ArtifactFilterException ex) {
+            throw new MojoExecutionException(ex.getMessage(), ex);
+        }
+        outputDirectory.mkdirs();
+        for (Artifact artifact : artifacts) {
+            File file = artifact.getFile();
+            Manifest manifest = null;
+            try {
+                InputStream in = new FileInputStream(file);
+                try {
+                    ZipInputStream zip = new ZipInputStream(in);
+                    ZipEntry entry;
+                    while ((entry = zip.getNextEntry()) != null) {
+                        if (entry.getName().equals("META-INF/MANIFEST.MF")) {
+                            manifest = new Manifest(zip);
+                            break;
+                        }
+                    }
+                } finally {
+                    in.close();
+                }
+            } catch (IOException ex) {
+                getLog().error("Unable to read " + artifact.getFile(), ex);
+            }
+            if (manifest != null) {
+                String symbolicName = manifest.getMainAttributes().getValue("Bundle-SymbolicName");
+                if (symbolicName != null) {
+                    int idx = symbolicName.indexOf(';');
+                    if (idx != -1) {
+                        symbolicName = symbolicName.substring(0, idx);
+                    }
+                    File linkFile = new File(outputDirectory, symbolicName + ".link");
+                    try {
+                        PrintWriter out = new PrintWriter(new FileOutputStream(linkFile),
false);
+                        try {
+                            out.write(file.toURI().toString());
+                        } finally {
+                            out.close();
+                        }
+                    } catch (IOException ex) {
+                        throw new MojoExecutionException("Failed to create " + linkFile,
ex);
+                    }
+                }
+            }
+        }
+        Resource resource = new Resource();
+        resource.setDirectory(outputDirectory.toString());
+        build.addTestResource(resource);
+    }
+}

Propchange: webservices/axiom/trunk/buildutils/paxexam-maven-plugin/src/main/java/org/apache/axiom/buildutils/pax/exam/maven/GenerateLinkFilesMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/buildutils/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/buildutils/pom.xml?rev=1523428&view=auto
==============================================================================
--- webservices/axiom/trunk/buildutils/pom.xml (added)
+++ webservices/axiom/trunk/buildutils/pom.xml Sun Sep 15 11:24:08 2013
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<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">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.ws.commons.axiom</groupId>
+        <artifactId>axiom</artifactId>
+        <version>1.2.15-SNAPSHOT</version>
+    </parent>
+    <artifactId>buildutils</artifactId>
+    <name>Build utilities</name>
+    <packaging>pom</packaging>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-site-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                    <skipDeploy>true</skipDeploy>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <modules>
+        <module>paxexam-maven-plugin</module>
+    </modules>
+</project>

Propchange: webservices/axiom/trunk/buildutils/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1523428&r1=1523427&r2=1523428&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sun Sep 15 11:24:08 2013
@@ -751,6 +751,7 @@
         </site>
     </distributionManagement>
     <modules>
+        <module>buildutils</module>
         <module>modules/axiom-buildutils</module>
         <module>modules/axiom-testutils</module>
         <module>modules/axiom-jaxen-testsuite</module>

Modified: webservices/axiom/trunk/systests/osgi-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/osgi-tests/pom.xml?rev=1523428&r1=1523427&r2=1523428&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/osgi-tests/pom.xml (original)
+++ webservices/axiom/trunk/systests/osgi-tests/pom.xml Sun Sep 15 11:24:08 2013
@@ -119,12 +119,6 @@
             <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>
@@ -146,29 +140,16 @@
         <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.apache.servicemix.tooling</groupId>
-                <artifactId>depends-maven-plugin</artifactId>
-                <version>1.2</version>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>paxexam-maven-plugin</artifactId>
+                <version>${project.version}</version>
                 <executions>
                     <execution>
-                        <id>generate-depends-file</id>
-                        <phase>generate-test-resources</phase>
                         <goals>
-                            <goal>generate-depends-file</goal>
+                            <goal>generate-link-files</goal>
                         </goals>
-                        <configuration>
-                            <outputFile>${project.build.directory}/test-resources/META-INF/maven/dependencies.properties</outputFile>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>

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=1523428&r1=1523427&r2=1523428&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
Sun Sep 15 11:24:08 2013
@@ -20,9 +20,8 @@ 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 static org.ops4j.pax.exam.CoreOptions.url;
 
 import java.io.ByteArrayOutputStream;
 
@@ -49,16 +48,16 @@ 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()),
+                url("link:classpath:org.apache.geronimo.specs.geronimo-activation_1.1_spec.link"),
+                url("link:classpath:org.apache.servicemix.specs.stax-api-1.0.link"),
+                url("link:classpath:stax2-api.link"),
+                url("link:classpath:woodstox-core-asl.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.axiom-impl.link"),
+                url("link:classpath:org.apache.servicemix.specs.jaxb-api-2.1.link"),
+                url("link:classpath:org.apache.servicemix.bundles.jaxb-impl.link"),
+                url("link:classpath:org.apache.ws.commons.axiom.axiom-jaxb.link"),
                 junitBundles(),
                 frameworkProperty("foo").value("bar"));
     }

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=1523428&r1=1523427&r2=1523428&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
Sun Sep 15 11:24:08 2013
@@ -21,9 +21,8 @@ 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 static org.ops4j.pax.exam.CoreOptions.url;
 
 import org.apache.axiom.om.OMAbstractFactory;
 import org.junit.Test;
@@ -40,13 +39,13 @@ 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()),
+                url("link:classpath:org.apache.geronimo.specs.geronimo-activation_1.1_spec.link"),
+                url("link:classpath:org.apache.servicemix.specs.stax-api-1.0.link"),
+                url("link:classpath:stax2-api.link"),
+                url("link:classpath:woodstox-core-asl.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.axiom-impl.link"),
                 junitBundles(),
                 frameworkProperty("foo").value("bar"));
     }

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=1523428&r1=1523427&r2=1523428&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
Sun Sep 15 11:24:08 2013
@@ -22,9 +22,8 @@ import static org.junit.Assert.assertEqu
 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 static org.ops4j.pax.exam.CoreOptions.url;
 
 import javax.inject.Inject;
 
@@ -44,14 +43,14 @@ 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()),
+                url("link:classpath:org.apache.geronimo.specs.geronimo-activation_1.1_spec.link"),
+                url("link:classpath:org.apache.servicemix.specs.stax-api-1.0.link"),
+                url("link:classpath:stax2-api.link"),
+                url("link:classpath:woodstox-core-asl.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.axiom-impl.link"),
+                url("link:classpath:org.apache.ws.commons.axiom.axiom-dom.link"),
                 junitBundles(),
                 frameworkProperty("foo").value("bar"));
     }

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=1523428&r1=1523427&r2=1523428&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
Sun Sep 15 11:24:08 2013
@@ -21,9 +21,8 @@ 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 static org.ops4j.pax.exam.CoreOptions.url;
 
 import java.io.ByteArrayInputStream;
 
@@ -43,13 +42,13 @@ 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()),
+                url("link:classpath:org.apache.geronimo.specs.geronimo-activation_1.1_spec.link"),
+                url("link:classpath:org.apache.servicemix.specs.stax-api-1.0.link"),
+                url("link:classpath:stax2-api.link"),
+                url("link:classpath:woodstox-core-asl.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.axiom-impl.link"),
                 junitBundles(),
                 frameworkProperty("foo").value("bar"));
     }



Mime
View raw message