Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 11437 invoked from network); 24 Feb 2011 08:45:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Feb 2011 08:45:05 -0000 Received: (qmail 58752 invoked by uid 500); 24 Feb 2011 08:45:05 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 58401 invoked by uid 500); 24 Feb 2011 08:45:02 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 58394 invoked by uid 99); 24 Feb 2011 08:45:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Feb 2011 08:45:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Feb 2011 08:45:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A801E238896F; Thu, 24 Feb 2011 08:44:40 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: scm@geronimo.apache.org From: xuhaihong@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110224084440.A801E238896F@eris.apache.org> 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 @@ org.apache.karaf.shell.console + + org.apache.xbean + xbean-classloader + + - + 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 @@ com.sun.xml.bind jaxb-xjc + + + com.sun.xml.ws + policy + 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 @@ geronimo-jaxws geronimo-jaxws-builder geronimo-jaxws-ejb-builder - + geronimo-jaxws-sun-tools jaxws-deployer jaxws-ejb-deployer - - + jaxws-sun-tools + jaxws-tools @@ -108,6 +108,30 @@ + + + com.sun.xml.ws + policy + 2.2.2 + + + javax.xml.stream + stax-api + + + com.sun.xml.txw2 + txw2 + + + com.sun.istack + istack-commons-runtime + + + org.codehaus.woodstox + wstx-asl + + + com.sun.xml.stream.buffer 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 @@ 3.1 1.6 1.6 - 2.2_2-SNAPSHOT + 2.2_2_1-SNAPSHOT ${project.version} 1.5.3 @@ -522,6 +522,12 @@ xbean-asm-shaded ${xbeanVersion} + + + org.apache.xbean + xbean-classloader + ${xbeanVersion} + commons-vfs