move ivy bootstrapping to BootstrapIvy.xml

This commit is contained in:
millmanorama 2017-04-05 17:42:51 +02:00
parent c0db3bdcc7
commit 2f9a7906f4
2 changed files with 33 additions and 29 deletions

30
BootstrapIvy.xml Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="BootstrapIvy" default="all" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="ivy.install.version" value="2.3.0-rc2" />
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<property name="ivy.home" value="${user.home}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<target name="download-ivy" unless="offline">
<available file="${ivy.jar.file}" property="ivy.available"/>
<antcall target="-download-ivy" />
</target>
<target name="-download-ivy" unless="ivy.available">
<mkdir dir="${ivy.jar.dir}"/>
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<!-- init-ivy will bootstrap Ivy if the user doesn't have it already -->
<target name="init-ivy" depends="download-ivy" unless="ivy.lib.path">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
</project>

View File

@ -5,36 +5,9 @@
<project name="org.sleuthkit.autopsy.core" default="netbeans" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" > <project name="org.sleuthkit.autopsy.core" default="netbeans" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" >
<description>Builds, tests, and runs the project org.sleuthkit.autopsy.core</description> <description>Builds, tests, and runs the project org.sleuthkit.autopsy.core</description>
<import file="nbproject/build-impl.xml"/> <import file="nbproject/build-impl.xml"/>
<import file="../BootstrapIvy.xml"/>
<property name="ivy.install.version" value="2.3.0-rc2" />
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<property name="ivy.home" value="${user.home}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<target name="download-ivy" unless="offline">
<available file="${ivy.jar.file}" property="ivy.available"/>
<antcall target="-download-ivy" />
</target>
<target name="-download-ivy" unless="ivy.available">
<mkdir dir="${ivy.jar.dir}"/>
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<!-- init-ivy will bootstrap Ivy if the user doesn't have it already -->
<target name="init-ivy" depends="download-ivy" unless="ivy.lib.path">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<property name="thirdparty.dir" value="${basedir}/../thirdparty" /> <property name="thirdparty.dir" value="${basedir}/../thirdparty" />
<property name="release.dir" value="${basedir}/release" /> <property name="release.dir" value="${basedir}/release" />
<property name="modules.dir" value="${release.dir}/modules/" /> <property name="modules.dir" value="${release.dir}/modules/" />
@ -120,6 +93,7 @@
<!--Override clean to delete jars, etc downloaded with Ivy <!--Override clean to delete jars, etc downloaded with Ivy
or copied in from thirdparty folder. This way we don't end up with or copied in from thirdparty folder. This way we don't end up with
out-of-date/unneeded stuff in the installer--> out-of-date/unneeded stuff in the installer-->
<mkdir dir="${release.dir}"/>
<delete includeemptydirs="true" > <delete includeemptydirs="true" >
<fileset dir="${release.dir}" includes="**/*"/> <fileset dir="${release.dir}" includes="**/*"/>
</delete> </delete>