ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r1030695 - in /webservices/xmlschema/trunk: ./ xmlschema-bundle-test/ xmlschema-bundle-test/src/ xmlschema-bundle-test/src/test/ xmlschema-bundle-test/src/test/java/ xmlschema-bundle-test/src/test/java/org/ xmlschema-bundle-test/src/test/ja...
Date Wed, 03 Nov 2010 21:22:36 GMT
Author: bimargulies
Date: Wed Nov  3 21:22:35 2010
New Revision: 1030695

URL: http://svn.apache.org/viewvc?rev=1030695&view=rev
Log:
Actually test that the OSGi bundle is not a joke.

Added:
    webservices/xmlschema/trunk/.gitignore   (with props)
    webservices/xmlschema/trunk/xmlschema-bundle-test/
    webservices/xmlschema/trunk/xmlschema-bundle-test/pom.xml   (with props)
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/bundletest/
    webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/bundletest/XmlSchemaBundleTest.java
  (with props)
    webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/internal/
    webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/internal/DummyInternalClass.java
  (with props)
Modified:
    webservices/xmlschema/trunk/pom.xml
    webservices/xmlschema/trunk/xmlschema-core/pom.xml

Added: webservices/xmlschema/trunk/.gitignore
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/.gitignore?rev=1030695&view=auto
==============================================================================
--- webservices/xmlschema/trunk/.gitignore (added)
+++ webservices/xmlschema/trunk/.gitignore Wed Nov  3 21:22:35 2010
@@ -0,0 +1,29 @@
+target/
+w3c-testcases/.checkstyle
+w3c-testcases/.classpath
+w3c-testcases/.pmd
+w3c-testcases/.project
+w3c-testcases/.ruleset
+w3c-testcases/.settings/
+w3c-testcases/target/
+xmlschema-bundle-test/.checkstyle
+xmlschema-bundle-test/.classpath
+xmlschema-bundle-test/.pmd
+xmlschema-bundle-test/.project
+xmlschema-bundle-test/.ruleset
+xmlschema-bundle-test/.settings/
+xmlschema-bundle-test/target/
+xmlschema-core/.checkstyle
+xmlschema-core/.classpath
+xmlschema-core/.pmd
+xmlschema-core/.project
+xmlschema-core/.ruleset
+xmlschema-core/.settings/
+xmlschema-core/target/
+xmlschema-eclipse/.checkstyle
+xmlschema-eclipse/.classpath
+xmlschema-eclipse/.pmd
+xmlschema-eclipse/.project
+xmlschema-eclipse/.ruleset
+xmlschema-eclipse/.settings/
+xmlschema-eclipse/target/

Propchange: webservices/xmlschema/trunk/.gitignore
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/xmlschema/trunk/.gitignore
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: webservices/xmlschema/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/pom.xml?rev=1030695&r1=1030694&r2=1030695&view=diff
==============================================================================
--- webservices/xmlschema/trunk/pom.xml (original)
+++ webservices/xmlschema/trunk/pom.xml Wed Nov  3 21:22:35 2010
@@ -74,6 +74,7 @@
     <modules>
         <module>xmlschema-eclipse</module>
         <module>xmlschema-core</module>
+	<module>xmlschema-bundle-test</module>
         <module>w3c-testcases</module>
     </modules>
     <build>
@@ -84,6 +85,7 @@
                     <artifactId>maven-release-plugin</artifactId>
                     <version>2.0</version>
                     <configuration>
+		        <arguments/> <!-- knock out apache parent nonsense -->
                         <useReleaseProfiles>true</useReleaseProfiles>
                         <goals>deploy</goals>
                     </configuration>

