blob: 5f5da7c686e148214b52eef10e89f3b7a920be51 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project default="default" xmlns:j="jelly:core" xmlns:maven="jelly:maven" xmlns:deploy="deploy" xmlns:ant="jelly:ant">
<j:set var="dist.name" value="${pom.artifactId}-${sandesha2.version}"/>
<j:set var="dist.module.name" value="${pom.artifactId}-${sandesha2.module.version}"/>
<j:set var="test.module.name" value="${pom.artifactId}-UnitTest"/>
<ant:property name="build.dist.dir" value="${maven.build.dir}/dist"/>
<ant:property name="build.temp.dir" value="${maven.build.dir}/temp"/>
<ant:property name="build.classes.dir" value="${maven.build.dir}/classes"/>
<ant:property name="build.repo.dir" value="${maven.build.dir}/repos"/>
<ant:property name="build.samples.dir" value="${maven.build.dir}/samples"/>
<ant:property name="build.samples.services.dir" value="${build.samples.dir}/services"/>
<ant:property name="build.samples.clients.dir" value="${build.samples.dir}/clients"/>
<ant:property name="build.interop.dir" value="${maven.build.dir}/interop"/>
<ant:property name="mar.name" value="${dist.module.name}.mar"/>
<ant:property name="policy.jar.name" value="${pom.artifactId}-policy-${sandesha2.version}.jar"/>
<ant:property name="jar.name" value="${pom.artifactId}-core-${sandesha2.module.version}.jar"/>
<ant:property name="client.jar.name" value="${pom.artifactId}-client-constants-${sandesha2.version}.jar"/>
<ant:property name="dir.samples" value="modules/samples"/>
<ant:property name="dir.test.resources" value="modules/tests/resources"/>
<ant:property name="dir.config" value="config"/>
<ant:property name="dir.interop" value="modules/interop"/>
<ant:property name="apache.license.file" value="LICENSE.txt" />
<ant:property name="readme.file" value="README.txt" />
<ant:property name="release.notes.file" value="release-notes.html" />
<ant:property name="repo.addressing.mar.full.name" value="${repo.addressing.mar.name}-${addressing.version}.mar" />
<ant:property name="repo.addressing.mar.path" value="${maven.repo.local}/${axis2.mar.groupid}/mars" />
<ant:property name="repo.addressing.mar" value="${repo.addressing.mar.path}/${repo.addressing.mar.full.name}" />
<ant:property name="test.service.name" value="RMSampleService.aar" />
<goal name="build:all" prereqs="mar,jar,client:jar,policy:jar,sample:create,repo:create,test:test" />
<goal name="all:jar" prereqs="mar,jar,client:jar,policy:jar" />
<goal name="default" prereqs="clean,build:all">
</goal>
<!-- Befor running the tests the repo should be created-->
<preGoal name="test:test">
<!-- Copying the policy Assertion files-->
<copy todir="${build.classes.dir}">
<fileset dir="modules/policy/src/main/resources/">
<include name="**/*" />
</fileset>
</copy>
</preGoal>
<goal name="mar" prereqs="java:compile">
<ant:property name="metainf.path" value="${build.temp.dir}/module/META-INF" />
<ant:mkdir dir="${metainf.path}" />
<ant:copy file="${basedir}/modules/mar/module.xml" todir="${metainf.path}" />
<!--copy the resource file -->
<copy todir="${maven.build.dir}/classes/">
<fileset dir="${basedir}/modules/core/src/main/resources">
<include name="**/*.properties" /> </fileset>
</copy>
<!-- For the client side -->
<copy todir="${build.temp.dir}/module">
<fileset dir="${basedir}/target/classes" >
<include name="**/*.class"/>
<include name="**/*.properties" />
</fileset>
</copy>
<ant:jar jarfile="${maven.build.dir}/${mar.name}" basedir="${build.temp.dir}/module" /> <copy file="${maven.build.dir}/${mar.name}" tofile="${maven.repo.local}/${pom.groupId}/mars/${mar.name}"/>
</goal>
<goal name="jar" prereqs="java:compile">
<ant:property name="jar.temp.path" value="${build.temp.dir}/jar" />
<ant:mkdir dir="${jar.temp.path}" />
<copy todir="${jar.temp.path}">
<fileset dir="${basedir}/target/classes" >
<include name="**/*.class"/>
</fileset>
<fileset dir="${basedir}/target/classes" >
<include name="**/*.properties" />
</fileset>
</copy>
<ant:jar jarfile="${maven.build.dir}/${jar.name}" basedir="${jar.temp.path}" />
<copy file="${maven.build.dir}/${jar.name}"
toDir="${maven.repo.local}/${pom.groupId}/jars"/>
<delete dir="${build.temp.dir}" />
</goal>
<goal name="policy:jar" prereqs="java:compile">
<ant:property name="policy.jar.temp.path" value="${build.temp.dir}/policyjar" />
<ant:mkdir dir="${policy.jar.temp.path}" />
<copy todir="${policy.jar.temp.path}">
<fileset dir="${basedir}/target/classes" >
<include name="**/policy/**/*.class"/>
<include name="**/*Sandesha2Constants*.class"/>
<include name="**/*.properties" />
<include name="**/*SandeshaException*.class"/>
<include name="**/i18n/**" />
</fileset>
</copy>
<copy todir="${policy.jar.temp.path}" >
<fileset dir="modules/policy/src/main/resources/" >
<include name="**/*"/>
</fileset>
</copy>
<ant:jar jarfile="${maven.build.dir}/${policy.jar.name}" basedir="${policy.jar.temp.path}" />
<copy file="${maven.build.dir}/${policy.jar.name}"
toDir="${maven.repo.local}/${pom.groupId}/jars"/>
<delete dir="${build.temp.dir}" />
</goal>
<goal name="client:jar" prereqs="java:compile">
<ant:property name="client.path" value="${build.temp.dir}/client/" />
<ant:mkdir dir="${client.path}" />
<!-- For the client side -->
<copy todir="${build.temp.dir}/client">
<fileset dir="${basedir}/target/classes" >
<include name="**/sandesha2/client/*SandeshaClientConstants*.*" />
<include name="**/sandesha2/client/*SandeshaListener*.*" />
<include name="**/sandesha2/client/*SequenceReport*.*" />
</fileset>
</copy>
<ant:jar jarfile="${maven.build.dir}/${client.jar.name}" basedir="${build.temp.dir}/client" />
<copy file="${maven.build.dir}/${client.jar.name}"
tofile="${maven.repo.local}/${pom.groupId}/jars/${client.jar.name}"/>
<delete dir="${build.temp.dir}" />
</goal>
<goal name="client:create" prereqs="mar">
<ant:property name="client.dist.path" value="${build.repo.dir}/client"/>
<ant:mkdir dir="${client.dist.path}" />
<ant:mkdir dir="${client.dist.path}/modules" />
<ant:copy file="modules/tests/test-resources/client_axis2.xml" todir="${client.dist.path}" />
<ant:copy file="${maven.build.dir}/${mar.name}" todir="${client.dist.path}/modules" />
<!-- Copying addressing mar file-->
<ant:copy file="${repo.addressing.mar}" toDir="${client.dist.path}/modules/" />
</goal>
<goal name="secure:create" prereqs="server:create,client:create">
<ant:property name="secure.client.path" value="${build.repo.dir}/secure-client"/>
<ant:property name="secure.server.path" value="${build.repo.dir}/secure-server"/>
<ant:property name="secure.temp.path" value="${build.temp.dir}/secure" />
<ant:mkdir dir="${secure.temp.path}" />
<copy todir="${secure.client.path}">
<fileset dir="${build.repo.dir}/client">
<exclude name="modules/${mar.name}"/>
</fileset>
</copy>
<copy todir="${secure.server.path}">
<fileset dir="${build.repo.dir}/server">
<exclude name="modules/${mar.name}"/>
</fileset>
</copy>
<!-- Replace the security manager in the module.xml file -->
<ant:unjar src="${maven.build.dir}/${mar.name}" dest="${secure.temp.path}"/>
<ant:replace file="${secure.temp.path}/META-INF/module.xml"
token="dummy.DummySecurityManager"
value="UnitTestSecurityManager"/>
<ant:jar jarfile="${secure.client.path}/modules/${test.module.name}.mar" basedir="${secure.temp.path}"/>
<ant:jar jarfile="${secure.server.path}/modules/${test.module.name}.mar" basedir="${secure.temp.path}"/>
<delete dir="${build.temp.dir}"/>
</goal>
<!--
<goal name="secure:rampart:create" prereqs="server:create,client:create">
<ant:property name="secure.rampart.client.path" value="${build.repo.dir}/secure-rampart-client"/>
<ant:property name="secure.rampart.server.path" value="${build.repo.dir}/secure-rampart-server"/>
<ant:mkdir dir="${secure.rampart.client.path}" />
<ant:mkdir dir="${secure.rampart.server.path}" />
<ant:property name="secure.rampart.temp.path" value="${build.temp.dir}/secure-rampart" />
<ant:mkdir dir="${secure.rampart.temp.path}" />
<copy todir="${secure.rampart.client.path}">
<fileset dir="${build.repo.dir}/client">
<exclude name="modules/${mar.name}"/>
</fileset>
</copy>
<copy todir="${secure.rampart.server.path}">
<fileset dir="${build.repo.dir}/server">
<exclude name="modules/${mar.name}"/>
</fileset>
</copy>
<ant:mkdir dir="${secure.rampart.temp.path}/module" />
<ant:unjar src="${maven.build.dir}/${mar.name}" dest="${secure.rampart.temp.path}/module"/>
<ant:replace file="${secure.rampart.temp.path}/module/META-INF/module.xml"
token="dummy.DummySecurityManager"
value="rampart.RampartBasedSecurityManager"/>
<ant:jar jarfile="${secure.rampart.client.path}/modules/${mar.name}" basedir="${secure.rampart.temp.path}/module"/>
<ant:jar jarfile="${secure.rampart.server.path}/modules/${mar.name}" basedir="${secure.rampart.temp.path}/module"/>
<ant:mkdir dir="${secure.rampart.temp.path}/service1" />
<ant:unjar src="${build.repo.dir}/server/services/${test.service.name}" dest="${secure.rampart.temp.path}/service1"/>
<ant:copy file="${dir.test.resources}/rampart-config/UT-services.xml" toFile="${secure.rampart.temp.path}/service1/META-INF/services.xml" overwrite="true" />
<ant:copy file="${dir.interop}/conf/store.jks" todir="${secure.rampart.temp.path}/service1" />
<ant:jar jarfile="${secure.rampart.server.path}/services/UTRMTestService.aar" basedir="${secure.rampart.temp.path}/service1"/>
<ant:mkdir dir="${secure.rampart.temp.path}/service2" />
<ant:unjar src="${build.repo.dir}/server/services/${test.service.name}" dest="${secure.rampart.temp.path}/service2"/>
<ant:copy file="${dir.test.resources}/rampart-config/Asymmetric-services.xml" toFile="${secure.rampart.temp.path}/service2/META-INF/services.xml" overwrite="true" />
<ant:copy file="${dir.interop}/conf/store.jks" todir="${secure.rampart.temp.path}/service2" />
<ant:jar jarfile="${secure.rampart.server.path}/services/AsymmetricRMTestService.aar" basedir="${secure.rampart.temp.path}/service2"/>
<ant:mkdir dir="${secure.rampart.temp.path}/service3" />
<ant:unjar src="${build.repo.dir}/server/services/${test.service.name}" dest="${secure.rampart.temp.path}/service3"/>
<ant:copy file="${dir.test.resources}/rampart-config/SecCon-services.xml" toFile="${secure.rampart.temp.path}/service3/META-INF/services.xml" overwrite="true" />
<ant:copy file="${dir.interop}/conf/store.jks" todir="${secure.rampart.temp.path}/service3" />
<ant:jar jarfile="${secure.rampart.server.path}/services/SecConRMTestService.aar" basedir="${secure.rampart.temp.path}/service3"/>
</goal>
-->
<goal name="serialize:create" prereqs="server:create,client:create">
<ant:property name="serialize.client.path" value="${build.repo.dir}/serialize-client"/>
<ant:property name="serialize.server.path" value="${build.repo.dir}/serialize-server"/>
<ant:property name="serialize.temp.path" value="${build.temp.dir}/serialize" />
<ant:mkdir dir="${serialize.temp.path}" />
<copy todir="${serialize.client.path}">
<fileset dir="${build.repo.dir}/client">
<exclude name="modules/${mar.name}"/>
</fileset>
</copy>
<copy todir="${serialize.server.path}">
<fileset dir="${build.repo.dir}/server">
<exclude name="modules/${mar.name}"/>
</fileset>
</copy>
<!-- Switch on serialization in the module.xml file -->
<ant:unjar src="${maven.build.dir}/${mar.name}" dest="${serialize.temp.path}"/>
<ant:replace file="${serialize.temp.path}/META-INF/module.xml"
token="&lt;!-- &lt;sandesha2:UseMessageSerialization>true&lt;/sandesha2:UseMessageSerialization> -->"
value="&lt;sandesha2:UseMessageSerialization>true&lt;/sandesha2:UseMessageSerialization>"/>
<ant:jar jarfile="${serialize.client.path}/modules/${test.module.name}.mar" basedir="${serialize.temp.path}"/>
<ant:jar jarfile="${serialize.server.path}/modules/${test.module.name}.mar" basedir="${serialize.temp.path}"/>
<delete dir="${build.temp.dir}"/>
</goal>
<goal name="repo:create" prereqs="server:create,client:create,secure:create,serialize:create">
</goal>
<goal name="server:create" prereqs="mar,sample:create">
<ant:property name="server.dist.path" value="${build.repo.dir}/server"/>
<ant:mkdir dir="${server.dist.path}" />
<ant:mkdir dir="${server.dist.path}/modules" />
<ant:mkdir dir="${server.dist.path}/services" />
<ant:copy file="modules/tests/test-resources/server_axis2.xml" todir="${server.dist.path}" />
<ant:copy file="${maven.build.dir}/${mar.name}" todir="${server.dist.path}/modules" />
<ant:copy todir="${server.dist.path}/services" >
<ant:fileset dir="${build.samples.services.dir}">
<ant:include name="**/*.aar" />
</ant:fileset>
</ant:copy>
<!-- Copying addressing mar file-->
<ant:copy file="${repo.addressing.mar}" toDir="${server.dist.path}/modules/" />
</goal>
<goal name="sample:compile" prereqs="client:jar">
<ant:mkdir dir="${basedir}/target/samples/classes" />
<ant:mkdir dir="${basedir}/target/samples/services" />
<ant:javac srcdir="${dir.samples}/src" destdir="${basedir}/target/samples/classes" debug="on">
<ant:classpath refid="maven.dependency.classpath" />
<ant:classpath path="${basedir}/target/classes" />
</ant:javac>
</goal>
<goal name="sample:create" prereqs="sample:setup,sample:userguide:create">
</goal>
<goal name="sample:setup" prereqs="sample:compile">
<ant:mkdir dir="${build.samples.services.dir}" />
<ant:mkdir dir="${build.samples.clients.dir}" />
</goal>
<goal name="sample:userguide:create" prereqs="sample:compile,sample:setup">
<ant:property name="dir.sample.userguide.temp" value="${build.temp.dir}/userguide" />
<ant:property name="dir.sample.userguideclients.temp" value="${build.temp.dir}/userguideclients" />
<ant:property name="userguide.service.aar.name" value="RMSampleService.aar" />
<ant:property name="userguide.client.jar.name" value="UserguideSampleClients.jar" />
<ant:mkdir dir="${build.samples.clients.dir}" />
<ant:mkdir dir="${dir.sample.userguide.temp}" />
<ant:mkdir dir="${dir.sample.userguide.temp}/META-INF" />
<ant:copy file="${dir.samples}/src/main/resources/userguide/services.xml" todir="${dir.sample.userguide.temp}/META-INF" />
<!-- <ant:copy file="${dir.samples}/src/main/resources/userguide/RMSampleService.wsdl" todir="${dir.sample.userguide.temp}" /> -->
<ant:copy todir="${dir.sample.userguide.temp}" >
<ant:fileset dir="${maven.build.dir}/samples/classes">
<ant:include name="sandesha2/samples/userguide/**/*Service*.class" />
</ant:fileset>
</ant:copy>
<ant:mkdir dir="${dir.sample.userguideclients.temp}" />
<ant:copy todir="${dir.sample.userguideclients.temp}" >
<ant:fileset dir="${maven.build.dir}/samples/classes">
<ant:include name="sandesha2/samples/userguide/**/*Client*.class" />
</ant:fileset>
</ant:copy>
<ant:jar jarfile="${build.samples.services.dir}/${userguide.service.aar.name}" basedir="${dir.sample.userguide.temp}" />
<ant:jar jarfile="${build.samples.clients.dir}/${userguide.client.jar.name}" basedir="${dir.sample.userguideclients.temp}" />
<ant:copy todir="${build.samples.clients.dir}" >
<ant:fileset dir="${dir.samples}/src/main/resources/userguide">
<ant:include name="*.bat" />
<ant:include name="*.sh" />
<ant:include name="*.html" />
</ant:fileset>
</ant:copy>
<!-- <delete dir="${build.temp.dir}" /> -->
</goal>
<goal name="interop:compile" prereqs="java:compile" >
<ant:mkdir dir="${basedir}/target/interop/classes" />
<ant:mkdir dir="${basedir}/target/interop/services" />
<ant:javac srcdir="${dir.interop}/src" destdir="${basedir}/target/interop/classes" debug="on">
<ant:classpath refid="maven.dependency.classpath" />
<ant:classpath path="${basedir}/target/classes" />
</ant:javac>
</goal>
<goal name="interop:create" prereqs="interop:compile,repo:create">
<ant:property name="dir.interop.service.temp" value="${build.temp.dir}/interopService" />
<ant:property name="interop.service.aar.name" value="RMInteropService.aar" />
<ant:property name="interop.sec.service.aar.name" value="SecRMInteropService.aar" />
<ant:mkdir dir="${dir.interop.service.temp}" />
<ant:mkdir dir="${dir.interop.service.temp}/META-INF" />
<ant:copy file="${dir.interop}/src/resources/conf/services.xml" todir="${dir.interop.service.temp}/META-INF" />
<ant:copy file="${dir.interop}/src/resources/conf/RMInteropService.wsdl" todir="${dir.interop.service.temp}/META-INF" />
<ant:copy todir="${dir.interop.service.temp}" >
<ant:fileset dir="${maven.build.dir}/interop/classes">
<ant:exclude name="**/*clients*/**" />
</ant:fileset>
</ant:copy>
<ant:jar jarfile="${build.interop.dir}/${interop.service.aar.name}" basedir="${dir.interop.service.temp}" overwrite="true"/>
<ant:copy file="${build.interop.dir}/${interop.service.aar.name}" toDir="${build.repo.dir}/server/services" overwrite="true"/>
<ant:copy file="${dir.interop}/src/resources/conf/sec-services.xml" toFile="${dir.interop.service.temp}/META-INF/services.xml" overwrite="true"/>
<ant:copy file="${dir.interop}/src/resources/conf/SecRMInteropService.wsdl" toFile="${dir.interop.service.temp}/META-INF/RMInteropService.wsdl" overwrite="true"/>
<ant:copy file="${dir.interop}/src/resources/conf/store.jks" toFile="${dir.interop.service.temp}/store.jks" overwrite="true"/>
<ant:jar jarfile="${build.interop.dir}/${interop.sec.service.aar.name}" basedir="${dir.interop.service.temp}" overwrite="true"/>
<ant:copy file="${build.interop.dir}/${interop.sec.service.aar.name}" toDir="${build.repo.dir}/server/services" overwrite="true"/>
</goal>
<!--
<preGoal name="test:test" >
<attainGoal name="server:create"/>
<attainGoal name="client:create"/>
</preGoal>
-->
<goal name="server.copy.tomcat" prereqs="server:create">
<property environment="env1"/>
<property name="webapps" value="${env1.CATALINA_HOME}/webapps"/>
<ant:copy file="${build.repo.dir}/server/modules/${mar.name}" todir="${webapps}/axis2/WEB-INF/modules"/>
<ant:copy todir="${webapps}/axis2/WEB-INF/services" >
<ant:fileset dir="${build.repo.dir}/server/services">
<ant:include name="*.aar" />
</ant:fileset>
</ant:copy>
</goal>
<!-- to transforme htmls to xdocs -->
<preGoal name="xdoc:jelly-transform">
<attainGoal name="html2xdoc"/>
</preGoal>
<goal name="clean">
<delete dir="target"/>
<delete dir="${build.temp.dir}" />
<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>
<!-- ================================================================ -->
<!--- Create the Binary Distribution -->
<!-- ================================================================ -->
<goal name="dist-bin" prereqs="build:all,javadoc">
<property name="dir.temp.dist.bin.parent" value="${build.temp.dir}/dist-bin" />
<property name="dir.temp.dist.bin" value="${build.temp.dir}/dist-bin/${dist.name}-bin" />
<ant:mkdir dir="${dir.temp.dist.bin}"/>
<ant:mkdir dir="${dir.temp.dist.bin}/docs"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples/clients"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples/clients/services"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples/clients/modules"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples/clients/lib"/>
<ant:mkdir dir="${dir.temp.dist.bin}/samples/services"/>
<ant:mkdir dir="${dir.temp.dist.bin}/docs/api"/>
<ant:copy file="modules/tests/test-resources/client_axis2.xml" todir="${dir.temp.dist.bin}/samples/clients" />
<ant:copy todir="${dir.temp.dist.bin}/docs/api">
<ant:fileset dir="target/docs/apidocs/">
<ant:include name="**"/>
</ant:fileset>
</ant:copy>
<ant:copy todir="${dir.temp.dist.bin}/docs/api">
<ant:fileset dir="target/docs/apidocs/">
<ant:include name="**"/>
</ant:fileset>
</ant:copy>
<ant:copy todir="${dir.temp.dist.bin}/docs">
<ant:fileset dir="xdocs">
<ant:include name="**"/>
</ant:fileset>
</ant:copy>
<!-- <ant:copy todir="${dir.temp.dist.bin}/lib" flatten="true">
<ant:fileset dir="target/lib">
<ant:include name="*.jar"/>
</ant:fileset>
</ant:copy> -->
<ant:copy file="target/${jar.name}" todir="${dir.temp.dist.bin}" />
<ant:copy file="target/${mar.name}" todir="${dir.temp.dist.bin}" />
<ant:copy file="target/${client.jar.name}" todir="${dir.temp.dist.bin}" />
<ant:copy file="target/${policy.jar.name}" todir="${dir.temp.dist.bin}" />
<!-- <ant:copy file="${dir.config}/sandesha2.properties" todir="${dir.temp.dist.bin}" /> -->
<ant:copy file="${apache.license.file}" todir="${dir.temp.dist.bin}" />
<ant:copy file="${release.notes.file}" todir="${dir.temp.dist.bin}" />
<ant:copy file="${readme.file}" todir="${dir.temp.dist.bin}" />
<ant:copy todir="${dir.temp.dist.bin}/samples">
<ant:fileset dir="${build.samples.dir}">
<ant:include name="classes/**/*.class" />
<ant:include name="clients/*.jar" />
<ant:include name="clients/*.bat"/>
<ant:include name="clients/*.sh"/>
<ant:include name="clients/*.xml"/>
<ant:include name="clients/*.html"/>
</ant:fileset>
</ant:copy>
<ant:copy todir="${dir.temp.dist.bin}/samples/services">
<ant:fileset dir="${build.repo.dir}/server/services">
<ant:include name="*.aar" />
</ant:fileset>
</ant:copy>
<mkdir dir="${build.dist.dir}" />
<ant:zip file="${build.dist.dir}/${dist.name}-bin.zip" basedir="${dir.temp.dist.bin.parent}" />
<ant:tar tarfile="${build.dist.dir}/${dist.name}-bin.tar" basedir="${dir.temp.dist.bin.parent}" />
<gzip src="${build.dist.dir}/${dist.name}-bin.tar" zipfile="${build.dist.dir}/${dist.name}-bin.tar.gz" />
<ant:delete file="${build.dist.dir}/${dist.name}-bin.tar" />
</goal>
<!-- ================================================================ -->
<!--- Create the Source Distribution -->
<!-- ================================================================ -->
<goal name="dist-src">
<mkdir dir="${build.dist.dir}" />
<ant:zip file="${build.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="${build.dist.dir}/${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="${build.dist.dir}/${dist.name}-src.tar" zipfile="${build.dist.dir}/${dist.name}-src.tar.gz"/>
<ant:delete file="${build.dist.dir}/${dist.name}-src.tar"/>
</goal>
<goal name="dist" prereqs="clean">
<attainGoal name="dist-bin" />
<attainGoal name="dist-src" />
</goal>
</project>