Skip to content
Snippets Groups Projects

Removing Atlantis, as this is not part of Athena

Merged Edward Moyse requested to merge emoyse/athena:master-remove-atlantis into master
201+ files
+ 0
49286
Compare changes
  • Side-by-side
  • Inline
Files
201+
+ 0
469
<?xml version="1.0"?>
<!-- Main Ant build file for Atlantis -->
<!-- basedir attribute to be adjusted - target build directory - - - - - -->
<project name="Atlantis" default="usage" basedir="..">
<!-- begin properties - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- read in overriden properties from ant.properties file - - - - - -->
<property file="ant.properties"/>
<property name="appName" value="Atlantis"/>
<!-- Use Java 1.6.
Note that this controls the source code accepted and bytecode generated but
does NOT ensure that the correct libraries are available so in principle you
could still build code that requires different libraries to run.
This was added when we needed to enforve Java 1.5 but 1.6 was already
the most commonly installed version. -->
<property name="ant.build.javac.source" value="1.6"/>
<!-- webstart codebase with appropriate default -->
<property name="codebase" value="http://www.cern.ch/atlantis/webstart"/>
<!-- password for webstart certificate - certificate is created in
webstart target, used to sign *.jar files and erased afterwards -->
<property name="password" value="webstart_certificate_atlantis_password"/>
<!-- list of "specific system configurations" in configurations/config-*.xml -->
<!-- NOT including MINERVA since this needs a slightly different JNLP file to load events from a URL -->
<property name="configs"
value="acr-general,acr-public,l1calo-acr,lar-acr,lar-publications,mbts-acr,mdt-acr,pixel-acr,pixel-publications,sct-acr,sct-publications,tgc-acr,tile-acr,tile-publications,trt-acr,trt-publications"/>
<!-- timeout in milliseconds for JUnit tests, applies to each forked JVM instance -->
<property name="test.timeout" value="300000"/>
<!-- directories - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<property name="src.src" value="src"/>
<property name="lib.src" value="lib"/>
<property name="test.src" value="test/src"/>
<property name="test.events" value="test/events"/>
<!-- runtime directories and files -->
<property name="conf" value="configuration"/>
<property name="events" value="events"/>
<property name="geom" value="geometry"/>
<property name="help" value="help"/>
<property name="img" value="img"/>
<property name="share" value="share"/>
<property name="conf.src" value="${conf}"/>
<property name="events.src" value="${events}"/>
<property name="geom.src" value="${geom}"/>
<property name="help.src" value="${help}"/>
<property name="img.src" value="${img}"/>
<property name="share.src" value="${share}"/>
<property name="conf.run" value="${targetDir}/${conf}"/>
<property name="events.run" value="${targetDir}/${events}"/>
<property name="geom.run" value="${targetDir}/${geom}"/>
<property name="help.run" value="${targetDir}/${help}"/>
<property name="img.run" value="${targetDir}/${img}"/>
<property name="share.run" value="${targetDir}/${share}"/>
<property name="class.run" value="${targetDir}/classes"/>
<property name="lib.run" value="${targetDir}/lib"/>
<property name="test.run" value="${targetDir}/classes-test"/>
<!-- directories for test libraries and output -->
<property name="lib.test" value="${targetDir}/lib/test"/>
<property name="report.test" value="${targetDir}/report"/>
<!-- Atlantis - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<property name="atlantis.jar" value="${targetDir}/atlantis.jar"/>
<property name="atlantis.main.class" value="atlantis.Atlantis"/>
<!-- Classpath for manifest in Jar file -->
<path id="classpath.mf">
<fileset dir="${lib.run}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${help.run}">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- "foreach" task needed to generate specific system configs, provided by ant-contrib -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${lib.src}/build/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<!-- =============================================================== -->
<!-- targets begin - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- preinit target - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="preinit" description="Test if targetDir argument is set">
<fail unless="targetDir">
targetDir variable must be set - try: ant usage
example: ant -DtargetDir="test" all
</fail>
<echo>Atlantis build will be made into ${targetDir} directory</echo>
</target>
<!-- init target - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="init" depends="preinit"
description="Makes required directories, copies libs">
<mkdir dir="${lib.run}"/>
<!-- For runtime libraries use include element to take only Jar files from lib directory,
not build subdirectory -->
<copy todir="${lib.run}">
<fileset dir="${lib.src}">
<include name="*.jar"/>
</fileset>
</copy>
<mkdir dir="${conf.run}"/>
<copy todir="${conf.run}">
<fileset dir="${conf.src}"/>
</copy>
<mkdir dir="${events.run}"/>
<copy todir="${events.run}">
<fileset dir="${events.src}"/>
</copy>
<mkdir dir="${geom.run}"/>
<copy todir="${geom.run}">
<fileset dir="${geom.src}"/>
</copy>
<mkdir dir="${help.run}"/>
<copy todir="${help.run}">
<fileset dir="${help.src}">
<include name="help.jar"/>
</fileset>
</copy>
<mkdir dir="${img.run}"/>
<copy todir="${img.run}">
<fileset dir="${img.src}"/>
</copy>
<mkdir dir="${share.run}"/>
<copy todir="${share.run}">
<fileset dir="${share.src}"/>
</copy>
<mkdir dir="${class.run}"/>
</target>
<!-- compile target -->
<target name="compile" depends="init"
description="Compiles all source files">
<javac includeAntRuntime="false" srcdir="${src.src}" destdir="${class.run}" deprecation="on" verbose="no">
<!-- <compilerarg value="-Xlint:unchecked"/> -->
<include name="**/*.java"/>
<classpath>
<fileset dir="${lib.run}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<!-- all target - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="all" depends="jar, clean"
description="Copy runtime files, build and clean up"/>
<!-- jar-atlantis target - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Keep for compatibility with existing CMT requirements file -->
<target name="jar-atlantis" depends="all"
description="Create jar file of Atlantis">
</target>
<!-- jar target - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="jar" depends="compile"
description="Create all jar files for deployment">
<manifestclasspath property="jar.classpath" jarfile="${atlantis.jar}">
<classpath refid="classpath.mf"/>
</manifestclasspath>
<!-- jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<jar destfile="${atlantis.jar}">
<fileset dir="${class.run}" />
<fileset dir="${targetDir}">
<exclude name="classes/*"/>
<exclude name="lib/*"/>
<exclude name="help/*"/>
<include name="*/*"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="${atlantis.main.class}"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
<attribute name="Implementation-Title" value="Atlantis"/>
</manifest>
</jar>
</target>
<!-- webstartcommon target - - - - - - - - - - - - - - - - - - - - -->
<target name="webstartcommon" depends="compile">
<manifestclasspath property="jar.classpath" jarfile="${atlantis.jar}">
<classpath refid="classpath.mf"/>
</manifestclasspath>
<jar destfile="${atlantis.jar}">
<fileset dir="${class.run}" />
<fileset dir="${targetDir}">
<exclude name="classes/*"/>
<exclude name="lib/*"/>
<exclude name="help/*"/>
<include name="*/*"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="${atlantis.main.class}"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
<attribute name="Implementation-Title" value="Atlantis"/>
</manifest>
</jar>
<!-- clean up, leave only lib/*.jar, help/*.jar, atlantis.jar -->
<delete dir="${conf.run}"/>
<delete dir="${events.run}"/>
<delete dir="${geom.run}"/>
<delete dir="${img.run}"/>
<delete dir="${share.run}"/>
<antcall target="clean"/>
<antcall target="webstartjarsigner"/>
</target>
<!-- webstart - distribution via webstart (lib/*.jar, help/*.jar and
atlantis.jar (includes all data files) -->
<target name="webstart" depends="webstartcommon"
description="atlantis distribution for Java WebStart">
<!-- copy webstart .jnlp files -->
<copy file="${share.src}/atlantis.jnlp" todir="${targetDir}">
<filterset>
<filter token="CODEBASE" value="${codebase}"/>
</filterset>
</copy>
</target>
<!-- webstart - MINERVA version -->
<target name="webstart-minerva" depends="compile"
description="Atlantis MINERVA distribution for Java WebStart">
<!-- copy webstart .jnlp files -->
<copy file="${share.src}/MINERVA.jnlp" todir="${targetDir}">
<filterset>
<filter token="CODEBASE" value="${codebase}"/>
</filterset>
</copy>
</target>
<target name="webstart-config">
<!-- copy webstart .jnlp files -->
<copy file="${share.src}/specificconfig.jnlp" tofile="${targetDir}/${config}.jnlp">
<filterset>
<filter token="CODEBASE" value="${codebase}"/>
<filter token="HREF" value="${config}.jnlp"/>
<filter token="CONFIG" value="config-${config}.xml"/>
</filterset>
</copy>
</target>
<!-- webstart including basic atlantis.jnlp and "specific system configurations" -->
<target name="webstart-all" depends="webstart,webstart-specificconfigs,webstart-minerva"
description="Atlantis for Java Webstart including basic atlantis.jnlp and specific system configurations"/>
<target name="webstart-specificconfigs">
<foreach param="config" list="${configs}" target="webstart-config"/>
</target>
<!-- webstartjarsigner target - - - - - - - - - - - - - - - - - - - -->
<target name="webstartjarsigner" description="Sign all jar files">
<delete file="${targetDir}/keystore"/>
<exec executable="${java.home}/bin/keytool">
<arg line="-genkey -dname 'cn=Atlantis team' -alias Atlantis
-keypass ${password} -keystore ${targetDir}/keystore
-storepass ${password} -validity 180"/>
</exec>
<signjar alias="Atlantis"
keystore="${targetDir}/keystore"
keypass="${password}"
storepass="${password}">
<fileset file="${lib.run}/*.jar" />
<fileset file="${help.run}/*.jar"/>
<fileset file="${atlantis.jar}"/>
</signjar>
<delete file="${targetDir}/keystore"/>
</target>
<!-- updateconfigurations target - - - - - - - - - - - - - - - - - - -->
<!-- update special configurations - jython script performs update of
all special / customised configurations shipped with atlantis and then
runs Atlantis with each configuration file -->
<target name="updateconfigs" depends="jar"
description="Update / synchronise customised configuration files">
<echo>Requires jython available in PATH, otherwise fails.</echo>
<!-- arg to exec - arguments to specify atlantis distribution direct.
and where the configuration files for updating are located -->
<!-- exec for unix, mac -->
<exec executable="jython" osfamily="unix" failonerror="true">
<arg line="share/configupdater.py --atlantis ${targetDir}
--update ${conf.src}"/>
</exec>
<!-- exec for windows -->
<exec executable="cmd" osfamily="windows" failonerror="true">
<arg value="/c"/>
<arg value="jython.bat"/>
<arg value="share\configupdater.py"/>
<arg value="--atlantis"/>
<arg line="${targetDir}"/>
<arg line="--update"/>
<arg line="${conf.src}"/>
</exec>
<echo>Deleting build directory ${targetDir}, calling delete ...</echo>
<delete dir="${targetDir}"/>
</target>
<!-- javadoc target - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="javadoc" description="Make Javadoc documentation">
<mkdir dir="${targetDir}" />
<javadoc packagenames="atlantis.*"
sourcepath="${src.src}"
destdir="${targetDir}"
overview="${src.src}/overview.html"
doctitle="Atlantis event display for ATLAS"
>
<classpath>
<fileset dir="${lib.src}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
<!-- clean target - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="clean" description="Erase *.class generated files">
<delete dir="${class.run}"/>
</target>
<target name="test" depends="unit-tests,gui-tests" description="Run all tests">
<!-- If testcase is set, specified test is run here. -->
<junit printsummary="yes" haltonerror="no" haltonfailure="no" failureProperty="test.failed" errorProperty="test.failed"
fork="yes" timeout="${test.timeout}">
<sysproperty key="atlantis.test.events" file="${test.events}"/>
<formatter type="xml"/>
<test name="${testcase}" toDir="${report.test}" if="testcase"/>
<classpath refid="classpath.test"/>
</junit>
<mkdir dir="${report.test}/html"/>
<junitreport todir="${report.test}">
<fileset dir="${report.test}">
<include name="TEST-*.xml"/>
</fileset>
<report todir="${report.test}/html"/>
</junitreport>
<fail message="Failed JUnit test(s)" if="test.failed"/>
</target>
<!-- Has to continue on failure or error so report target can run. -->
<!-- Not sure why need haltonerror="no" even if failures occur but no errors -->
<target name="unit-tests" depends="compile-tests,jar" description="Run unit tests">
<mkdir dir="${report.test}"/>
<junit printsummary="yes" haltonerror="no" haltonfailure="no" failureProperty="test.failed" errorProperty="test.failed"
fork="yes" timeout="${test.timeout}">
<sysproperty key="atlantis.test.events" file="${test.events}"/>
<formatter type="xml"/>
<!-- If testcase is set, specified test will be run in "test" target. Otherwise run all of them. -->
<batchtest toDir="${report.test}" unless="testcase">
<fileset dir="${test.run}" includes="atlantis/**/*Test.class"/>
</batchtest>
<classpath refid="classpath.test"/>
</junit>
</target>
<!-- Has to continue on failure or error so report target can run. -->
<!-- Not sure why need haltonerror="no" even if failures occur but no errors -->
<target name="gui-tests" depends="compile-tests,jar" description="Run GUI tests">
<mkdir dir="${report.test}"/>
<junit printsummary="yes" haltonerror="no" haltonfailure="no" failureProperty="test.failed" errorProperty="test.failed"
fork="yes" timeout="${test.timeout}">
<sysproperty key="atlantis.test.events" file="${test.events}"/>
<formatter type="xml"/>
<!-- If testcase is set, specified test will be run in "test" target. Otherwise run all of them. -->
<batchtest toDir="${report.test}" unless="testcase">
<fileset dir="${test.run}" includes="guitest/**/*Test.class">
</fileset>
</batchtest>
<classpath refid="classpath.test"/>
</junit>
</target>
<!-- compile-tests target: compile JUnit tests -->
<target name="compile-tests" depends="compile"
description="Compiles source files for all tests">
<mkdir dir="${lib.run}/test"/>
<copy todir="${lib.run}/test">
<fileset dir="${lib.src}/test">
<include name="*.jar"/>
</fileset>
</copy>
<mkdir dir="${test.run}"/>
<javac includeAntRuntime="false" srcdir="${test.src}" destdir="${test.run}" deprecation="on" verbose="no">
<include name="**/*.java"/>
<classpath>
<fileset dir="${lib.run}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.test}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${class.run}"/>
</classpath>
</javac>
<path id="classpath.test">
<fileset dir="${lib.run}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${lib.test}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${targetDir}/atlantis.jar"/>
<pathelement path="${test.run}"/>
</path>
</target>
<!-- usage target - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="usage" description="Prints usage hint">
<echo level="info" message="Usage:"/>
<echo>targetDir - directory to build atlantis distribution in</echo>
<echo>ant -DtargetDir=[target directory] [all|jar|javadoc|test|report|updateconfigs]</echo>
<echo>and -DtargetDir=[target directory] -Dtestcase=[test-case class] test</echo>
<echo>ant -DtargetDir=[target directory] [-Dcodebase="Webstart codebase URL"] [webstart|webstart-specificconfigs|webstart-all]</echo>
</target>
<!-- help target - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<target name="help" depends="usage" description="Prints usage hint"/>
</project>
Loading