Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Commit

Permalink
Retrofit for AntRun 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainhalle committed Apr 26, 2018
1 parent 2cfab18 commit fca1b00
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 47 deletions.
94 changes: 47 additions & 47 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
xmlns:jacoco="antlib:org.jacoco.ant">

<!-- The build script's version number. Do not edit! -->
<property name="antrun.version" value="1.2.2"/>
<property name="antrun.version" value="1.3"/>

<!-- Load project properties from XML file -->
<xmlproperty file="config.xml"/>
Expand Down Expand Up @@ -117,14 +117,33 @@
<echo level="info">Your extension folder is ${build.extdir}</echo>
<!-- Create depdir -->
<mkdir dir="${build.depdir}"/>
<!-- Create a global classpath that other tasks will refer to -->
<path id="build.classpath">
<pathelement location="${build.bindir}"/>
<fileset dir="${build.depdir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${build.libdir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${java.class.path}"/>
</path>
</target>

<!-- Check if a local rt.jar is present. If so, it will override the
default rt.jar present in the system. The "compile" task should
depend on this. -->
<target name="check-rt" depends="init">
<available file="rt.jar" property="localrt.present"/>
<echo message="Local bootstrap JAR is present"/>
<if>
<available file="rt.jar"/>
<then>
<echo message="Local bootstrap JAR is present"/>
</then>
<else>
<echo message="Local bootstrap JAR is not present"/>
</else>
</if>
<var name="java6.boot.classpath" unset="true"/>
<property name="java6.boot.classpath" value="rt.jar"/>
</target>
Expand Down Expand Up @@ -156,13 +175,7 @@
destdir="${build.bindir}"
debug="${build.debug}"
includeantruntime="false">
<classpath>
<pathelement location="${build.bindir}"/>
<fileset dir="${build.depdir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${java.class.path}"/>
</classpath>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.bindir}" includeemptydirs="false">
<fileset dir="${build.srcdir}">
Expand All @@ -183,15 +196,7 @@
srcdir="${build.test.srcdir}"
destdir="${build.test.bindir}"
includeantruntime="false">
<classpath>
<pathelement location="${build.bindir}"/>
<fileset dir="${build.depdir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${java.class.path}"/>
<pathelement location="${build.libdir}/${junit.jarname}"/>
<pathelement location="${build.libdir}/${junit.hamcrest}"/>
</classpath>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.test.bindir}" includeemptydirs="false">
<fileset dir="${build.test.srcdir}" excludes="**/*.java"/>
Expand Down Expand Up @@ -219,25 +224,18 @@
<doctitle><![CDATA[<h1>]]>${build.name}<![CDATA[ Documentation</h1>]]></doctitle>
<bottom><![CDATA[<i>Copyright&nbsp;&#169; ]]>${build.author}<![CDATA[. All Rights Reserved.</i>]]></bottom>
<link href="http://docs.oracle.com/javase/6/docs/api/"/>
<classpath>
<pathelement location="${build.bindir}"/>
<fileset dir="${build.depdir}">
<include name="*.jar"/>
</fileset>
<pathelement path="${java.class.path}"/>
<pathelement location="${build.libdir}/${junit.jarname}"/>
<pathelement location="${build.libdir}/${junit.hamcrest}"/>
</classpath>
<classpath refid="build.classpath"/>
</javadoc>
</target>

<!-- Target: jar
Generates a JAR file with the compiled files and javadoc
-->
<target name="jar" depends="compile,javadoc" description="Create the runnable JAR">
<target name="jar" depends="compile" description="Create the runnable JAR">
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<echo message="WITHDOC ${build.jar.withdoc}"/>
<jar destfile="${build.jar.filename}" filesetmanifest="skip">
<manifest>
<attribute name="Main-Class" value="${build.mainclass}"/>
Expand Down Expand Up @@ -273,14 +271,7 @@
<junit printsummary="yes" haltonfailure="false" fork="true"
failureproperty="test.failed">
<classpath>
<pathelement location="${build.bindir}"/>
<fileset dir="${build.depdir}">
<include name="*.jar"/>
</fileset>
<pathelement location="${build.test.bindir}"/>
<pathelement path="${java.class.path}"/>
<pathelement location="${build.libdir}/${junit.jarname}"/>
<pathelement location="${build.libdir}/${junit.hamcrest}"/>
<classpath refid="build.classpath"/>
</classpath>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
Expand Down Expand Up @@ -482,7 +473,7 @@
<param name="classname" path="classname/text()"/>
<actions>
<if>
<available classname="@{classname}"/>
<available classname="@{classname}" classpathref="build.classpath"/>
<then>
<echo message="@{depname} is installed" level="info"/>
</then>
Expand All @@ -508,41 +499,50 @@
<mkdir dir="${build.depdir}"/>
<xmltask source="config.xml">
<call path="/build/dependencies/dependency">
<param name="bundle" path="bundle/text()"/>
<param name="depname" path="name/text()"/>
<param name="classname" path="classname/text()"/>
<actions>
<var name="depdest" value="${build.depdir}"/>
<if>
<equals arg1="false" arg2="@{bundle}" casesensitive="true" trim="true"/>
<then>
<var name="depdest" value="${build.libdir}"/>
</then>
</if>
<echo message="Checking if @{depname} is installed" level="info"/>
<if>
<available classname="@{classname}"/>
<available classname="@{classname}" classpathref="build.classpath"/>
<then>
<!-- It's there, do nothing -->
</then>
<else>
<echo message="@{depname} not present in classpath. Downloading..." level="info"/>
<echo message="@{depname} not present in classpath. Downloading and copying into ${depdest}..." level="info"/>
<xmltask source="config.xml">
<call path="/build/dependencies/dependency[name='@{depname}']/files/jar">
<param name="url" path="text()"/>
<actions>
<get src="@{url}" dest="${build.depdir}"/>
<get src="@{url}" dest="${depdest}"/>
</actions>
</call>
<call path="/build/dependencies/dependency[name='@{depname}']/files/zip">
<param name="url" path="text()"/>
<actions>
<get src="@{url}" dest="${build.depdir}"/>
<get src="@{url}" dest="${depdest}"/>
<var name="basename" unset="true"/>
<basename property="basename" file="@{url}"/>
<unzip src="${build.depdir}/${basename}" dest="${build.depdir}">
<patternset>
<include name="**/*.jar"/>
</patternset>
<mapper type="flatten"/>
</unzip>
<unzip src="${depdest}/${basename}" dest="${depdest}">
<patternset>
<include name="**/*.jar"/>
</patternset>
<mapper type="flatten"/>
</unzip>
</actions>
</call>
</xmltask>
</else>
</if>

</actions>
</call>
</xmltask>
Expand Down
10 changes: 10 additions & 0 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
<!-- Output jar -->
<jar>
<filename>cornipickle.jar</filename>
<withsrc>false</withsrc>
<withdoc>false</withdoc>
<withdeps>true</withdeps>
</jar>

<!-- Redefine directories -->
Expand All @@ -62,6 +65,7 @@
<files>
<zip>http://archive.apache.org/dist/commons/cli/binaries/commons-cli-1.3.1-bin.zip</zip>
</files>
<bundle>true</bundle>
</dependency>
<dependency>
<!--
Expand All @@ -72,6 +76,7 @@
<files>
<zip>https://github.com/sylvainhalle/Bullwinkle/releases/download/v1.4.2/bullwinkle-1.4.2.zip</zip>
</files>
<bundle>true</bundle>
</dependency>
<dependency>
<!--
Expand All @@ -82,6 +87,7 @@
<files>
<zip>https://github.com/liflab/json-lif/releases/download/v1.6.3/json-lif-1.6.3.zip</zip>
</files>
<bundle>true</bundle>
</dependency>
<dependency>
<!--
Expand All @@ -92,6 +98,7 @@
<files>
<zip>https://github.com/sylvainhalle/Azrael/releases/download/v0.7.3-alpha/azrael-0.7.3-alpha.zip</zip>
</files>
<bundle>true</bundle>
</dependency>
<dependency>
<!--
Expand All @@ -102,6 +109,7 @@
<files>
<zip>https://github.com/sylvainhalle/Jerrydog/releases/download/v0.3.1/jerrydog-0.3.1.zip</zip>
</files>
<bundle>true</bundle>
</dependency>
<dependency>
<!--
Expand All @@ -112,6 +120,7 @@
<files>
<zip>http://selenium-release.storage.googleapis.com/2.53/selenium-java-2.53.0.zip</zip>
</files>
<bundle>false</bundle>
</dependency>
<dependency>
<!--
Expand All @@ -122,6 +131,7 @@
<files>
<zip>https://selenium-release.storage.googleapis.com/2.44/selenium-server-standalone-2.44.0.jar</zip>
</files>
<bundle>false</bundle>
</dependency>
</dependencies>
</build>

0 comments on commit fca1b00

Please sign in to comment.