Author: heiko.braun(a)jboss.com
Date: 2007-05-31 13:07:16 -0400 (Thu, 31 May 2007)
New Revision: 3345
Added:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java
trunk/jbossws-core/src/main/etc/log4j.properties
Modified:
trunk/integration/native/ant-import/macros-deploy-native.xml
trunk/integration/spi/etc/wsprovide.sh
trunk/integration/sunri/src/main/resources/jbossws-sunri-client.jar/META-INF/services/org.jboss.wsf.tools.ProviderFactoryImpl
trunk/jbossws-core/build.xml
trunk/jbossws-core/src/main/etc/wsprovide.sh
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/BytecodeWrapperGenerator.java
Log:
SunRIProviderImpl first cut
Modified: trunk/integration/native/ant-import/macros-deploy-native.xml
===================================================================
--- trunk/integration/native/ant-import/macros-deploy-native.xml 2007-05-31 17:00:16 UTC
(rev 3344)
+++ trunk/integration/native/ant-import/macros-deploy-native.xml 2007-05-31 17:07:16 UTC
(rev 3345)
@@ -45,6 +45,7 @@
<include name="wsdl4j.jar"/>
<include name="jaxws-tools.jar"/>
<include name="jaxws-rt.jar"/>
+ <include name="policy.jar"/>
</fileset>
</copy>
<copy todir="${jboss50.home}/lib" overwrite="true">
@@ -92,6 +93,7 @@
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
<include name="jbossws-client.jar"/>
+ <include name="policy.jar"/>
<include name="jbossws-integration-tools.jar"/>
<include name="jbossws-wsconsume-impl.jar"/>
@@ -152,6 +154,7 @@
<include name="wsdl4j.jar"/>
<include name="jaxws-tools.jar"/>
<include name="jaxws-rt.jar"/>
+ <include name="policy.jar"/>
</fileset>
</copy>
<copy todir="${jboss42.home}/server/${jboss.server.instance}/lib"
overwrite="true">
@@ -185,6 +188,7 @@
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
<include name="jboss-saaj.jar"/>
+ <include name="policy.jar"/>
<include name="jbossws-client.jar"/>
<include name="jbossws-integration-tools.jar"/>
<include name="jbossws-wsconsume-impl.jar"/>
Modified: trunk/integration/spi/etc/wsprovide.sh
===================================================================
--- trunk/integration/spi/etc/wsprovide.sh 2007-05-31 17:00:16 UTC (rev 3344)
+++ trunk/integration/spi/etc/wsprovide.sh 2007-05-31 17:07:16 UTC (rev 3345)
@@ -38,7 +38,7 @@
fi
#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
-#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y $JAVA_OPTS"
# Setup JBoss sepecific properties
JAVA_OPTS="$JAVA_OPTS"
@@ -58,9 +58,13 @@
#
# shared libs
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JAVA_HOME/lib/tools.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossws-spi.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/activation.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
+
+# TODO: verify jbossall-client.jar dependency. It might be just logging
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/mail.jar"
@@ -68,6 +72,8 @@
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxb-xjc.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxws-tools.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxws-rt.jar"
# stack specific dependencies
if [ "x$JBOSSWS_NATIVE" = "x" ]; then
@@ -81,7 +87,9 @@
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-jaxws.jar"
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-jaxrpc.jar"
- WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-saaj.jar"
+
WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-saaj.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/policy.jar"
+ WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/wsdl4j.jar"
fi
# For Cygwin, switch paths to Windows format before running java
Added:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java
(rev 0)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java 2007-05-31
17:07:16 UTC (rev 3345)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.tools;
+
+import org.jboss.wsf.spi.tools.WSContractProviderFactory;
+import org.jboss.wsf.spi.tools.WSContractProvider;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class SunRIProviderFactoryImpl implements WSContractProviderFactory
+{
+ public WSContractProvider createProvider(ClassLoader loader)
+ {
+ WSContractProvider sunRIProvider = new SunRIProviderImpl();
+ sunRIProvider.setClassLoader(loader);
+ return sunRIProvider;
+ }
+}
Property changes on:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderFactoryImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java
===================================================================
---
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java
(rev 0)
+++
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java 2007-05-31
17:07:16 UTC (rev 3345)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.stack.sunri.tools;
+
+import org.jboss.wsf.spi.tools.WSContractProvider;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.util.List;
+import java.util.ArrayList;
+import java.net.URLClassLoader;
+import java.net.URL;
+
+import com.sun.tools.ws.wscompile.WsgenTool;
+import com.sun.tools.ws.wscompile.WsgenOptions;
+
+/**
+ * @author Heiko.Braun(a)jboss.com
+ * @version $Revision$
+ */
+public class SunRIProviderImpl extends WSContractProvider
+{
+
+ private ClassLoader loader;
+ private boolean generateWsdl = false;
+ private boolean generateSource = false;
+ private File outputDir = new File("output");
+ private File resourceDir = null;
+ private File sourceDir = null;
+ private PrintStream messageStream = new NullPrintStream();
+
+ public SunRIProviderImpl()
+ {
+ }
+
+ public void setGenerateWsdl(boolean generateWsdl)
+ {
+ this.generateWsdl = generateWsdl;
+ }
+
+ public void setGenerateSource(boolean generateSource)
+ {
+ this.generateSource = generateSource;
+ }
+
+ public void setOutputDirectory(File directory)
+ {
+ this.outputDir = directory;
+ }
+
+ public void setResourceDirectory(File directory)
+ {
+ this.resourceDir = directory;
+ }
+
+ public void setSourceDirectory(File directory)
+ {
+ this.sourceDir = directory;
+ }
+
+ public void setClassLoader(ClassLoader loader)
+ {
+ this.loader = loader;
+ }
+
+ public void setMessageStream(PrintStream messageStream)
+ {
+ this.messageStream = messageStream;
+ }
+
+ public void provide(String endpointClass)
+ {
+ try
+ {
+ provide(loader.loadClass(endpointClass));
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new IllegalArgumentException("Class not found: " + endpointClass);
+ }
+ }
+
+ public void provide(Class<?> endpointClass)
+ {
+ // Swap the context classloader
+ // The '--classpath' switch might provide an URLClassLoader
+ ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
+
+ if(loader!=null)
+ Thread.currentThread().setContextClassLoader(loader);
+
+ try
+ {
+ List<String> args = new ArrayList<String>();
+
+ // Use the output directory as the default
+ File resourceDir = (this.resourceDir != null) ? this.resourceDir : outputDir;
+ File sourceDir = (this.sourceDir != null) ? this.sourceDir : outputDir;
+
+ if (generateSource) {
+ args.add("-keep");
+ if (sourceDir != null) {
+ if (!sourceDir.exists() && !sourceDir.mkdirs())
+ throw new IllegalStateException("Could not make directory: " +
sourceDir.getName());
+
+ args.add("-s");
+ args.add(sourceDir.getAbsolutePath());
+ }
+ }
+
+ // -d <directory>
+ if (!outputDir.exists() && !outputDir.mkdirs())
+ throw new IllegalStateException("Could not make directory: " +
outputDir.getName());
+
+ args.add("-d");
+ args.add(outputDir.getAbsolutePath());
+
+ // -r <directory>
+ if (resourceDir != null) {
+ if (!resourceDir.exists() && !resourceDir.mkdirs())
+ throw new IllegalStateException("Could not make directory: " +
resourceDir.getName());
+ args.add("-r");
+ args.add(resourceDir.getAbsolutePath());
+ }
+
+ // -s <directory>
+ if (sourceDir != null) {
+ if (!sourceDir.exists() && !sourceDir.mkdirs())
+ throw new IllegalStateException("Could not make directory: " +
sourceDir.getName());
+ args.add("-s");
+ args.add(sourceDir.getAbsolutePath());
+ }
+
+ // -verbose
+ PrintStream stream = messageStream;
+ if (stream != null) {
+ args.add("-verbose");
+ } else {
+ stream = new NullPrintStream();
+ }
+
+ // -wsdl[:protocol]
+ if (generateWsdl) {
+ args.add("-wsdl");
+ }
+
+ // --classpath
+ if(loader instanceof URLClassLoader)
+ {
+ StringBuilder builder = new StringBuilder();
+ URLClassLoader urlLoader = (URLClassLoader)loader;
+ for(URL url : urlLoader.getURLs())
+ {
+ builder.append(url.toExternalForm());
+ builder.append(File.pathSeparator);
+ }
+
+ args.add("-classpath");
+ args.add(builder.toString());
+ }
+
+ // the SEI
+ args.add(endpointClass.getCanonicalName());
+
+ WsgenTool tool = new WsgenTool(messageStream);
+ tool.run(args.toArray(new String[0]));
+
+ }
+ finally{
+ Thread.currentThread().setContextClassLoader(oldLoader);
+ }
+ }
+
+
+}
Property changes on:
trunk/integration/sunri/src/main/java/org/jboss/wsf/stack/sunri/tools/SunRIProviderImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
trunk/integration/sunri/src/main/resources/jbossws-sunri-client.jar/META-INF/services/org.jboss.wsf.tools.ProviderFactoryImpl
===================================================================
---
trunk/integration/sunri/src/main/resources/jbossws-sunri-client.jar/META-INF/services/org.jboss.wsf.tools.ProviderFactoryImpl 2007-05-31
17:00:16 UTC (rev 3344)
+++
trunk/integration/sunri/src/main/resources/jbossws-sunri-client.jar/META-INF/services/org.jboss.wsf.tools.ProviderFactoryImpl 2007-05-31
17:07:16 UTC (rev 3345)
@@ -1 +1 @@
-FIXME: JBWS-1667 (Implement WSContractProvider for Sun-RI integration)
\ No newline at end of file
+org.jboss.wsf.stack.sunri.tools.SunRIProviderFactoryImpl
\ No newline at end of file
Modified: trunk/jbossws-core/build.xml
===================================================================
--- trunk/jbossws-core/build.xml 2007-05-31 17:00:16 UTC (rev 3344)
+++ trunk/jbossws-core/build.xml 2007-05-31 17:07:16 UTC (rev 3345)
@@ -12,234 +12,237 @@
<!-- $Id$ -->
<project default="main" basedir="..">
-
- <import file="${basedir}/build/ant-import/build-setup.xml"/>
- <import file="${core.dir}/ant-import/build-deploy.xml"/>
- <import file="${core.dir}/ant-import/build-release.xml"/>
- <import file="${core.dir}/ant-import/build-thirdparty.xml"/>
- <import file="${core.dir}/ant-import-tests/build-testsuite.xml"/>
-
- <property name="core.src.dir" value="${core.dir}/src/main"/>
- <property name="core.etc.dir" value="${core.src.dir}/etc"/>
- <property name="core.java.dir"
value="${core.src.dir}/java"/>
- <property name="core.resources.dir"
value="${core.src.dir}/resources"/>
- <property name="core.samples.dir"
value="${core.resources.dir}/samples"/>
- <property name="core.output.dir"
value="${core.dir}/output"/>
- <property name="core.output.apidocs.dir"
value="${core.output.dir}/apidocs"/>
- <property name="core.output.etc.dir"
value="${core.output.dir}/etc"/>
- <property name="core.output.classes.dir"
value="${core.output.dir}/classes"/>
- <property name="core.output.classes14.dir"
value="${core.output.dir}/classes14"/>
- <property name="core.output.lib.dir"
value="${core.output.dir}/lib"/>
-
- <!-- Define jboss.home -->
- <condition property="jboss.home" value="${jboss50.home}">
- <equals arg1="${jbossws.integration.target}"
arg2="jboss50"/>
- </condition>
- <condition property="jboss.home" value="${jboss42.home}">
- <equals arg1="${jbossws.integration.target}"
arg2="jboss42"/>
- </condition>
-
- <target name="init" depends="prepare,thirdparty-get">
- <ant antfile="${spi.dir}/build.xml" target="main"
inheritall="false"/>
- </target>
-
- <!-- ================================================================== -->
- <!-- Compile -->
- <!-- ================================================================== -->
-
- <!--
- | Compile everything.
- |
- | This target should depend on other compile-* targets for each
- | different type of compile that needs to be performed, short of
- | documentation compiles.
- -->
-
- <target name="compile"
depends="init,compile-classes,compile-etc"
- description="Compile all source files."/>
-
- <!-- Compile java sources -->
- <target name="compile-classes" depends="init">
-
- <!-- Compile interfaces with jdk1.4 -->
- <mkdir dir="${core.output.classes14.dir}"/>
- <javac srcdir="${core.java.dir}"
destdir="${core.output.classes14.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
- failonerror="${javac.fail.onerror}" source="1.4"
target="1.4">
- <include name="javax/xml/rpc/**"/>
- <include name="javax/xml/soap/**"/>
- <classpath refid="thirdparty.classpath"/>
- </javac>
-
- <!-- Compile core classes with jdk1.5 -->
- <mkdir dir="${core.output.classes.dir}"/>
- <javac srcdir="${core.java.dir}" sourcepath=""
destdir="${core.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
- deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}" source="1.5"
target="1.5">
- <include name="javax/annotation/**"/>
- <include name="javax/xml/ws/**"/>
- <include name="javax/jws/**"/>
- <include name="org/jboss/annotation/**"/>
- <include name="org/jboss/ws/**"/>
- <classpath path="${core.output.classes14.dir}"/>
- <classpath refid="thirdparty.classpath"/>
- </javac>
- </target>
-
- <!-- Compile etc files (manifests and such) -->
- <target name="compile-etc" depends="init">
- <mkdir dir="${core.output.etc.dir}"/>
- <copy todir="${core.output.etc.dir}" filtering="yes">
- <fileset dir="${core.etc.dir}"/>
- <fileset dir="${build.dir}/etc">
- <include name="default.mf"/>
- </fileset>
- <filterset>
- <filter token="java.vm.version"
value="${java.vm.version}"/>
- <filter token="java.vm.vendor"
value="${java.vm.vendor}"/>
- <filter token="build.id" value="${build.id}"/>
- <filter token="implementation.version"
value="jbossws-${version.id}"/>
- <filtersfile file="${build.dir}/version.properties"/>
- <filtersfile file="${core.dir}/version.properties"/>
- </filterset>
- </copy>
- </target>
-
- <!-- ================================================================== -->
- <!-- Archives -->
- <!-- ================================================================== -->
-
- <!--
- | Build all jar files.
- -->
- <target name="jars" depends="compile,module-jars"
description="Builds all jar files.">
- </target>
-
- <!--
- | Build all jar files.
- -->
- <target name="module-jars">
-
- <!-- Build jboss-jaxrpc.jar -->
- <mkdir dir="${core.output.lib.dir}"/>
- <jar jarfile="${core.output.lib.dir}/jboss-jaxrpc.jar"
manifest="${core.output.etc.dir}/default.mf">
- <fileset dir="${core.output.classes14.dir}">
- <include name="javax/xml/rpc/**"/>
- </fileset>
- </jar>
-
- <!-- Build jboss-saaj.jar -->
- <mkdir dir="${core.output.lib.dir}"/>
- <jar jarfile="${core.output.lib.dir}/jboss-saaj.jar"
manifest="${core.output.etc.dir}/default.mf">
- <fileset dir="${core.output.classes14.dir}">
- <include name="javax/xml/soap/**"/>
- </fileset>
- <metainf dir="${core.resources.dir}/jboss-saaj.jar/META-INF"/>
- </jar>
-
- <!-- Build jboss-jaxws.jar -->
- <mkdir dir="${core.output.lib.dir}"/>
- <jar jarfile="${core.output.lib.dir}/jboss-jaxws.jar"
manifest="${core.output.etc.dir}/default.mf">
- <fileset dir="${core.output.classes.dir}">
- <include name="javax/annotation/**"/>
- <include name="javax/jws/**"/>
- <include name="javax/xml/ws/**"/>
- </fileset>
- <metainf dir="${core.resources.dir}/jboss-jaxws.jar/META-INF"/>
- </jar>
-
- <!-- Build jbossws-core.jar -->
- <mkdir dir="${core.output.lib.dir}"/>
- <jar jarfile="${core.output.lib.dir}/jbossws-core.jar"
manifest="${core.output.etc.dir}/default.mf">
- <fileset dir="${core.output.classes.dir}">
- <include name="org/jboss/annotation/**"/>
- <include name="org/jboss/ws/**"/>
- </fileset>
- <fileset dir="${core.resources.dir}">
- <include name="schema/**"/>
- <include name="dtd/**"/>
- </fileset>
- <metainf dir="${core.resources.dir}/jbossws-core.jar"/>
- </jar>
-
- <!-- Build jbossws-client.jar -->
- <jar jarfile="${core.output.lib.dir}/jbossws-client.jar"
manifest="${core.output.etc.dir}/default.mf">
- <fileset dir="${core.output.classes.dir}">
- <include name="org/jboss/wsf/**"/>
- <include name="org/jboss/ws/**"/>
- </fileset>
- <fileset dir="${core.resources.dir}">
- <include name="schema/**"/>
- <include name="dtd/**"/>
- </fileset>
- <metainf dir="${core.resources.dir}/standard-config">
- <include name="standard-jaxrpc-client-config.xml"/>
- <include name="standard-jaxws-client-config.xml"/>
- </metainf>
- </jar>
+ <import file="${basedir}/build/ant-import/build-setup.xml"/>
- <!-- Build jbossws-resources.zip -->
- <zip zipfile="${core.output.lib.dir}/jbossws-resources.zip" >
- <fileset dir="${core.resources.dir}/standard-config">
- <include name="standard-*-config.xml"/>
- </fileset>
- <fileset dir="${core.output.etc.dir}">
- <include name="wsprovide.bat"/>
- <include name="wsconsume.bat"/>
- <include name="wsrunclient.bat"/>
- <include name="wstools.bat"/>
- </fileset>
- <zipfileset dir="${core.output.etc.dir}" filemode="755">
- <include name="wsprovide.sh"/>
- <include name="wsconsume.sh"/>
- <include name="wsrunclient.sh"/>
- <include name="wstools.sh"/>
- </zipfileset>
- </zip>
-
- <!-- Build jbossws-src.zip -->
- <zip zipfile="${core.output.lib.dir}/jbossws-core-src.zip" >
- <fileset dir="${core.java.dir}"/>
- </zip>
-
- </target>
-
- <!-- ================================================================== -->
- <!-- Documentation -->
- <!-- ================================================================== -->
+ <import file="${core.dir}/ant-import/build-deploy.xml"/>
+ <import file="${core.dir}/ant-import/build-release.xml"/>
+ <import file="${core.dir}/ant-import/build-thirdparty.xml"/>
+ <import file="${core.dir}/ant-import-tests/build-testsuite.xml"/>
- <!-- Generate the JavaDoc -->
- <target name="javadoc" depends="init"
description="Generate the Javadoc">
+ <property name="core.src.dir" value="${core.dir}/src/main"/>
+ <property name="core.etc.dir" value="${core.src.dir}/etc"/>
+ <property name="core.java.dir" value="${core.src.dir}/java"/>
+ <property name="core.resources.dir"
value="${core.src.dir}/resources"/>
+ <property name="core.samples.dir"
value="${core.resources.dir}/samples"/>
+ <property name="core.output.dir" value="${core.dir}/output"/>
+ <property name="core.output.apidocs.dir"
value="${core.output.dir}/apidocs"/>
+ <property name="core.output.etc.dir"
value="${core.output.dir}/etc"/>
+ <property name="core.output.classes.dir"
value="${core.output.dir}/classes"/>
+ <property name="core.output.classes14.dir"
value="${core.output.dir}/classes14"/>
+ <property name="core.output.lib.dir"
value="${core.output.dir}/lib"/>
- <mkdir dir="${core.output.apidocs.dir}"/>
- <javadoc destdir="${core.output.apidocs.dir}" author="true"
version="true" use="true" windowtitle="JBossWS API">
- <classpath refid="core.classpath"/>
- <packageset dir="${core.java.dir}"
defaultexcludes="yes">
- <include name="org/jboss/ws/**"/>
- </packageset>
- <doctitle><![CDATA[<h1>JBossWS</h1>]]></doctitle>
- <tag name="todo" scope="all" description="To
do:"/>
- <group title="Core" packages="org.jboss.ws.core*"/>
- <group title="Metadata"
packages="org.jboss.ws.metadata*"/>
- <group title="Integration"
packages="org.jboss.ws.integration*"/>
- <group title="Extensions"
packages="org.jboss.ws.extensions*"/>
- <group title="Tools" packages="org.jboss.ws.tools*"/>
- </javadoc>
- </target>
-
- <target name="clean" depends="prepare" description="Cleans
up most generated files.">
- <delete dir="${core.output.dir}"/>
- </target>
-
- <target name="clobber" depends="clean" description="Cleans
up all generated files.">
- <delete dir="${core.dir}/output-tests"/>
- <delete dir="${core.dir}/thirdparty"/>
- </target>
-
- <target name="main" description="Executes the default target
(most)." depends="most"/>
-
- <target name="most" description="Builds almost everything."
depends="jars,tests-jars"/>
-
- <target name="all" description="Create a distribution zip file"
depends="most">
- </target>
-
+ <!-- Define jboss.home -->
+ <condition property="jboss.home" value="${jboss50.home}">
+ <equals arg1="${jbossws.integration.target}"
arg2="jboss50"/>
+ </condition>
+ <condition property="jboss.home" value="${jboss42.home}">
+ <equals arg1="${jbossws.integration.target}"
arg2="jboss42"/>
+ </condition>
+
+ <target name="init" depends="prepare,thirdparty-get">
+ <ant antfile="${spi.dir}/build.xml" target="main"
inheritall="false"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Compile -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Compile everything.
+ |
+ | This target should depend on other compile-* targets for each
+ | different type of compile that needs to be performed, short of
+ | documentation compiles.
+ -->
+
+ <target name="compile"
depends="init,compile-classes,compile-etc"
+ description="Compile all source files."/>
+
+ <!-- Compile java sources -->
+ <target name="compile-classes" depends="init">
+
+ <!-- Compile interfaces with jdk1.4 -->
+ <mkdir dir="${core.output.classes14.dir}"/>
+ <javac srcdir="${core.java.dir}"
destdir="${core.output.classes14.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
deprecation="${javac.deprecation}"
+ failonerror="${javac.fail.onerror}" source="1.4"
target="1.4">
+ <include name="javax/xml/rpc/**"/>
+ <include name="javax/xml/soap/**"/>
+ <classpath refid="thirdparty.classpath"/>
+ </javac>
+
+ <!-- Compile core classes with jdk1.5 -->
+ <mkdir dir="${core.output.classes.dir}"/>
+ <javac srcdir="${core.java.dir}" sourcepath=""
destdir="${core.output.classes.dir}" encoding="utf-8"
debug="${javac.debug}" verbose="${javac.verbose}"
+ deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}" source="1.5"
target="1.5">
+ <include name="javax/annotation/**"/>
+ <include name="javax/xml/ws/**"/>
+ <include name="javax/jws/**"/>
+ <include name="org/jboss/annotation/**"/>
+ <include name="org/jboss/ws/**"/>
+ <classpath path="${core.output.classes14.dir}"/>
+ <classpath refid="thirdparty.classpath"/>
+ </javac>
+ </target>
+
+ <!-- Compile etc files (manifests and such) -->
+ <target name="compile-etc" depends="init">
+ <mkdir dir="${core.output.etc.dir}"/>
+ <copy todir="${core.output.etc.dir}" filtering="yes">
+ <fileset dir="${core.etc.dir}"/>
+ <fileset dir="${build.dir}/etc">
+ <include name="default.mf"/>
+ </fileset>
+ <filterset>
+ <filter token="java.vm.version"
value="${java.vm.version}"/>
+ <filter token="java.vm.vendor" value="${java.vm.vendor}"/>
+ <filter token="build.id" value="${build.id}"/>
+ <filter token="implementation.version"
value="jbossws-${version.id}"/>
+ <filtersfile file="${build.dir}/version.properties"/>
+ <filtersfile file="${core.dir}/version.properties"/>
+ </filterset>
+ </copy>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Archives -->
+ <!-- ================================================================== -->
+
+ <!--
+ | Build all jar files.
+ -->
+ <target name="jars" depends="compile,module-jars"
description="Builds all jar files.">
+ </target>
+
+ <!--
+ | Build all jar files.
+ -->
+ <target name="module-jars">
+
+ <!-- Build jboss-jaxrpc.jar -->
+ <mkdir dir="${core.output.lib.dir}"/>
+ <jar jarfile="${core.output.lib.dir}/jboss-jaxrpc.jar"
manifest="${core.output.etc.dir}/default.mf">
+ <fileset dir="${core.output.classes14.dir}">
+ <include name="javax/xml/rpc/**"/>
+ </fileset>
+ </jar>
+
+ <!-- Build jboss-saaj.jar -->
+ <mkdir dir="${core.output.lib.dir}"/>
+ <jar jarfile="${core.output.lib.dir}/jboss-saaj.jar"
manifest="${core.output.etc.dir}/default.mf">
+ <fileset dir="${core.output.classes14.dir}">
+ <include name="javax/xml/soap/**"/>
+ </fileset>
+ <metainf dir="${core.resources.dir}/jboss-saaj.jar/META-INF"/>
+ </jar>
+
+ <!-- Build jboss-jaxws.jar -->
+ <mkdir dir="${core.output.lib.dir}"/>
+ <jar jarfile="${core.output.lib.dir}/jboss-jaxws.jar"
manifest="${core.output.etc.dir}/default.mf">
+ <fileset dir="${core.output.classes.dir}">
+ <include name="javax/annotation/**"/>
+ <include name="javax/jws/**"/>
+ <include name="javax/xml/ws/**"/>
+ </fileset>
+ <metainf dir="${core.resources.dir}/jboss-jaxws.jar/META-INF"/>
+ </jar>
+
+ <!-- Build jbossws-core.jar -->
+ <mkdir dir="${core.output.lib.dir}"/>
+ <jar jarfile="${core.output.lib.dir}/jbossws-core.jar"
manifest="${core.output.etc.dir}/default.mf">
+ <fileset dir="${core.output.classes.dir}">
+ <include name="org/jboss/annotation/**"/>
+ <include name="org/jboss/ws/**"/>
+ </fileset>
+ <fileset dir="${core.resources.dir}">
+ <include name="schema/**"/>
+ <include name="dtd/**"/>
+ </fileset>
+ <metainf dir="${core.resources.dir}/jbossws-core.jar"/>
+ </jar>
+
+ <!-- Build jbossws-client.jar -->
+ <jar jarfile="${core.output.lib.dir}/jbossws-client.jar"
manifest="${core.output.etc.dir}/default.mf">
+ <fileset dir="${core.output.classes.dir}">
+ <include name="org/jboss/wsf/**"/>
+ <include name="org/jboss/ws/**"/>
+ </fileset>
+ <fileset dir="${core.resources.dir}">
+ <include name="schema/**"/>
+ <include name="dtd/**"/>
+ </fileset>
+ <fileset dir="${core.etc.dir}">
+ <include name="log4j.properties"/>
+ </fileset>
+ <metainf dir="${core.resources.dir}/standard-config">
+ <include name="standard-jaxrpc-client-config.xml"/>
+ <include name="standard-jaxws-client-config.xml"/>
+ </metainf>
+ </jar>
+
+ <!-- Build jbossws-resources.zip -->
+ <zip zipfile="${core.output.lib.dir}/jbossws-resources.zip" >
+ <fileset dir="${core.resources.dir}/standard-config">
+ <include name="standard-*-config.xml"/>
+ </fileset>
+ <fileset dir="${core.output.etc.dir}">
+ <include name="wsprovide.bat"/>
+ <include name="wsconsume.bat"/>
+ <include name="wsrunclient.bat"/>
+ <include name="wstools.bat"/>
+ </fileset>
+ <zipfileset dir="${core.output.etc.dir}" filemode="755">
+ <include name="wsprovide.sh"/>
+ <include name="wsconsume.sh"/>
+ <include name="wsrunclient.sh"/>
+ <include name="wstools.sh"/>
+ </zipfileset>
+ </zip>
+
+ <!-- Build jbossws-src.zip -->
+ <zip zipfile="${core.output.lib.dir}/jbossws-core-src.zip" >
+ <fileset dir="${core.java.dir}"/>
+ </zip>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Documentation -->
+ <!-- ================================================================== -->
+
+ <!-- Generate the JavaDoc -->
+ <target name="javadoc" depends="init" description="Generate
the Javadoc">
+
+ <mkdir dir="${core.output.apidocs.dir}"/>
+ <javadoc destdir="${core.output.apidocs.dir}" author="true"
version="true" use="true" windowtitle="JBossWS API">
+ <classpath refid="core.classpath"/>
+ <packageset dir="${core.java.dir}" defaultexcludes="yes">
+ <include name="org/jboss/ws/**"/>
+ </packageset>
+ <doctitle><![CDATA[<h1>JBossWS</h1>]]></doctitle>
+ <tag name="todo" scope="all" description="To
do:"/>
+ <group title="Core" packages="org.jboss.ws.core*"/>
+ <group title="Metadata" packages="org.jboss.ws.metadata*"/>
+ <group title="Integration"
packages="org.jboss.ws.integration*"/>
+ <group title="Extensions"
packages="org.jboss.ws.extensions*"/>
+ <group title="Tools" packages="org.jboss.ws.tools*"/>
+ </javadoc>
+ </target>
+
+ <target name="clean" depends="prepare" description="Cleans
up most generated files.">
+ <delete dir="${core.output.dir}"/>
+ </target>
+
+ <target name="clobber" depends="clean" description="Cleans
up all generated files.">
+ <delete dir="${core.dir}/output-tests"/>
+ <delete dir="${core.dir}/thirdparty"/>
+ </target>
+
+ <target name="main" description="Executes the default target
(most)." depends="most"/>
+
+ <target name="most" description="Builds almost everything."
depends="jars,tests-jars"/>
+
+ <target name="all" description="Create a distribution zip file"
depends="most">
+ </target>
+
</project>
Added: trunk/jbossws-core/src/main/etc/log4j.properties
===================================================================
--- trunk/jbossws-core/src/main/etc/log4j.properties (rev 0)
+++ trunk/jbossws-core/src/main/etc/log4j.properties 2007-05-31 17:07:16 UTC (rev 3345)
@@ -0,0 +1,15 @@
+
+#
+# The default JAX-WS tools logging config
+# Should be shipped with jbossws-client.jar
+#
+# @author Heiko.Braun(a)jboss.com
+#
+
+log4j.rootLogger=debug, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+
+# Pattern to output the caller's file name and line number.
+log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
Property changes on: trunk/jbossws-core/src/main/etc/log4j.properties
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/jbossws-core/src/main/etc/wsprovide.sh
===================================================================
--- trunk/jbossws-core/src/main/etc/wsprovide.sh 2007-05-31 17:00:16 UTC (rev 3344)
+++ trunk/jbossws-core/src/main/etc/wsprovide.sh 2007-05-31 17:07:16 UTC (rev 3345)
@@ -38,7 +38,7 @@
fi
#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
-#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y $JAVA_OPTS"
# Setup JBoss sepecific properties
JAVA_OPTS="$JAVA_OPTS"
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/BytecodeWrapperGenerator.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/BytecodeWrapperGenerator.java 2007-05-31
17:00:16 UTC (rev 3344)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/BytecodeWrapperGenerator.java 2007-05-31
17:07:16 UTC (rev 3345)
@@ -71,7 +71,14 @@
public void write(File directory) throws IOException
{
- stream.println("Writing Classes:");
+
+ if(typeNames.isEmpty())
+ {
+ System.out.println("No Classes to generate...");
+ return;
+ }
+
+ stream.println("Writing Classes:");
for (String name : typeNames)
{
try