<?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="jar" 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="jar"> | |
<attainGoal name="multiproject:install"/> | |
<attainGoal name="create-jar"/> | |
<ant:copy file="target/lib/axis2-${pom.currentVersion}.jar" | |
toDir="target/"/> | |
</goal> | |
<goal name="init"> | |
<ant:mkdir dir="target"/> | |
<ant:mkdir dir="${dist.dir}"/> | |
<ant:mkdir dir="target/lib"/> | |
<uptodate property="jars.uptodate" targetfile="target/axis2.war"> | |
<srcfiles dir="modules"> | |
<include name="**/*.java"/> | |
<include name="**/*.xml"/> | |
<include name="**/*.wsdl"/> | |
<exclude name="**/traget/**"/> | |
</srcfiles> | |
</uptodate> | |
<echo message="the files are up to date = ${jars.uptodate}"></echo> | |
</goal> | |
<!-- ================================================================ --> | |
<!--- Clean the Repository --> | |
<!-- ================================================================ --> | |
<goal name="clean"> | |
<attainGoal name="multiproject:clean"/> | |
<delete dir="target"/> | |
<ant:delete > | |
<ant:fileset dir="."> | |
<ant:include name="**/axis.log"/> | |
<ant:include name="**/junit*.properties"/> | |
<ant:include name="**/temp.properties"/> | |
</ant:fileset> | |
</ant:delete> | |
</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-jar" prereqs="init"> | |
<jar destfile="target/lib/axis2-${pom.currentVersion}.jar"> | |
<fileset dir="modules/core/target/classes"/> | |
<fileset dir="modules/xml/target/classes"/> | |
<fileset dir="modules/wsdl/target/classes"/> | |
<fileset dir="modules/saaj/target/classes"/> | |
<fileset dir="modules/addressing/target/"> | |
<include name="modules/addressing.mar"/> | |
</fileset> | |
</jar> | |
</goal> | |
<goal name="create-lib" prereqs="create-jar"> | |
<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:include name="axis/jars/axis-wsdl4j-1.2.jar"/> | |
<ant:include name="geronimo-spec/jars/geronimo-spec-activation-1.0.2-rc3.jar"/> | |
</ant:fileset> | |
</ant:copy> | |
</goal> | |
<!-- ================================================================ --> | |
<!--- Create the War --> | |
<!-- ================================================================ --> | |
<goal name="war" prereqs="init"> | |
<j:if test="${jars.uptodate != 'yes'}"> | |
<attainGoal name="multiproject:install"/> | |
<attainGoal name="create-lib"/> | |
</j:if> | |
<!-- jar the test classes --> | |
<ant:war destfile="target/axis2.war" webxml="modules/core/conf/web.xml"> | |
<ant:fileset dir="modules/core/webapp"/> | |
<ant:lib dir="target/lib"> | |
<ant:include name="*.jar"/> | |
</ant:lib> | |
<ant:classes dir="modules/core/conf"> | |
<ant:include name="*.properties"/> | |
</ant:classes> | |
<ant:webinf dir="modules/samples/target/toWar/"/> | |
<ant:webinf dir="modules/core/src/org/apache/axis/deployment"/> | |
</ant:war> | |
</goal> | |
<!-- to transforme htmls to xdocs --> | |
<preGoal name="xdoc:jelly-transform"> | |
<attainGoal name="html2xdoc"/> | |
</preGoal> | |
<!-- ================================================================ --> | |
<!--- Create the Binary Distribution --> | |
<!-- ================================================================ --> | |
<goal name="dist-bin" prereqs="war,javadoc-gen,create-lib"> | |
<property name="bin.dist.dir" value="target/dist-bin/axis2-${pom.currentVersion}-bin"/> | |
<ant:mkdir dir="${bin.dist.dir}"/> | |
<ant:mkdir dir="${bin.dist.dir}/docs"/> | |
<ant:mkdir dir="${bin.dist.dir}/bin"/> | |
<ant:mkdir dir="${bin.dist.dir}/lib"/> | |
<ant:mkdir dir="${bin.dist.dir}/samples"/> | |
<ant:mkdir dir="${bin.dist.dir}/webapps"/> | |
<ant:mkdir dir="${bin.dist.dir}/docs/api"/> | |
<ant:copy todir="${bin.dist.dir}/docs/api"> | |
<ant:fileset dir="target/apidocs/"> | |
<ant:include name="**"/> | |
</ant:fileset> | |
</ant:copy> | |
<ant:copy todir="${bin.dist.dir}/docs"> | |
<ant:fileset dir="xdocs"> | |
<ant:include name="**"/> | |
<ant:exclude name="*M1*/**"/> | |
</ant:fileset> | |
</ant:copy> | |
<ant:copy todir="${bin.dist.dir}/lib" flatten="true"> | |
<ant:fileset dir="target/lib"> | |
<ant:include name="*.jar"/> | |
</ant:fileset> | |
</ant:copy> | |
<ant:copy file="target/axis2.war" tofile="${bin.dist.dir}/webapps/axis2.war"/> | |
<ant:copy file="modules/samples/script/build.xml" tofile="${bin.dist.dir}/samples/build.xml"/> | |
<ant:copy todir="${bin.dist.dir}/samples"> | |
<ant:fileset dir="modules/samples/conf/"> | |
<ant:include name="*.xml"/> | |
</ant:fileset> | |
</ant:copy> | |
<ant:copy todir="${bin.dist.dir}/samples"> | |
<ant:fileset dir="modules/samples/target/samples"> | |
<include name="**"/> | |
<exclude name="googleSearch"/> | |
</ant:fileset> | |
</ant:copy> | |
<ant:copy todir="${bin.dist.dir}/"> | |
<ant:fileset dir="."> | |
<ant:include name="*.html"/> | |
<ant:include name="*.txt"/> | |
</ant:fileset> | |
</ant:copy> | |
<ant:mkdir dir="${bin.dist.dir}/repository"/> | |
<ant:mkdir dir="${bin.dist.dir}/repository/services"/> | |
<ant:mkdir dir="${bin.dist.dir}/repository/modules"/> | |
<ant:copy todir="${bin.dist.dir}/repository"> | |
<ant:fileset dir="modules/samples/target/toWar/"> | |
<ant:include name="**"/> | |
</ant:fileset> | |
</ant:copy> | |
<ant:copy todir="${bin.dist.dir}/bin"> | |
<ant:fileset dir="modules/tool/script"/> | |
</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> | |
<!-- ================================================================ --> | |
<!--- Create the Source Distribution --> | |
<!-- ================================================================ --> | |
<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> | |
<!-- ================================================================ --> | |
<!--- Create the Java Docs --> | |
<!-- ================================================================ --> | |
<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"/> | |
<ant:pathelement location="modules/wsdl/src"/> | |
<ant:pathelement location="modules/xml/src"/> | |
</ant:sourcepath> | |
</ant:javadoc> | |
</goal> | |
</project> | |