aboutsummaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml162
1 files changed, 162 insertions, 0 deletions
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..f1bc6a6
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,162 @@
+<project name="ivy-java" basedir="." default="main">
+
+ <property name="version" value="1.2.14"/>
+ <property name="defaultbus" value="-DIVYBUS=224.5.6.7:8910" />
+
+ <property name="src.dir" value="src"/>
+ <property name="build.dir" value="build"/>
+ <property name="classes.dir" value="${build.dir}/classes"/>
+ <property name="jar.dir" value="${build.dir}/jar"/>
+ <property name="main-class" value="fr.dgac.ivy.tools.Probe"/>
+ <property name="lib.dir" value="lib"/>
+ <property name="target.dir" value="jestin@ssh.lii-enac.fr:public_html/ivy-java/unstable"/>
+ <property name="tgz.dir" value="${build.dir}/${ant.project.name}-${version}" />
+
+ <!--
+ LOCAL SETTINGS
+ should be overriden to reflect your installation. This is a MacOSX /
+ Macports setup
+ -->
+ <property name="docbook-xsl" value="/opt/local/share/xsl/docbook-xsl" />
+ <property name="jars.home" value="/opt/local/share/java/"/>
+ <property name="fop.home" value="${jars.home}/fop/1.0/"/>
+ <property name="xslt.jar" value="${jars.home}/xalan.jar"/>
+ <property name="jsch.jar" value="${jars.home}/jsch.jar"/>
+ <property name="servlet.jar" value="servlet25-api.jar "/>
+
+ <path id="classpath">
+ <fileset dir="${lib.dir}" includes="**/*.jar"/>
+ <fileset dir="${jars.home}" includes="**/${servlet.jar}"/>
+ </path>
+
+ <target name="init">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${classes.dir}"/>
+ <mkdir dir="${jar.dir}"/>
+ <mkdir dir="${build.dir}/doc/api"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ </target>
+
+ <target name="compile" depends="init">
+ <javac includeantruntime="true" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
+ </target>
+
+
+ <target name="jar" depends="compile">
+ <jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}">
+ <manifest>
+ <attribute name="Main-Class" value="${main-class}"/>
+ </manifest>
+ <archives>
+ <zips><fileset dir="lib" includes="**/java-getopt-1.0.13.jar"/></zips>
+ </archives>
+ <fileset dir="." includes="README,COPYING.LIB,BUGS,Changelog"/>
+ </jar>
+ </target>
+
+ <target name="dist" depends="compile,doc" >
+ <jar destfile="${jar.dir}/${ant.project.name}-${version}.jar" basedir="${classes.dir}">
+ <manifest>
+ <attribute name="Main-Class" value="${main-class}"/>
+ </manifest>
+ <archives>
+ <zips><fileset dir="lib" includes="**/java-getopt-1.0.13.jar"/></zips>
+ </archives>
+ <fileset dir="." includes="build.xml,Makefile,java.mk,manifest,README,COPYING.LIB,Changelog,BUGS" />
+ <fileset dir="src" includes="${src.dir}/*.java" />
+ <fileset dir="tests" includes="tests/*.java" />
+ <fileset dir="examples" includes="tests/*.java, tests/*.xml, tests/*.txt" />
+ <fileset dir="doc" includes="doc/html/api/*" />
+ </jar>
+ </target>
+
+ <target name="doc" depends="init">
+ <!-- JAVADOC -->
+ <javadoc packagenames="fr.dgac.ivy.*" sourcepath="${src.dir}"
+ destdir="${build.dir}/doc/api/" defaultexcludes="yes" classpathref="classpath"
+ public="true" use="true" windowtitle="Ivy Java API">
+ <fileset dir="src" includes="**/*.java" />
+ </javadoc>
+
+ <!-- library guide HTML ONE BIG CHUNK -->
+ <xslt basedir="doc" destdir="${build.dir}/doc/html" extension=".html"
+ in="doc/ivy-java.sgml"
+ out="${build.dir}/doc/html/ivy-java.html"
+ style="${docbook-xsl}/xhtml/chunk.xsl">
+ <classpath location="${xslt.jar}" />
+ </xslt>
+
+ <!-- library guide HTML MULTIPLE FILES -->
+ <xslt basedir="doc" destdir="${build.dir}/doc/html" extension=".html"
+ in="doc/ivy-java.sgml"
+ out="${build.dir}/doc/html/"
+ style="${docbook-xsl}/xhtml/docbook.xsl">
+ <classpath location="${xslt.jar}" />
+ </xslt>
+
+ <!-- library guide PDF -->
+ <xslt basedir="doc" destdir="${build.dir}/doc/" extension=".fo" classpathref="classpath"
+ includes="ivy-java.sgml"
+ style="${docbook-xsl}/fo/docbook.xsl">
+ <classpath location="${xslt.jar}" />
+ </xslt>
+ <fop format="application/pdf" fofile="${build.dir}/doc/ivy-java.fo" outfile="${build.dir}/doc/ivy-java.pdf" />
+ </target>
+
+ <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
+ <classpath>
+ <fileset dir="${fop.home}/lib"><include name="*.jar"/></fileset>
+ <fileset dir="${fop.home}/build"><include name="fop.jar"/>
+ <include name="fop-hyph.jar" /></fileset>
+ </classpath>
+ </taskdef>
+
+ <target name="tar">
+ <delete file="${tgz.dir}.tar.gz" />
+ <tar destfile="${tgz.dir}.tar.gz" compression="gzip">
+ <tarfileset dir="." includes="${src.dir}/*.java" />
+ <tarfileset dir="." includes="${testsrc.dir}/*.java" />
+ <tarfileset dir="." includes="${testsrc.dir}/Makefile" />
+ <tarfileset dir="." includes="examples/*.java" />
+ <tarfileset dir="." includes="examples/*.xml" />
+ <tarfileset dir="." includes="examples/*.txt" />
+ <tarfileset dir="." includes="examples/*.java" />
+ <tarfileset dir="." includes="doc/*.dgml" />
+ <tarfileset dir="." includes="doc/*.1" />
+ <tarfileset dir="." includes="doc/Makefile" />
+ <fileset dir="." includes="build.xml,Makefile,java.mk,manifest,README,COPYING.LIB,Changelog,BUGS" />
+ </tar>
+ </target>
+
+ <target name="run" depends="jar">
+ <java fork="true" classname="${main-class}">
+ <jvmarg value="${defaultbus}"/>
+ <arg value="(.*)"/>
+ <classpath>
+ <path refid="classpath"/>
+ <path location="${jar.dir}/${ant.project.name}.jar"/>
+ </classpath>
+ </java>
+ </target>
+
+ <target name="release" depends="clean,compile,jar,dist,doc,tar">
+ <scp todir="${target.dir}">
+ <classpath>
+ <path refid="classpath"/>
+ <path location="${jsch.jar}"/>
+ </classpath>
+ <fileset dir="build">
+ <include name="**/*.tar.gz"/>
+ <include name="**/jar/*.jar"/>
+ <include name="**/doc/*"/>
+ </fileset>
+ </scp>
+ </target>
+
+ <target name="clean-build" depends="clean,jar"/>
+ <target name="main" depends="clean,run"/>
+
+</project>