| 1 |
8555 |
james_leigh |
<?xml version="1.0" encoding="ISO-8859-1"?>
|
| 2 |
|
james_leigh |
<project name="alibaba" default="help" basedir=".">
|
| 3 |
|
james_leigh |
|
| 4 |
|
james_leigh |
<property name="docs" value="src/doc" />
|
| 5 |
|
james_leigh |
<property name="xdocs" value="target/site" />
|
| 6 |
|
james_leigh |
|
| 7 |
|
james_leigh |
<target name="help" description="Usage information">
|
| 8 |
|
james_leigh |
<echo message="AliBaba Release Builder" />
|
| 9 |
|
james_leigh |
<echo message="========================" />
|
| 10 |
|
james_leigh |
<echo message="The purpose of this Ant build file is to create releases for AliBaba." />
|
| 11 |
|
james_leigh |
<echo message="It is not intended to capture every aspect of project development. Please use Maven for development purposes." />
|
| 12 |
|
james_leigh |
<echo message=" " />
|
| 13 |
|
james_leigh |
<echo message="Available targets: " />
|
| 14 |
|
james_leigh |
<echo message=" " />
|
| 15 |
|
james_leigh |
<echo message=" clean : cleans targets" />
|
| 16 |
|
james_leigh |
<echo message=" build : compiles classes" />
|
| 17 |
|
james_leigh |
<echo message=" package : package for release" />
|
| 18 |
|
james_leigh |
<echo message=" -Dsgmltools=sgmltools docs : create documentation" />
|
| 19 |
|
james_leigh |
<echo message=" -Declipse.workspace=.. eclipse : create eclipse projects" />
|
| 20 |
|
james_leigh |
</target>
|
| 21 |
|
james_leigh |
|
| 22 |
|
james_leigh |
<target name="clean" description="Removes release artifacts">
|
| 23 |
|
james_leigh |
<antcall target="mvn">
|
| 24 |
|
james_leigh |
<param name="args" value="clean" />
|
| 25 |
|
james_leigh |
</antcall>
|
| 26 |
|
james_leigh |
</target>
|
| 27 |
|
james_leigh |
|
| 28 |
|
james_leigh |
<target name="eclipse" depends="eclipse-add-maven-repo" description="Creates .project and .classpath files">
|
| 29 |
|
james_leigh |
<antcall target="mvn">
|
| 30 |
|
james_leigh |
<param name="args" value="-DdownloadSources=true eclipse:eclipse" />
|
| 31 |
|
james_leigh |
</antcall>
|
| 32 |
|
james_leigh |
</target>
|
| 33 |
|
james_leigh |
|
| 34 |
|
james_leigh |
<target name="eclipse-add-maven-repo" description="Sets the classpath variable M2_REPO" if="eclipse.workspace">
|
| 35 |
|
james_leigh |
<antcall target="mvn">
|
| 36 |
|
james_leigh |
<param name="args" value="-Declipse.workspace=${eclipse.workspace} eclipse:add-maven-repo" />
|
| 37 |
|
james_leigh |
</antcall>
|
| 38 |
|
james_leigh |
</target>
|
| 39 |
|
james_leigh |
|
| 40 |
|
james_leigh |
<target name="build" description="Compiles the Java classes">
|
| 41 |
|
james_leigh |
<antcall target="mvn">
|
| 42 |
|
james_leigh |
<param name="args" value="--offline -Dmaven.test.skip=true package" />
|
| 43 |
|
james_leigh |
</antcall>
|
| 44 |
|
james_leigh |
<antcall target="build-sdk"/>
|
| 45 |
|
james_leigh |
</target>
|
| 46 |
|
james_leigh |
|
| 47 |
|
james_leigh |
<target name="package" depends="mvn-build,build-sdk" description="Create release artifacts">
|
| 48 |
|
james_leigh |
</target>
|
| 49 |
|
james_leigh |
|
| 50 |
|
james_leigh |
<target name="mvn-build">
|
| 51 |
|
james_leigh |
<antcall target="mvn">
|
| 52 |
|
james_leigh |
<param name="args" value="-U source:jar install" />
|
| 53 |
|
james_leigh |
</antcall>
|
| 54 |
|
james_leigh |
</target>
|
| 55 |
|
james_leigh |
|
| 56 |
|
james_leigh |
<target name="build-sdk">
|
| 57 |
|
james_leigh |
<xmlproperty file="pom.xml" />
|
| 58 |
|
james_leigh |
<mkdir dir="target" />
|
| 59 |
|
james_leigh |
<mkdir dir="lib" />
|
| 60 |
|
james_leigh |
<property name="lib.dir" location="lib" />
|
| 61 |
|
james_leigh |
<property name="target.dir" location="target" />
|
| 62 |
|
james_leigh |
<path id="libcp">
|
| 63 |
|
james_leigh |
<fileset dir="${lib.dir}">
|
| 64 |
|
james_leigh |
<include name="*.jar" />
|
| 65 |
|
james_leigh |
</fileset>
|
| 66 |
|
james_leigh |
</path>
|
| 67 |
|
james_leigh |
<pathconvert property="libpath" refid="libcp" pathsep=" " dirsep="/">
|
| 68 |
|
james_leigh |
<map from="${target.dir}/" to="" />
|
| 69 |
|
james_leigh |
<map from="${lib.dir}/" to="../lib/" />
|
| 70 |
|
james_leigh |
</pathconvert>
|
| 71 |
|
james_leigh |
<jar destfile="target/alibaba-${project.version}.jar" index="true" filesetmanifest="skip">
|
| 72 |
|
james_leigh |
<manifest>
|
| 73 |
|
james_leigh |
<attribute name="Built-By" value="${user.name}" />
|
| 74 |
|
james_leigh |
<attribute name="Program-Version" value="${project.version}" />
|
| 75 |
|
james_leigh |
<attribute name="Class-Path" value="${libpath}" />
|
| 76 |
|
james_leigh |
</manifest>
|
| 77 |
9027 |
james_leigh |
<zipfileset src="object-repository/target/alibaba-repository-object-${project.version}.jar" />
|
| 78 |
|
james_leigh |
<zipfileset src="optimistic-sail/target/alibaba-sail-optimistic-${project.version}.jar" />
|
| 79 |
|
james_leigh |
<zipfileset src="metadata-server/target/alibaba-server-metadata-${project.version}.jar" />
|
| 80 |
8555 |
james_leigh |
</jar>
|
| 81 |
|
james_leigh |
<path id="cp">
|
| 82 |
|
james_leigh |
<fileset dir="${lib.dir}">
|
| 83 |
|
james_leigh |
<include name="*.jar" />
|
| 84 |
|
james_leigh |
</fileset>
|
| 85 |
|
james_leigh |
</path>
|
| 86 |
|
james_leigh |
<pathconvert property="classpath" refid="cp" pathsep=" " dirsep="/">
|
| 87 |
|
james_leigh |
<map from="${target.dir}/" to="" />
|
| 88 |
|
james_leigh |
<map from="${lib.dir}/" to="../lib/" />
|
| 89 |
|
james_leigh |
</pathconvert>
|
| 90 |
|
james_leigh |
<mkdir dir="${xdocs}"/>
|
| 91 |
|
james_leigh |
</target>
|
| 92 |
|
james_leigh |
|
| 93 |
|
james_leigh |
<target name="docs" description="Create user and system documentation only">
|
| 94 |
|
james_leigh |
<antcall target="mvn">
|
| 95 |
|
james_leigh |
<param name="args" value="-Dmaven.test.skip=true compile" />
|
| 96 |
|
james_leigh |
</antcall>
|
| 97 |
|
james_leigh |
<antcall target="mvn">
|
| 98 |
|
james_leigh |
<param name="args" value="site javancss:report" />
|
| 99 |
|
james_leigh |
</antcall>
|
| 100 |
|
james_leigh |
<xmlproperty file="pom.xml" />
|
| 101 |
|
james_leigh |
<zip destfile="target/alibaba-site-${project.version}.zip" basedir="target/site" />
|
| 102 |
|
james_leigh |
</target>
|
| 103 |
|
james_leigh |
|
| 104 |
|
james_leigh |
<target name="mvn">
|
| 105 |
|
james_leigh |
<echo message="mvn -B ${args}" />
|
| 106 |
|
james_leigh |
<exec os="Windows XP, Windows Vista" executable="mvn.bat" failonerror="true">
|
| 107 |
|
james_leigh |
<arg line="-B ${args}" />
|
| 108 |
|
james_leigh |
</exec>
|
| 109 |
|
james_leigh |
<exec os="Linux" executable="mvn" failonerror="true">
|
| 110 |
|
james_leigh |
<arg line="-B ${args}" />
|
| 111 |
|
james_leigh |
</exec>
|
| 112 |
|
james_leigh |
</target>
|
| 113 |
|
james_leigh |
|
| 114 |
|
james_leigh |
</project>
|