| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| /* |
| * Copyright 2001-2004 The Apache Software Foundation. |
| * |
| * Licensed 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. |
| */ |
| --> |
| |
| <!-- |
| | The main goals for multi project build are: |
| | |
| | default |
| | Build all the modules |
| | |
| | clean |
| | Deletes the 'target' directory in all projects |
| |
| | clean-repo |
| | Deletes the 'target' directory in all projects |
| | |
| | war |
| | Build the war |
| | |
| | maven war-withsamples |
| | build the war with the default samples |
| | |
| | dist-src |
| | Source Distribution |
| | |
| | dist-bin |
| | Binary Distribution |
| | |
| --> |
| |
| <project default="multiproject:install" xmlns:m="jelly:maven" xmlns:ant="jelly:ant" xmlns:j="jelly:core"> |
| <j:set var="dist.name" value="${pom.artifactId}-${pom.currentVersion}"/> |
| <j:set var="dist.dir" value="target/dist"/> |
| |
| <goal name="init"> |
| <ant:mkdir dir="target"/> |
| <ant:mkdir dir="${dist.dir}"/> |
| <ant:mkdir dir="target/lib"/> |
| </goal> |
| |
| <goal name="clean"> |
| <attainGoal name="multiproject:clean"/> |
| <ant:delete dir="target"/> |
| </goal> |
| |
| <goal name="clean-repo"> |
| <ant:delete > |
| <ant:fileset dir="${maven.repo.local}"> |
| <ant:include name="axis/jars/axis2*.jar"/> |
| </ant:fileset> |
| </ant:delete> |
| </goal> |
| |
| <goal name="create-lib" prereqs="init"> |
| <ant:copy todir="target/lib" flatten="true"> |
| <ant:fileset dir="${maven.repo.local}"> |
| <ant:include name="stax/jars/stax-api-1.0.jar"/> |
| <ant:include name="stax/jars/stax-1.1.1-dev.jar"/> |
| <ant:include name="commons-logging/jars/commons-logging-1.0.3.jar"/> |
| <ant:include name="log4j/jars/log4j-1.2.8.jar"/> |
| <ant:include name="stax/jars/stax-1.1.1-dev.jar"/> |
| <ant:include name="commons-fileupload/jars/commons-fileupload-1.0.jar"/> |
| </ant:fileset> |
| <ant:fileset dir="modules"> |
| <ant:include name="**/target/axis2*.jar"/> |
| </ant:fileset> |
| </ant:copy> |
| |
| </goal> |
| |
| |
| <goal name="war" prereqs="multiproject:install,init,create-lib"> |
| <!-- jar the test classes --> |
| <ant:war destfile="target/axis2.war" webxml="modules/core/src/conf/web.xml"> |
| <ant:fileset dir="modules/core/src/html"/> |
| <ant:fileset dir="modules/samples/src/jsp"/> |
| <ant:lib dir="target/lib"> |
| <ant:include name="*.jar"/> |
| </ant:lib> |
| <ant:classes dir="modules/core/src/conf"> |
| <ant:include name="*.properties"/> |
| </ant:classes> |
| </ant:war> |
| </goal> |
| |
| <goal name="war-withsamples" prereqs="multiproject:install,init,create-lib"> |
| <!-- jar the test classes --> |
| <ant:mkdir dir="target"/> |
| <ant:war destfile="target/axis2.war" webxml="modules/core/src/conf/web.xml"> |
| <ant:fileset dir="modules/core/src/html"/> |
| <ant:fileset dir="modules/samples/src/jsp"/> |
| <ant:webinf dir="modules/samples/target/test-resources/samples"/> |
| <ant:lib dir="target/lib"> |
| <ant:include name="*.jar"/> |
| </ant:lib> |
| <ant:classes dir="modules/core/src/conf"> |
| <ant:include name="*.properties"/> |
| </ant:classes> |
| </ant:war> |
| </goal> |
| |
| <!-- to transforme htmls to xdocs --> |
| <preGoal name="xdoc:jelly-transform"> |
| <attainGoal name="html2xdoc"/> |
| </preGoal> |
| |
| <goal name="dist-bin" prereqs="war,javadoc-gen,create-lib"> |
| <ant:mkdir dir="target/dist-bin"/> |
| <ant:mkdir dir="target/dist-bin/docs"/> |
| <ant:mkdir dir="target/dist-bin/bin"/> |
| <ant:mkdir dir="target/dist-bin/lib"/> |
| <ant:mkdir dir="target/dist-bin/samples"/> |
| <ant:mkdir dir="target/dist-bin/webapps"/> |
| <ant:mkdir dir="target/dist-bin/docs/api"/> |
| <ant:copy todir="target/dist-bin/docs/api"> |
| <ant:fileset dir="target/apidocs/"> |
| <ant:include name="**"/> |
| </ant:fileset> |
| </ant:copy> |
| <ant:copy todir="target/dist-bin/docs"> |
| <ant:fileset dir="xdocs"> |
| <ant:include name="**"/> |
| </ant:fileset> |
| </ant:copy> |
| <ant:copy todir="target/dist-bin/lib" flatten="true"> |
| <ant:fileset dir="target/lib"> |
| <ant:include name="*.jar"/> |
| </ant:fileset> |
| </ant:copy> |
| <ant:copy file="target/axis2.war" tofile="target/dist-bin/webapps/axis2.war"/> |
| <ant:copy todir="target/dist-bin/samples"> |
| <ant:fileset dir="modules/samples/conf/"> |
| <ant:include name="*.xml"/> |
| </ant:fileset> |
| </ant:copy> |
| <ant:copy todir="target/dist-bin/samples"> |
| <ant:fileset dir="modules/samples/src/java"> |
| <ant:include name="userguide/**"/> |
| </ant:fileset> |
| </ant:copy> |
| <ant:copy todir="target/dist-bin/"> |
| <ant:fileset dir="."> |
| <ant:include name="*.html"/> |
| <ant:include name="*.txt"/> |
| </ant:fileset> |
| </ant:copy> |
| <ant:zip file="${dist.dir}/${dist.name}-bin.zip" basedir="target/dist-bin"/> |
| <ant:tar tarfile="target/${dist.name}-bin.tar" basedir="target/dist-bin"/> |
| <gzip src="target/${dist.name}-bin.tar" zipfile="${dist.dir}/${dist.name}-bin.tar.gz"/> |
| <ant:delete dir="target/dist-bin"/> |
| <ant:delete file="target/${dist.name}-bin.tar"/> |
| </goal> |
| |
| |
| <goal name="dist-src" prereqs="init"> |
| <ant:zip file="${dist.dir}/${dist.name}-src.zip" > |
| <ant:fileset dir="."> |
| <ant:include name="**"/> |
| <ant:exclude name="**/target/**"/> |
| <ant:exclude name="**/.svn/**"/> |
| <ant:exclude name="**/bin/**"/> |
| <ant:exclude name=".*"/> |
| <ant:exclude name="**/*.license"/> |
| </ant:fileset> |
| </ant:zip> |
| <ant:tar tarfile="target/${dist.name}-src.tar" longfile="gnu" > |
| <ant:tarfileset dir="."> |
| <ant:include name="**"/> |
| <ant:exclude name="**/target/**"/> |
| <ant:exclude name="**/.svn/**"/> |
| <ant:exclude name="**/bin/**"/> |
| <ant:exclude name=".*"/> |
| <ant:exclude name="**/*.license"/> |
| </ant:tarfileset> |
| </ant:tar> |
| <gzip src="target/${dist.name}-src.tar" zipfile="${dist.dir}/${dist.name}-src.tar.gz"/> |
| <ant:delete file="target/${dist.name}-src.tar"/> |
| </goal> |
| |
| <goal name="javadoc-gen" prereqs="init"> |
| <ant:javadoc packagenames="org.apache.axis.*" |
| defaultexcludes="yes" |
| destdir="target/apidocs" |
| author="true" |
| version="true" |
| use="true" |
| windowtitle="Axis2 API"> |
| <ant:sourcepath> |
| <ant:pathelement location="modules/core/src/java"/> |
| <ant:pathelement location="modules/deployment/src/java"/> |
| <ant:pathelement location="modules/wsdl/src/java"/> |
| <ant:pathelement location="modules/om/src/java"/> |
| </ant:sourcepath> |
| </ant:javadoc> |
| </goal> |
| |
| <preGoal name="multiproject:site"> |
| |
| <attainGoal name="war"/> |
| <attainGoal name="javadoc-gen"/> |
| <!-- attainGoal name="pdf"/ --> |
| <copy todir="target/docs/api"> |
| <fileset dir="target/apidocs" /> |
| </copy> |
| <copy file="target/axis2.war" tofile="target/docs/dist/axis2.war"/> |
| <!-- copy file="target/pdf/axis2.pdf" tofile="target/docs/axis2.pdf"/> |
| <ant:delete dir="target/pdf"/ --> |
| </preGoal> |
| </project> |
| |