| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- $Revision: 1.21 $ $Date: 2004-10-27 20:54:09 +0600 (Wed, 27 Oct 2004) $ --> | |
| <project default="jar" | |
| xmlns:j="jelly:core" | |
| xmlns:u="jelly:util" | |
| xmlns:maven="jelly:maven" | |
| xmlns:util="jelly:util" | |
| xmlns:deploy="deploy" | |
| xmlns:ant="jelly:ant"> | |
| <preGoal name="itest:compile"> | |
| <u:file var="file" name="${maven.itest.src}"/> | |
| <j:if test="${!file.exists()}"> | |
| <j:expr value="${context.setVariable('maven.itest.skip', 'true')}"/> | |
| </j:if> | |
| </preGoal> | |
| <!-- run the JAXB schema compiler --> | |
| <preGoal name="test:compile"> | |
| <!--<j:if test="context.getVariable('maven.test.skip') != 'true'}">--> | |
| <j:set var="compiled.classes.dir" value="target/test-classes"/> | |
| <!-- Theres got to be a better way to do this --> | |
| <j:set var="schema.source.dir" value="test-resources/xsd"/> | |
| <j:set var="wsdl.source.dir" value="test-resources/wsdl"/> | |
| <j:set var="schema.output.base.dir" value="target/schema"/> | |
| <j:set var="schema.generated.src.dir" value="${schema.output.base.dir}/src"/> | |
| <j:set var="schema.generated.classes.dir" value="${schema.output.base.dir}/classes"/> | |
| <!-- make the dirs --> | |
| <mkdir dir="${schema.output.base.dir}"/> | |
| <mkdir dir="${schema.generated.src.dir}"/> | |
| <mkdir dir="${schema.generated.classes.dir}"/> | |
| <!-- Run JAXB schema compiler with designated schemas --> | |
| <ant:echo>Generating JAX-B classes from XSDs</ant:echo> | |
| <ant:echo>Generating java from echo.xsd</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -quiet ${schema.source.dir}/echo.xsd"/> | |
| </java> | |
| <ant:echo>Generating java from stock1.xsd</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -verbose ${schema.source.dir}/stock1.xsd"/> | |
| </java> | |
| <ant:echo>Generating java from stock2.xsd</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -quiet ${schema.source.dir}/stock2.xsd"/> | |
| </java> | |
| <ant:echo>Generating java from samplemtom.xsd</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -quiet ${schema.source.dir}/samplemtom.xsd"/> | |
| </java> | |
| <ant:echo>Generating java from ProxyDocLitWrapped.wsdl</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -p org.test.proxy.doclitwrapped -quiet -wsdl ${wsdl.source.dir}/ProxyDocLitWrapped.wsdl"/> | |
| </java> | |
| <ant:echo>Generating java from ProxyDocLitnonWrapped.wsdl</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/ProxyDocLitnonWrapped.wsdl"/> | |
| </java> | |
| <ant:echo>Generating java from AddNumbers.wsdl</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/AddNumbers.wsdl"/> | |
| </java> | |
| <ant:echo>Generating java from jaxbsource</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -p org.test.dispatch.jaxbsource ${schema.source.dir}/jaxbsource.xsd"/> | |
| </java> | |
| <ant:echo>Generating java from doclit_nonwrap.wsdl for javabean endpoint support</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/doclit_nonwrap.wsdl"/> | |
| </java> | |
| <ant:echo>Generating java from doclitwrap.wsdl for javabean endpoint support</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/doclitwrap.wsdl"/> | |
| </java> | |
| <ant:echo>Generating java from doclitbare.wsdl for javabean endpoint support</ant:echo> | |
| <java classname="com.sun.tools.xjc.Driver" fork="true"> | |
| <jvmarg line="${maven.junit.jvmargs}"/> | |
| <classpath refid="maven.dependency.classpath"/> | |
| <classpath location="${compiled.classes.dir}"/> | |
| <arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/doclitbare.wsdl"/> | |
| </java> | |
| <!-- Compile the generated classes --> | |
| <ant:echo>Compiling generated schema</ant:echo> | |
| <javac destdir="${schema.generated.classes.dir}" srcdir="${schema.generated.src.dir}"> | |
| <classpath refid="maven.dependency.classpath"></classpath> | |
| <classpath location="${compiled.classes.dir}"></classpath> | |
| </javac> | |
| <ant:path id="schema.generated.classes.dir" location="${schema.generated.classes.dir}"/> | |
| <maven:addPath id="maven.dependency.classpath" refid="schema.generated.classes.dir"/> | |
| <!--</j:if>--> | |
| </preGoal> | |
| <preGoal name="test:test"> | |
| <ant:copy toDir="target/test-classes/services/EchoService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="server/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/server"> | |
| <ant:exclude name="**/*.java"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <!-- ================================================================ --> | |
| <!--- Provider endpoint Service Samples --> | |
| <!-- ================================================================ --> | |
| <ant:copy toDir="target/test-classes/services/StringProviderService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/provider/string/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/provider/string"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/StringMessageProviderService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/provider/stringmsg/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/provider/stringmsg"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/SourceProviderService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/provider/source/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/provider/source"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/SourceMessageProviderService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/provider/sourcemsg/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/provider/sourcemsg"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/SoapMessageProviderService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/provider/soapmsg/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/provider/soapmsg"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/JAXBProviderService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/provider/jaxb/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/provider/jaxb"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/schema/classes"> | |
| <ant:include name="org/test/mtom/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/SOAP12Service/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/dispatch/server/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/dispatch/server"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <!-- ================================================================ --> | |
| <!--- Proxy endpoint Service Samples --> | |
| <!-- ================================================================ --> | |
| <ant:copy toDir="target/test-classes/services/ProxyDocLitWrapped/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/proxy/doclitwrapped/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/proxy/doclitwrapped"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/ProxyDocLitnonWrapped/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/proxy/doclitnonwrapped/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/proxy/doclitnonwrapped"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <!-- ================================================================ --> | |
| <!--- Java Bean Endpoint Samples --> | |
| <!-- ================================================================ --> | |
| <ant:copy toDir="target/test-classes/services/AddressBookService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/sample/addressbook/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/sample/addressbook"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/MtomSampleService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/sample/mtom/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/sample/mtom"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/DocLitNonWrapService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/sample/nonwrap/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/sample/nonwrap"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/DocLitWrapService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/sample/wrap/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/sample/wrap"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/AddNumbersService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/sample/addnumbers/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/sample/addnumbers"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <ant:copy toDir="target/test-classes/services/BareDocLitService/"> | |
| <ant:fileset dir="target/test-classes"> | |
| <ant:include name="org/apache/axis2/jaxws/sample/doclitbare/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="test/org/apache/axis2/jaxws/sample/doclitbare"> | |
| <ant:include name="META-INF/**"/> | |
| </ant:fileset> | |
| <ant:fileset dir="target/classes"> | |
| <ant:include name="org/apache/axis2/jaxws/server/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| </preGoal> | |
| <!-- Create the API and Impl jars --> | |
| <postGoal name="jar"> | |
| <jar destfile="target/axis2-jaxws-api-${jaxws.version}.jar"> | |
| <ant:fileset dir="target/classes"> | |
| <ant:exclude name="com/ibm/webservices/**"/> | |
| </ant:fileset> | |
| </jar> | |
| <jar destfile="target/axis2-jaxws-impl-${jaxws.version}.jar"> | |
| <ant:fileset dir="target/classes"> | |
| <ant:exclude name="javax/**"/> | |
| </ant:fileset> | |
| </jar> | |
| <ant:copy toDir="${maven.repo.local}/org.apache.axis2/jars"> | |
| <ant:fileset file="target/axis2-jaxws-impl-${jaxws.version}.jar"/> | |
| <ant:fileset file="target/axis2-jaxws-api-${jaxws.version}.jar"/> | |
| </ant:copy> | |
| </postGoal> | |
| <goal name="jar"> | |
| <attainGoal name="jar:install"/> | |
| </goal> | |
| <goal name="release" prereqs="dist-bin,dist-src"> | |
| </goal> | |
| <goal name="dist-bin" prereqs="jar"> | |
| <ant:echo>+----------------------------------------------</ant:echo> | |
| <ant:echo>| Creating: JAXWS Binary Distribution</ant:echo> | |
| <ant:echo>+----------------------------------------------</ant:echo> | |
| <property name="dist" value="target/dist/temp"/> | |
| <mkdir dir="${dist}"/> | |
| <mkdir dir="${dist}/apidocs"/> | |
| <mkdir dir="${dist}/build"/> | |
| <!--<mkdir dir="${dist}/docs"/>--> | |
| <mkdir dir="${dist}/lib"/> | |
| <!--copy dependent jars--> | |
| <maven:reactor basedir="${basedir}" | |
| postProcessing="true" | |
| includes="project.xml" | |
| banner="Executing (${goals}):" | |
| ignoreFailures="false"/> | |
| <j:forEach var="x" items="${reactorProjects}"> | |
| <ant:echo message="Copying ${x} to ${dist}"/> | |
| <deploy:copy-deps todir="${dist}/lib" | |
| projectDescriptor="${x.getFile()}"/> | |
| </j:forEach> | |
| <ant:delete file="${dist}/lib/xmlunit-${xmlunit.version}.jar"/> | |
| <!--Add the licenses of jars--> | |
| <ant:copy toDir="${dist}/lib"> | |
| <ant:fileset dir="legal"/> | |
| </ant:copy> | |
| <!--add api docs--> | |
| <ant:javadoc packagenames="org.apache.jaxws.*" | |
| defaultexcludes="yes" | |
| destdir="${dist}/apidocs" | |
| author="true" | |
| breakiterator="true" | |
| version="true" | |
| use="true" | |
| windowtitle="JAXWS API"> | |
| <ant:arg | |
| line="-J-Dhttp.proxy.port=${maven.proxy.port} -J-Dhttp.proxy.host=${maven.proxy.host}"/> | |
| <ant:sourcepath> | |
| <ant:pathelement location="src"/> | |
| </ant:sourcepath> | |
| <ant:classpath> | |
| <ant:fileset dir="${dist}/lib"> | |
| <ant:include name="*.jar"/> | |
| </ant:fileset> | |
| </ant:classpath> | |
| </ant:javadoc> | |
| <!--add jars--> | |
| <ant:copy toDir="${dist}/build"> | |
| <ant:fileset file="target/axis2-jaxws-api-${jaxws.version}.jar"/> | |
| <ant:fileset file="target/axis2-jaxws-impl-${jaxws.version}.jar"/> | |
| </ant:copy> | |
| <!--add documents--> | |
| <ant:copy toDir="${dist}/docs"> | |
| <ant:fileset dir="xdocs"> | |
| <ant:exclude name="**/.svn/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <!--copy release notes, etc--> | |
| <ant:copy toDir="${dist}"> | |
| <ant:fileset file="RELEASE-NOTE.txt"/> | |
| <ant:fileset file="README.txt"/> | |
| <ant:fileset file="NOTICE.txt"/> | |
| <ant:fileset file="LICENSE.txt"/> | |
| </ant:copy> | |
| <!--create the zip--> | |
| <ant:zip file="target/dist/jaxws-${jaxws.version}-bin.zip"> | |
| <ant:fileset dir="${dist}/"/> | |
| </ant:zip> | |
| <ant:delete dir="${dist}"/> | |
| </goal> | |
| <goal name="dist-src" prereqs="jar"> | |
| <ant:echo>+----------------------------------------------</ant:echo> | |
| <ant:echo>| Creating: JAXWS Source Distribution</ant:echo> | |
| <ant:echo>+----------------------------------------------</ant:echo> | |
| <ant:property name="${dist}" value="target/dist/temp"/> | |
| <ant:copy toDir="${dist}"> | |
| <ant:fileset dir="."> | |
| <ant:exclude name="**/.svn/**"/> | |
| <ant:include name="**/src/**"/> | |
| <ant:include name="**/test/**"/> | |
| </ant:fileset> | |
| </ant:copy> | |
| <!-- Copy the master maven files for the standard src distro --> | |
| <ant:copy toDir="${dist}"> | |
| <ant:fileset file="maven.xml"/> | |
| <ant:fileset file="project.xml"/> | |
| <ant:fileset file="project.properties"/> | |
| <ant:fileset file="RELEASE-NOTE.txt"/> | |
| <ant:fileset file="NOTICE.txt"/> | |
| <ant:fileset file="LICENSE.txt"/> | |
| </ant:copy> | |
| <ant:zip file="target/dist/jaxws-${jaxws.version}-src.zip"> | |
| <ant:fileset dir="${dist}/"/> | |
| </ant:zip> | |
| <ant:delete dir="${dist}"/> | |
| </goal> | |
| <goal name="javadocs"> | |
| <mkdir dir="target/apidocs"/> | |
| <ant:javadoc packagenames="org.apache.jaxws.*" | |
| defaultexcludes="yes" | |
| destdir="target/apidocs" | |
| author="true" | |
| breakiterator="true" | |
| version="true" | |
| use="true" | |
| windowtitle="JAXWS API"> | |
| <ant:arg | |
| line="-J-Dhttp.proxy.port=${maven.proxy.port} -J-Dhttp.proxy.host=${maven.proxy.host}"/> | |
| <ant:sourcepath> | |
| <ant:pathelement location="src"/> | |
| </ant:sourcepath> | |
| </ant:javadoc> | |
| </goal> | |
| <postGoal name="java:jar-resources"> | |
| <tstamp> | |
| <format property="build.time" pattern="MMM dd, yyyy (hh:mm:ss z)" locale="en"/> | |
| </tstamp> | |
| <replace dir="${maven.build.dest}/org/apache/axis2/jaxws/i18n"> | |
| <include name="resource*.properties"/> | |
| <replacefilter token="#today#" value="${build.time}"/> | |
| <replacefilter token="#axisVersion#" value="${pom.currentVersion}"/> | |
| </replace> | |
| </postGoal> | |
| </project> |