| 1 |
<project name="xtc" default="help" xmlns:ivy="antlib:org.apache.ivy.ant"> |
|---|
| 2 |
<!-- Sarugo common ant configuration --> |
|---|
| 3 |
<property name="ant.lib.dir" value="ant" /> |
|---|
| 4 |
<property name="ant.server" value="http://ant.sarugo.org" /> |
|---|
| 5 |
<property name="build.common.url" value="${ant.server}/build-common.xml" /> |
|---|
| 6 |
<property name="build.common.file" value="${ant.lib.dir}/build-common.xml" /> |
|---|
| 7 |
<condition property="build.common.available"> |
|---|
| 8 |
<available file="${build.common.file}" type="file" /> |
|---|
| 9 |
</condition> |
|---|
| 10 |
|
|---|
| 11 |
<target name="download-build.common"> |
|---|
| 12 |
<get src="${build.common.url}" dest="${build.common.file}" usetimestamp="true" /> |
|---|
| 13 |
</target> |
|---|
| 14 |
|
|---|
| 15 |
<import file="${build.common.file}" optional="true" /> |
|---|
| 16 |
|
|---|
| 17 |
<target name="bootstrap" description="Download build dependencies and libraries"> |
|---|
| 18 |
<mkdir dir="${ant.lib.dir}" /> |
|---|
| 19 |
<antcall target="download-build.common" /> |
|---|
| 20 |
<antcall target="common.bootstrap" /> |
|---|
| 21 |
</target> |
|---|
| 22 |
|
|---|
| 23 |
<target name="project.package"> |
|---|
| 24 |
<mkdir dir="${dist.dir}" /> |
|---|
| 25 |
<jar destfile="${dist.dir}/${project.name}-${project.rev}.jar"> |
|---|
| 26 |
<fileset dir="${build.dir}/main/java"> |
|---|
| 27 |
<include name="**/*.class" /> |
|---|
| 28 |
<exclude name="org/sarugo/xtc/restlet/**/*.class" /> |
|---|
| 29 |
</fileset> |
|---|
| 30 |
<fileset dir="${build.dir}/main/resources" /> |
|---|
| 31 |
</jar> |
|---|
| 32 |
<jar destfile="${dist.dir}/${project.name}-restlet-${project.rev}.jar"> |
|---|
| 33 |
<fileset dir="${build.dir}/main/java"> |
|---|
| 34 |
<include name="org/sarugo/xtc/restlet/**/*.class" /> |
|---|
| 35 |
</fileset> |
|---|
| 36 |
</jar> |
|---|
| 37 |
<!-- Use ivy to copy the runtime dependencies to distribution directory --> |
|---|
| 38 |
<ivy:retrieve pattern="${dist.dir}/[artifact]-[revision].[ext]" conf="default" useOrigin="true" /> |
|---|
| 39 |
<property name="skip.common.package" value="true" /> |
|---|
| 40 |
</target> |
|---|
| 41 |
|
|---|
| 42 |
<target name="help"> |
|---|
| 43 |
<echo message="Run ant -p to see a list of targets." /> |
|---|
| 44 |
</target> |
|---|
| 45 |
|
|---|
| 46 |
</project> |
|---|