Added: webservices/xmlschema/trunk/xmlschema-bundle-test/pom.xml
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-bundle-test/pom.xml?rev=1030695&view=auto
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-bundle-test/pom.xml (added)
+++ webservices/xmlschema/trunk/xmlschema-bundle-test/pom.xml Wed Nov  3 21:22:35 2010
@@ -0,0 +1,66 @@
+<?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.xmlschema</groupId>
+        <artifactId>xmlschema</artifactId>
+        <version>2.0-SNAPSHOT</version>
+    </parent>
+    <groupId>org.apache.ws.xmlschema</groupId>
+    <artifactId>xmlschema-bundle-test</artifactId>
+    <packaging>jar</packaging>
+    <name>XmlSchema OSGi bundle test</name>
+    <version>2.0-SNAPSHOT</version>
+    <build>
+        <defaultGoal>install</defaultGoal>
+    </build>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.ws.xmlschema</groupId>
+            <artifactId>xmlschema-core</artifactId>
+            <version>2.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <version>1.0.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-default</artifactId>
+            <version>1.0.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit</artifactId>
+            <version>1.0.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

Propchange: webservices/xmlschema/trunk/xmlschema-bundle-test/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/xmlschema/trunk/xmlschema-bundle-test/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/bundletest/XmlSchemaBundleTest.java
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/bundletest/XmlSchemaBundleTest.java?rev=1030695&view=auto
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/bundletest/XmlSchemaBundleTest.java
(added)
+++ webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/bundletest/XmlSchemaBundleTest.java
Wed Nov  3 21:22:35 2010
@@ -0,0 +1,61 @@
+/**
+ * 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.ws.xmlschema.bundletest;
+
+import junit.framework.Assert;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.internal.DummyInternalClass;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Inject;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ *
+ */
+@RunWith(JUnit4TestRunner.class)
+public class XmlSchemaBundleTest {
+
+    @Configuration
+    public static Option[] configuration()
+    {
+       return CoreOptions.options(CoreOptions.felix(), CoreOptions.provision(
+         CoreOptions.mavenBundle().groupId("org.apache.ws.xmlschema").artifactId("xmlschema-core")
+       ));
+    }
+
+    @Test(expected = java.lang.NoClassDefFoundError.class)
+    public void testInternalsExcluded() {
+        new DummyInternalClass();
+    }
+
+    @Test
+    public void testSchemaAvailable() {
+        XmlSchemaCollection collection = new XmlSchemaCollection();
+        Assert.assertNotNull(collection);
+    }
+}

Propchange: webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/bundletest/XmlSchemaBundleTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/xmlschema/trunk/xmlschema-bundle-test/src/test/java/org/apache/ws/xmlschema/bundletest/XmlSchemaBundleTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: webservices/xmlschema/trunk/xmlschema-core/pom.xml
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-core/pom.xml?rev=1030695&r1=1030694&r2=1030695&view=diff
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-core/pom.xml (original)
+++ webservices/xmlschema/trunk/xmlschema-core/pom.xml Wed Nov  3 21:22:35 2010
@@ -7,9 +7,9 @@
   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
@@ -66,21 +66,10 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Import-Package>org.apache.ws.commons.schema*;version=${project.version},*</Import-Package>
-                        <Export-Package>org.apache.ws.commons.schema*;version="${project.version}"</Export-Package>
+                        <Export-Package>!org.apache.ws.commons.schema.internal,org.apache.ws.commons.schema*;version=${project.version}</Export-Package>
                     </instructions>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <version>2.2</version>
-                <configuration>
-                    <archive>
-                        <manifestFile>target/classes/META-INF/MANIFEST.MF</manifestFile>
-                    </archive>
-                </configuration>
-            </plugin>
         </plugins>
         <defaultGoal>install</defaultGoal>
     </build>

Added: webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/internal/DummyInternalClass.java
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/internal/DummyInternalClass.java?rev=1030695&view=auto
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/internal/DummyInternalClass.java
(added)
+++ webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/internal/DummyInternalClass.java
Wed Nov  3 21:22:35 2010
@@ -0,0 +1,29 @@
+/**
+ * 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.ws.commons.schema.internal;
+
+/**
+ * This class exists to allow testing of XmlSchema as an OSGi Bundle.
+ */
+public class DummyInternalClass {
+    public DummyInternalClass() {
+        //
+    }
+}

Propchange: webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/internal/DummyInternalClass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/internal/DummyInternalClass.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message