geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1074073 - in /geronimo/server/trunk: ./ plugins/jaxws/ plugins/jaxws/geronimo-jaxws-sun-tools/ plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/ plugins/jaxws/jaxws-sun-tools/
Date Thu, 24 Feb 2011 08:44:40 GMT
Author: xuhaihong
Date: Thu Feb 24 08:44:40 2011
New Revision: 1074073

URL: http://svn.apache.org/viewvc?rev=1074073&view=rev
Log:
Recover wsimport and wsgen commands, but we might find a way to manage those ri jars, actually
they are not required to be installed in the OSGi runtime

Modified:
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/pom.xml
    geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java
    geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml
    geronimo/server/trunk/plugins/jaxws/pom.xml
    geronimo/server/trunk/pom.xml

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/pom.xml?rev=1074073&r1=1074072&r2=1074073&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/pom.xml (original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/pom.xml Thu Feb 24 08:44:40
2011
@@ -46,22 +46,28 @@
             <artifactId>org.apache.karaf.shell.console</artifactId>
         </dependency>
         
+        <dependency>
+            <groupId>org.apache.xbean</groupId>
+            <artifactId>xbean-classloader</artifactId>                
+        </dependency>
+        
     </dependencies>
 
-    <!--<build>
+    <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.geronimo.gshell</groupId>
-                <artifactId>gshell-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>descriptor</goal>
-                        </goals>
-                    </execution>
-                </executions>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>
+                            org.osgi.service.command;version="0.4.0",                   
        
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
             </plugin>
         </plugins>
     </build>
 
---></project>
+    </project>

Modified: geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java?rev=1074073&r1=1074072&r2=1074073&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java
(original)
+++ geronimo/server/trunk/plugins/jaxws/geronimo-jaxws-sun-tools/src/main/java/org/apache/geronimo/jaxws/sun/tools/JAXWSTools.java
Thu Feb 24 08:44:40 2011
@@ -26,14 +26,14 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.SortedSet;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.geronimo.kernel.classloader.TemporaryClassLoader;
 import org.apache.geronimo.kernel.config.Os;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ListableRepository;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.repository.Version;
+import org.apache.xbean.classloader.JarFileClassLoader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class JAXWSTools {
 
@@ -48,6 +48,7 @@ public class JAXWSTools {
         { "com.sun.xml.bind", "jaxb-xjc" },
         { "com.sun.xml.ws",   "jaxws-tools" },
         { "com.sun.xml.ws",   "jaxws-rt" },
+        { "com.sun.xml.ws",   "policy" },
         { "com.sun.xml.stream.buffer",    "streambuffer" },
         { "org.jvnet.staxex",             "stax-ex" },
         { "org.apache.geronimo.javamail", "geronimo-javamail_1.4_mail"},
@@ -66,7 +67,13 @@ public class JAXWSTools {
         { "org.apache.geronimo.modules",  "geronimo-webservices" },
     };
 
-    private final static Artifact SUN_SAAJ_IMPL_ARTIFACT = new Artifact("com.sun.xml.messaging.saaj","saaj-impl",
(Version)null, "jar");
+    private final static String[] HIDDEN_CLASSES =
+    {
+        "javax.xml.bind",
+        "javax.xml.ws"
+    };
+
+    private final static Artifact SUN_SAAJ_IMPL_ARTIFACT = new Artifact("org.apache.geronimo.bundles","saaj-impl",
(Version)null, "jar");
     private final static Artifact AXIS2_SAAJ_IMPL_ARTIFACT = new Artifact("org.apache.geronimo.bundles","axis2",
(Version)null, "jar");
     private final static String TOOLS = "tools.jar";
 
@@ -193,17 +200,22 @@ public class JAXWSTools {
     }
 
     private boolean invoke(String toolName, URL[] jars, OutputStream os, String[] arguments)
throws Exception {
-        TemporaryClassLoader loader = new TemporaryClassLoader(jars, ClassLoader.getSystemClassLoader());
+        ClassLoader oldClassLoader = null;
+        JarFileClassLoader loader = new JarFileClassLoader(null, jars, ClassLoader.getSystemClassLoader(),
false, HIDDEN_CLASSES, new String[0]);
         if (overrideContextClassLoader) {
-            ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
+            oldClassLoader = Thread.currentThread().getContextClassLoader();
             Thread.currentThread().setContextClassLoader(loader);
-            try {
-                return invoke(toolName, loader, os, arguments);
-            } finally {
+        }
+        try {
+            return invoke(toolName, loader, os, arguments);
+        } finally {
+            if (overrideContextClassLoader) {
                 Thread.currentThread().setContextClassLoader(oldClassLoader);
             }
-        } else {
-             return invoke(toolName, loader, os, arguments);
+            try {
+                loader.destroy();
+            } catch (Exception e) {
+            }
         }
     }
 

Modified: geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml?rev=1074073&r1=1074072&r2=1074073&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml (original)
+++ geronimo/server/trunk/plugins/jaxws/jaxws-sun-tools/pom.xml Thu Feb 24 08:44:40 2011
@@ -75,6 +75,11 @@
             <groupId>com.sun.xml.bind</groupId>
             <artifactId>jaxb-xjc</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>com.sun.xml.ws</groupId>
+            <artifactId>policy</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

Modified: geronimo/server/trunk/plugins/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jaxws/pom.xml?rev=1074073&r1=1074072&r2=1074073&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jaxws/pom.xml (original)
+++ geronimo/server/trunk/plugins/jaxws/pom.xml Thu Feb 24 08:44:40 2011
@@ -40,11 +40,11 @@
         <module>geronimo-jaxws</module>
         <module>geronimo-jaxws-builder</module>
         <module>geronimo-jaxws-ejb-builder</module>
-        <!--module>geronimo-jaxws-sun-tools</module-->
+        <module>geronimo-jaxws-sun-tools</module>
         <module>jaxws-deployer</module>
         <module>jaxws-ejb-deployer</module>
-        <!--module>jaxws-sun-tools</module-->
-        <!--module>jaxws-tools</module-->
+        <module>jaxws-sun-tools</module>
+        <module>jaxws-tools</module>
     </modules>
     
     <dependencyManagement>
@@ -108,6 +108,30 @@
                     </exclusion>
                 </exclusions>
             </dependency>
+            
+            <dependency>
+                <groupId>com.sun.xml.ws</groupId>
+                <artifactId>policy</artifactId>
+                <version>2.2.2</version>
+                <exclusions>
+                    <exclusion>
+                        <groupId>javax.xml.stream</groupId>
+                        <artifactId>stax-api</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>com.sun.xml.txw2</groupId>
+                        <artifactId>txw2</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>com.sun.istack</groupId>
+                        <artifactId>istack-commons-runtime</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.codehaus.woodstox</groupId>
+                        <artifactId>wstx-asl</artifactId>                   
    
+                    </exclusion>
+                </exclusions>
+            </dependency>
 
             <dependency>
                 <groupId>com.sun.xml.stream.buffer</groupId>

Modified: geronimo/server/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/pom.xml?rev=1074073&r1=1074072&r2=1074073&view=diff
==============================================================================
--- geronimo/server/trunk/pom.xml (original)
+++ geronimo/server/trunk/pom.xml Thu Feb 24 08:44:40 2011
@@ -82,7 +82,7 @@
         <txmanagerVersion>3.1</txmanagerVersion>
         <tranqlVersion>1.6</tranqlVersion>
         <tranqlDerbyVersion>1.6</tranqlDerbyVersion>
-        <jaxbImplVersion>2.2_2-SNAPSHOT</jaxbImplVersion>
+        <jaxbImplVersion>2.2_2_1-SNAPSHOT</jaxbImplVersion>
 
         <monitoringConsoleVersion>${project.version}</monitoringConsoleVersion>
         <pax.logging.version>1.5.3</pax.logging.version>
@@ -522,6 +522,12 @@
                 <artifactId>xbean-asm-shaded</artifactId>
                 <version>${xbeanVersion}</version>
             </dependency>
+            
+            <dependency>
+                <groupId>org.apache.xbean</groupId>
+                <artifactId>xbean-classloader</artifactId>
+                <version>${xbeanVersion}</version>
+            </dependency>
 
             <dependency>
                 <groupId>commons-vfs</groupId>



Mime
View raw message