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/29 13:47:35 UTC
svn commit: r1527308 - in /webservices/axiom/trunk: ./ modules/axiom-api/
modules/axiom-api/src/main/java/org/apache/axiom/locator/
modules/axiom-dom/ modules/axiom-impl/ systests/ systests/eclipse-tests/
systests/eclipse-tests/src/ systests/eclipse-te...
Author: veithen
Date: Sun Sep 29 11:47:34 2013
New Revision: 1527308
URL: http://svn.apache.org/r1527308
Log:
Ensure that Axiom works well when used on the Eclipse platform.
Added:
webservices/axiom/trunk/systests/eclipse-tests/ (with props)
webservices/axiom/trunk/systests/eclipse-tests/pom.xml (with props)
webservices/axiom/trunk/systests/eclipse-tests/src/
webservices/axiom/trunk/systests/eclipse-tests/src/it/
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/ (with props)
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.classpath
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.project
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.settings/
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.settings/org.eclipse.jdt.core.prefs
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/META-INF/
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/META-INF/MANIFEST.MF
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/build.properties
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/pom.xml (with props)
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/prebuild.groovy
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/src/
webservices/axiom/trunk/systests/eclipse-tests/src/it/project/src/EclipseTest.java (with props)
Modified:
webservices/axiom/trunk/modules/axiom-api/pom.xml
webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/Activator.java
webservices/axiom/trunk/modules/axiom-dom/pom.xml
webservices/axiom/trunk/modules/axiom-impl/pom.xml
webservices/axiom/trunk/pom.xml
webservices/axiom/trunk/systests/pom.xml
Modified: webservices/axiom/trunk/modules/axiom-api/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-api/pom.xml?rev=1527308&r1=1527307&r2=1527308&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-api/pom.xml (original)
+++ webservices/axiom/trunk/modules/axiom-api/pom.xml Sun Sep 29 11:47:34 2013
@@ -213,6 +213,12 @@
*
</Import-Package>
<Bundle-Activator>org.apache.axiom.locator.Activator</Bundle-Activator>
+ <!-- On the Eclipse platform, bundles are initially not started. However,
+ bundles with lazy activation are started automatically when the first
+ class is loaded. Using this activation policy ensures that Axiom can
+ be used out of the box with Eclipse plug-ins (for the IDE or in an RCP
+ application). -->
+ <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
</instructions>
</configuration>
</plugin>
Modified: webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/Activator.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/Activator.java?rev=1527308&r1=1527307&r2=1527308&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/Activator.java (original)
+++ webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/locator/Activator.java Sun Sep 29 11:47:34 2013
@@ -37,7 +37,9 @@ public class Activator implements Bundle
public void start(BundleContext context) throws Exception {
OSGiOMMetaFactoryLocator locator = new OSGiOMMetaFactoryLocator(context);
OMAbstractFactory.setMetaFactoryLocator(locator);
- tracker = new BundleTracker(context, Bundle.ACTIVE, locator);
+ // Bundle.STARTING covers the case where the implementation bundle has
+ // "Bundle-ActivationPolicy: lazy".
+ tracker = new BundleTracker(context, Bundle.STARTING | Bundle.ACTIVE, locator);
tracker.open();
// In an OSGi environment, the thread context class loader is generally not set in a meaningful way.
// Therefore we should use singleton factories. Note that if the StAX API is provided by Geronimo's or
Modified: webservices/axiom/trunk/modules/axiom-dom/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-dom/pom.xml?rev=1527308&r1=1527307&r2=1527308&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-dom/pom.xml (original)
+++ webservices/axiom/trunk/modules/axiom-dom/pom.xml Sun Sep 29 11:47:34 2013
@@ -119,6 +119,7 @@
<instructions>
<_nouses>true</_nouses>
<Private-Package>org.apache.axiom.*</Private-Package>
+ <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
</instructions>
</configuration>
</plugin>
Modified: webservices/axiom/trunk/modules/axiom-impl/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-impl/pom.xml?rev=1527308&r1=1527307&r2=1527308&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-impl/pom.xml (original)
+++ webservices/axiom/trunk/modules/axiom-impl/pom.xml Sun Sep 29 11:47:34 2013
@@ -113,6 +113,7 @@
<instructions>
<_nouses>true</_nouses>
<Private-Package>org.apache.axiom.*</Private-Package>
+ <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
</instructions>
</configuration>
</plugin>
Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1527308&r1=1527307&r2=1527308&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sun Sep 29 11:47:34 2013
@@ -517,24 +517,24 @@
<goals>
<goal>enforce</goal>
</goals>
- <configuration>
- <rules>
- <requireJavaVersion>
- <!-- We require Java 6 for the build, but we enforce Java 5 compatibility using Animal Sniffer -->
- <version>1.6.0</version>
- </requireJavaVersion>
- <requireNoRepositories>
- <message>The POM must not include repository definitions since non Apache repositories threaten the build stability.</message>
- <banRepositories>true</banRepositories>
- <banPluginRepositories>true</banPluginRepositories>
- <!-- We still need to allow the Apache snapshot repository -->
- <allowSnapshotRepositories>true</allowSnapshotRepositories>
- <allowSnapshotPluginRepositories>true</allowSnapshotPluginRepositories>
- </requireNoRepositories>
- </rules>
- </configuration>
</execution>
</executions>
+ <configuration>
+ <rules>
+ <requireJavaVersion>
+ <!-- We require Java 6 for the build, but we enforce Java 5 compatibility using Animal Sniffer -->
+ <version>1.6.0</version>
+ </requireJavaVersion>
+ <requireNoRepositories>
+ <message>The POM must not include repository definitions since non Apache repositories threaten the build stability.</message>
+ <banRepositories>true</banRepositories>
+ <banPluginRepositories>true</banPluginRepositories>
+ <!-- We still need to allow the Apache snapshot repository -->
+ <allowSnapshotRepositories>true</allowSnapshotRepositories>
+ <allowSnapshotPluginRepositories>true</allowSnapshotPluginRepositories>
+ </requireNoRepositories>
+ </rules>
+ </configuration>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
Propchange: webservices/axiom/trunk/systests/eclipse-tests/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Sep 29 11:47:34 2013
@@ -0,0 +1 @@
+target
Added: webservices/axiom/trunk/systests/eclipse-tests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/pom.xml?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/pom.xml (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/pom.xml Sun Sep 29 11:47:34 2013
@@ -0,0 +1,138 @@
+<?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>systests</artifactId>
+ <version>1.2.15-SNAPSHOT</version>
+ </parent>
+ <artifactId>eclipse-tests</artifactId>
+ <name>Eclipse Tests</name>
+ <description>Contains test cases that verify that the Axiom OSGi bundles are usable out of the box by Eclipse plug-ins.</description>
+ <packaging>pom</packaging>
+ <properties>
+ <tycho-version>0.18.1</tycho-version>
+ </properties>
+ <dependencies>
+ <!-- We declare dependencies here to guarantee that the build order is correct.
+ The dependencies will be inherited by the test project (src/it/project). -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-api</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.1_spec</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-dom</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <!-- Need this to pass information to the hook scripts. Once maven-invoker-plugin 1.9 is released,
+ we no longer need this; see MINVOKER-119. -->
+ <id>generate-invoker-script-properties</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ import java.io.*
+ import java.util.*
+
+ dir = new File(project.build.directory, "it")
+ dir.mkdirs()
+ props = new Properties()
+ props.setProperty("version", project.version)
+ stream = new FileOutputStream(new File(dir, "script.properties"))
+ props.store(stream, null)
+ stream.close()
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.8</version>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <!-- Instead of executing the Tycho eclipse-test-plugin project directly, we use the invoker plugin.
+ There are multiple reasons for that:
+ * The test project depends on axiom-api, axiom-impl and axiom-dom. If they are executed
+ in the same reactor, then Tycho will fail because axiom-api, axiom-impl and axiom-dom are
+ plain Maven projects. The reason is that the P2 resolver has no way to know the packages
+ exported by these projects.
+ * In a Tycho project, the Bundle-Version in the manifest must match the POM version.
+ On the other hand, maven-release-plugin only updates the POM. That would break
+ the automated release process.
+ * It prevents maven-eclipse-plugin from messing with the test project.
+ -->
+ <id>integration-test</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <streamLogs>true</streamLogs>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <!-- Don't need license headers for Eclipse project files -->
+ <exclude>src/it/*/.project</exclude>
+ <exclude>src/it/*/.classpath</exclude>
+ <exclude>src/it/*/.settings/**</exclude>
+ <exclude>src/it/*/build.properties</exclude>
+ <!-- Manifests can't contain comments -->
+ <exclude>src/it/*/META-INF/MANIFEST.MF</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: webservices/axiom/trunk/systests/eclipse-tests/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Sep 29 11:47:34 2013
@@ -0,0 +1 @@
+bin
Added: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.classpath
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.classpath?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.classpath (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.classpath Sun Sep 29 11:47:34 2013
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.project
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.project?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.project (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.project Sun Sep 29 11:47:34 2013
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>eclipse-tests-project</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.settings/org.eclipse.jdt.core.prefs?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.settings/org.eclipse.jdt.core.prefs (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/src/it/project/.settings/org.eclipse.jdt.core.prefs Sun Sep 29 11:47:34 2013
@@ -0,0 +1,8 @@
+#Sun Sep 22 11:46:26 CEST 2013
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/src/it/project/META-INF/MANIFEST.MF?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/src/it/project/META-INF/MANIFEST.MF (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/src/it/project/META-INF/MANIFEST.MF Sun Sep 29 11:47:34 2013
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: eclipse-tests-project
+Bundle-Version: 0.0.0
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.apache.axiom.om,
+ org.apache.axiom.om.dom
+Require-Bundle: org.junit;bundle-version="[4.0.0,5.0.0)"
Added: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/build.properties
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/src/it/project/build.properties?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/src/it/project/build.properties (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/src/it/project/build.properties Sun Sep 29 11:47:34 2013
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/src/it/project/pom.xml?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/src/it/project/pom.xml (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/src/it/project/pom.xml Sun Sep 29 11:47:34 2013
@@ -0,0 +1,89 @@
+<?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>@project.groupId@</groupId>
+ <artifactId>eclipse-tests</artifactId>
+ <version>@project.version@</version>
+ <relativePath>../../../pom.xml</relativePath>
+ </parent>
+ <artifactId>eclipse-tests-project</artifactId>
+ <packaging>eclipse-test-plugin</packaging>
+ <repositories>
+ <repository>
+ <id>kepler</id>
+ <layout>p2</layout>
+ <!-- Note that http://download.eclipse.org/releases/kepler is a combined repository that
+ also contains the services releases. It is therefore not stable, i.e. its content
+ may change over time. To avoid that, we use the repository that contains the
+ original release artifacts. -->
+ <url>http://download.eclipse.org/releases/kepler/201306260900</url>
+ </repository>
+ </repositories>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <configuration>
+ <rules>
+ <requireNoRepositories>
+ <!-- We need the Eclipse P2 repository for one of the Eclipse releases. If we select the
+ repository carefully, then it is reasonable to assume that this doesn't threaten
+ the build stability. -->
+ <banRepositories>false</banRepositories>
+ </requireNoRepositories>
+ </rules>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <pomDependencies>consider</pomDependencies>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <dependencies>
+ <dependency>
+ <type>eclipse-plugin</type>
+ <artifactId>org.apache.ws.commons.axiom.axiom-impl</artifactId>
+ </dependency>
+ <dependency>
+ <type>eclipse-plugin</type>
+ <artifactId>org.apache.ws.commons.axiom.axiom-dom</artifactId>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/prebuild.groovy
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/src/it/project/prebuild.groovy?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/src/it/project/prebuild.groovy (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/src/it/project/prebuild.groovy Sun Sep 29 11:47:34 2013
@@ -0,0 +1,48 @@
+/*
+ * 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.
+ */
+
+// This script adjusts the Bundle-Version in META-INF/MANIFEST.MF. It is needed because:
+// * Filtering is only supported for POM files (see MINVOKER-117).
+// * Tycho complains if there is a version mismatch between the POM and the manifest.
+// * The test project must have the same version as the main project. The reason is that
+// we want the main project to be the parent of the test project. If the versions don't
+// match, then ${project.version} will be substituted by the wrong value.
+
+import java.io.*
+import java.util.*
+import java.util.jar.*
+
+stream = new FileInputStream(new File(basedir, "../script.properties"))
+props = new Properties()
+props.load(stream)
+stream.close()
+
+version = props.getProperty("version").replace("-SNAPSHOT", ".qualifier")
+
+manifestFile = new File(basedir, "META-INF/MANIFEST.MF")
+
+stream = new FileInputStream(manifestFile)
+manifest = new Manifest(stream)
+stream.close()
+
+manifest.mainAttributes.putValue("Bundle-Version", version)
+
+stream = new FileOutputStream(manifestFile)
+manifest.write(stream)
+stream.close()
Added: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/src/EclipseTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/eclipse-tests/src/it/project/src/EclipseTest.java?rev=1527308&view=auto
==============================================================================
--- webservices/axiom/trunk/systests/eclipse-tests/src/it/project/src/EclipseTest.java (added)
+++ webservices/axiom/trunk/systests/eclipse-tests/src/it/project/src/EclipseTest.java Sun Sep 29 11:47:34 2013
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+import static org.junit.Assert.assertEquals;
+
+import java.io.StringReader;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMXMLBuilderFactory;
+import org.apache.axiom.om.dom.DOMMetaFactory;
+import org.junit.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * Tests that Axiom works out of the box in an Eclipse platform.
+ */
+public class EclipseTest {
+ @Test
+ public void testLLOM() {
+ OMElement element = OMXMLBuilderFactory.createOMBuilder(new StringReader("<ns:test xmlns:ns='urn:ns'>test</ns:test>")).getDocumentElement();
+ assertEquals(new QName("urn:ns", "test"), element.getQName());
+ }
+
+ @Test
+ public void testDOOM() throws Exception {
+ DOMMetaFactory metaFactory = (DOMMetaFactory)OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
+ Document document = metaFactory.newDocumentBuilderFactory().newDocumentBuilder().newDocument();
+ Element element = document.createElementNS("urn:test", "p:root");
+ assertEquals(new QName("urn:test", "root"), ((OMElement)element).getQName());
+ }
+}
Propchange: webservices/axiom/trunk/systests/eclipse-tests/src/it/project/src/EclipseTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axiom/trunk/systests/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/systests/pom.xml?rev=1527308&r1=1527307&r2=1527308&view=diff
==============================================================================
--- webservices/axiom/trunk/systests/pom.xml (original)
+++ webservices/axiom/trunk/systests/pom.xml Sun Sep 29 11:47:34 2013
@@ -46,6 +46,7 @@
</plugins>
</build>
<modules>
+ <module>eclipse-tests</module>
<module>jboss-tests</module>
<module>osgi-tests</module>
<module>spring-ws-tests</module>