diff --git a/buildADQL.xml b/buildADQL.xml new file mode 100644 index 0000000000000000000000000000000000000000..9f31e1528addcd064bb34d7cd2169b8ac5f911be --- /dev/null +++ b/buildADQL.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE project> +<project name="adql" basedir="." default="buildLib"> + + <property name="version" value="1.1" /> + + <property name="srcDir" value="src" /> + <property name="compileDir" value="antBuild" /> + <property name="classesDir" value="${compileDir}"/> + <property name="javadocDir" value="javadoc/adql" /> + + <property name="adqlPath" value="adql/**" /> + <property name="utilsPath" value="cds/utils/**" /> + <property name="licensePath" value="COPYING.LESSER.txt" /> + <property name="includesList" value="${adqlPath},${utilsPath},${licensePath}" /> + + <property name="jarDest" value="." /> + <property name="libJarFile" value="${jarDest}/adql_${version}.jar" /> + <property name="adqlParserJarFile" value="${jarDest}/adqlParser_${version}.jar" /> + <property name="srcJarFile" value="${jarDest}/adql_src_${version}.jar" /> + <property name="javadocJarFile" value="${jarDest}/adql_javadoc_${version}.jar" /> + + <property name="adqlParserLink" value="adqlParser.jar" /> + + <echo>ADQL LIBRARY VERSION = ${version}</echo> + + <!-- BUILD ALL TASK --> + <target name="buildAll" depends="buildLibAndSrc,buildJavadoc" + description="Build four JARs: the library (classes), the runnable ADQL parser, its sources and its Javadoc. Then, except the JAR, all the compiled javadoc files are deleted." > + <antcall target="cleanJavadocBuild" /> + </target> + + <target name="cleanAll" depends="clean,cleanJavadoc" description="Delete all files generated by this ANT file for the set version." /> + + <!-- LIB & SOURCES --> + <target name="clean" description="Delete the JARs for the library (classes), the runnable ADQL parser and for its sources for the set version."> + <delete file="${libJarFile}" failonerror="false" /> + <delete file="${srcJarFile}" failonerror="false" /> + <delete file="${adqlParserJarFile}" failonerror="false" /> + <symlink action="delete" link="${adqlParserLink}" failonerror="false" /> + <delete dir="${compileDir}" failonerror="false" /> + </target> + + <target name="compileLib" depends="clean" description="Build all the classes of the ADQL library. This target is particularly usefull because it lets highlighting missing dependencies."> + <mkdir dir="${compileDir}" /> + <javac destdir="${compileDir}" srcdir="${srcDir}" includes="${includesList}" includeantruntime="false" /> + </target> + + <target name="buildLib" depends="compileLib" description="After 'clean', build the library JAR (only classes) and the runnable ADQL parser."> + <echo>Generate the library:</echo> + <jar basedir="${classesDir}" destfile="${libJarFile}" includes="${includesList}" /> + <echo>Generate the ADQL parser:</echo> + <jar basedir="${classesDir}" destfile="${adqlParserJarFile}" filesetmanifest="mergewithoutmain" includes="${includesList}"> + <manifest> + <attribute name="Main-Class" value="adql.parser.ADQLParser"/> + <attribute name="Class-Path" value="."/> + </manifest> + </jar> + <echo>And its symbolic link:</echo> + <symlink action="single" link="${adqlParserLink}" resource="${adqlParserJarFile}" failonerror="false" /> + <echo>Delete compiled classes:</echo> + <delete dir="${compileDir}" failonerror="true" /> + </target> + + <target name="buildLibAndSrc" depends="buildLib" description="After 'clean' and 'buildLib', build the sources JAR (only .java)."> + <jar compress="false" baseDir="${srcDir}" destfile="${srcJarFile}" includes="${includesList}" /> + </target> + + <!-- JAVADOC --> + <target name="cleanJavadocBuild" description="Delete the whole generated/compiled Javadoc directory."> + <delete dir="${javadocDir}" failonerror="false" /> + </target> + + <target name="cleanJavadoc" depends="cleanJavadocBuild" description="Delete the Javadoc JAR AND the whole generated/compiled Javadoc directory."> + <delete file="${jarDest}/${javadocJarFile}" failonerror="false" /> + </target> + + <target name="compileJavadoc" depends="cleanJavadoc" description="After 'cleanJavadoc', compile the whole Javadoc."> + <javadoc access="protected" author="true" classpath="." destdir="${javadocDir}" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.7" splitindex="true" use="true" version="true"> + <packageset dir="${srcDir}" includes="${includesList}" /> + </javadoc> + </target> + + <target name="buildJavadoc" depends="compileJavadoc" description="After 'compileJavadoc', build the Javadoc JAR."> + <jar destfile="${javadocJarFile}" basedir="${javadocDir}" /> + </target> + +</project> \ No newline at end of file diff --git a/buildTAP.xml b/buildTAP.xml new file mode 100644 index 0000000000000000000000000000000000000000..28c43788e7386242bb1cbcd797e52e1a41840976 --- /dev/null +++ b/buildTAP.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE project> +<project name="tap" basedir="." default="buildLib"> + + <property name="version" value="1.0" /> + + <property name="srcDir" value="src" /> + <property name="compileDir" value="antBuild" /> + <property name="classesDir" value="${compileDir}"/> + <property name="javadocDir" value="javadoc/tap" /> + + <property name="uploadUtilsJar" value="lib/uploadUtils.jar" /> + + <property name="tapPath" value="tap/**,adql/**,uws/**,cds/**" /> + <property name="jsonPath" value="org/json/**" /> + <property name="uploadUtilsPath" value="com/oreilly/servlet/**,org/kxml2/**,org/xmlpull/**" /> + <property name="licensePath" value="COPYING.LESSER.txt" /> + <property name="includesList" value="${tapPath},${jsonPath},${uploadUtilsPath},${licensePath}" /> + + <property name="jarDest" value="." /> + <property name="libJarFile" value="${jarDest}/tap_${version}.jar" /> + <property name="srcJarFile" value="${jarDest}/tap_src_${version}.jar" /> + <property name="javadocJarFile" value="${jarDest}/tap_javadoc_${version}.jar" /> + + <fail message="Missing property: CATALINA ! It provides the path toward a directory or a JAR which contains the following class: org.apache.catalina.connector.ClientAbortException."> + <condition><not><isset property="CATALINA"/></not></condition> + </fail> + <fail message="The property SERVLET-API must be set! It provides the path toward a directory or a JAR which contains all classes inside javax.servlet."> + <condition><not><isset property="SERVLET-API"/></not></condition> + </fail> + + <path id="tap.classpath"> + <pathelement location="${uploadUtilsJar}" /> + <pathelement location="${CATALINA}" /> + <pathelement location="${SERVLET-API}" /> + </path> + + <echo>TAP LIBRARY VERSION = ${version}</echo> + + <!-- BUILD ALL TASK --> + <target name="buildAll" depends="buildLibAndSrc,buildJavadoc" + description="Build three JARs: the library (classes), its sources and its Javadoc. Then, except the JAR, all the compiled javadoc files are deleted." > + <antcall target="cleanJavadocBuild" /> + </target> + + <target name="cleanAll" depends="clean,cleanJavadoc" description="Delete all files generated by this ANT file for the set version." /> + + <!-- LIB & SOURCES --> + <target name="clean" description="Delete the JARs for the library (classes) and for its sources for the set version."> + <delete file="${libJarFile}" failonerror="false" /> + <delete file="${srcJarFile}" failonerror="false" /> + <delete dir="${compileDir}" failonerror="false" /> + </target> + + <target name="compileLib" depends="clean" description="Build all the classes of the TAP library. This target is particularly usefull because it lets highlighting missing dependencies."> + <mkdir dir="${compileDir}" /> + <javac destdir="${compileDir}" srcdir="${srcDir}" includes="${includesList}" includeantruntime="false"> + <classpath refid="tap.classpath" /> + </javac> + </target> + + <target name="buildLib" depends="compileLib" description="After 'clean', build the library JAR (only classes)."> + <echo>Generate the library:</echo> + <jar basedir="${classesDir}" destfile="${libJarFile}" includes="${includesList}"> + <zipfileset src="${uploadUtilsJar}" excludes="META-INF/*" /> + </jar> + <delete dir="${compileDir}" failonerror="true" /> + </target> + + <target name="buildLibAndSrc" depends="buildLib" description="After 'clean' and 'buildLib', build the sources JAR (only .java)."> + <jar compress="false" baseDir="${srcDir}" destfile="${srcJarFile}" includes="${includesList}"> + <fileset file="${uploadUtilsJar}" /> + </jar> + </target> + + <!-- JAVADOC --> + <target name="cleanJavadocBuild" description="Delete the whole generated/compiled Javadoc directory."> + <delete dir="${javadocDir}" failonerror="false" /> + </target> + + <target name="cleanJavadoc" depends="cleanJavadocBuild" description="Delete the Javadoc JAR AND the whole generated/compiled Javadoc directory."> + <delete file="${jarDest}/${javadocJarFile}" failonerror="false" /> + </target> + + <target name="compileJavadoc" depends="cleanJavadoc" description="After 'cleanJavadoc', compile the whole Javadoc."> + <javadoc access="protected" author="true" destdir="${javadocDir}" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.7" splitindex="true" use="true" version="true"> + <packageset dir="${srcDir}" includes="${includesList}" /> + <classpath refid="tap.classpath" /> + </javadoc> + </target> + + <target name="buildJavadoc" depends="compileJavadoc" description="After 'compileJavadoc', build the Javadoc JAR."> + <jar destfile="${javadocJarFile}" basedir="${javadocDir}" /> + </target> + +</project> \ No newline at end of file diff --git a/buildUWS.xml b/buildUWS.xml new file mode 100644 index 0000000000000000000000000000000000000000..6bf82191c3b947958e5bdb63390a0181d5b53c3d --- /dev/null +++ b/buildUWS.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE project> +<project name="uws" basedir="." default="buildLib"> + + <property name="version" value="4.0" /> + + <property name="srcDir" value="src" /> + <property name="compileDir" value="antBuild" /> + <property name="classesDir" value="${compileDir}"/> + <property name="javadocDir" value="javadoc/uws" /> + + <property name="uwsPath" value="uws/**" /> + <property name="jsonPath" value="org/json/**" /> + <property name="licensePath" value="COPYING.LESSER.txt" /> + <property name="includesList" value="${uwsPath},${jsonPath},${licensePath}" /> + + <property name="jarDest" value="." /> + <property name="libJarFile" value="${jarDest}/uws_${version}.jar" /> + <property name="srcJarFile" value="${jarDest}/uws_src_${version}.jar" /> + <property name="javadocJarFile" value="${jarDest}/uws_javadoc_${version}.jar" /> + + <fail message="Missing property: CATALINA ! It provides the path toward a directory or a JAR which contains the following class: org.apache.catalina.connector.ClientAbortException."> + <condition><not><isset property="CATALINA"/></not></condition> + </fail> + <fail message="The property SERVLET-API must be set! It provides the path toward a directory or a JAR which contains all classes inside javax.servlet."> + <condition><not><isset property="SERVLET-API"/></not></condition> + </fail> + + <path id="uws.classpath"> + <pathelement location="${CATALINA}" /> + <pathelement location="${SERVLET-API}" /> + </path> + + <echo>UWS LIBRARY VERSION = ${version}</echo> + + <!-- BUILD ALL TASK --> + <target name="buildAll" depends="buildLibAndSrc,buildJavadoc" + description="Build three JARs: the library (classes), its sources and its Javadoc. Then, except the JAR, all the compiled javadoc files are deleted." > + <antcall target="cleanJavadocBuild" /> + </target> + + <target name="cleanAll" depends="clean,cleanJavadoc" description="Delete all files generated by this ANT file for the set version." /> + + <!-- LIB & SOURCES --> + <target name="clean" description="Delete the JARs for the library (classes) and for its sources for the set version."> + <delete file="${libJarFile}" failonerror="false" /> + <delete file="${srcJarFile}" failonerror="false" /> + <delete dir="${compileDir}" failonerror="false" /> + </target> + + <target name="compileLib" depends="clean" description="Build all the classes of the UWS library. This target is particularly usefull because it lets highlighting missing dependencies."> + <mkdir dir="${compileDir}" /> + <javac destdir="${compileDir}" srcdir="${srcDir}" includes="${includesList}" includeantruntime="false"> + <classpath refid="uws.classpath" /> + </javac> + </target> + + <target name="buildLib" depends="compileLib" description="After 'clean', build the library JAR (only classes)."> + <echo>Generate the library:</echo> + <jar basedir="${classesDir}" destfile="${libJarFile}" includes="${includesList}" /> + <delete dir="${compileDir}" failonerror="true" /> + </target> + + <target name="buildLibAndSrc" depends="buildLib" description="After 'clean' and 'buildLib', build the sources JAR (only .java)."> + <jar compress="false" baseDir="${srcDir}" destfile="${srcJarFile}" includes="${includesList}" /> + </target> + + <!-- JAVADOC --> + <target name="cleanJavadocBuild" description="Delete the whole generated/compiled Javadoc directory."> + <delete dir="${javadocDir}" failonerror="false" /> + </target> + + <target name="cleanJavadoc" depends="cleanJavadocBuild" description="Delete the Javadoc JAR AND the whole generated/compiled Javadoc directory."> + <delete file="${jarDest}/${javadocJarFile}" failonerror="false" /> + </target> + + <target name="compileJavadoc" depends="cleanJavadoc" description="After 'cleanJavadoc', compile the whole Javadoc."> + <javadoc access="protected" author="true" destdir="${javadocDir}" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.7" splitindex="true" use="true" version="true"> + <packageset dir="${srcDir}" includes="${includesList}" /> + <classpath refid="uws.classpath" /> + </javadoc> + </target> + + <target name="buildJavadoc" depends="compileJavadoc" description="After 'compileJavadoc', build the Javadoc JAR."> + <jar destfile="${javadocJarFile}" basedir="${javadocDir}" /> + </target> + +</project> \ No newline at end of file