93 lines
4.3 KiB
XML
93 lines
4.3 KiB
XML
<project basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
|
|
<!-- IVY properteis set here -->
|
|
<property name="ivy.repo.dir" value="${user.home}/ivyrepo" />
|
|
|
|
<loadproperties srcfile="${ivy.dir}/libraries.properties" />
|
|
<property name="asfrepo" value="https://repository.apache.org/content/repositories/snapshots" />
|
|
<property name="mvnrepo" value="http://repo2.maven.org/maven2" />
|
|
<property name="ivy.jar" location="${ivy.dir}/ivy-${ivy.version}.jar" />
|
|
<property name="ant_task.jar" location="${ivy.dir}/maven-ant-tasks-${ant-task.version}.jar" />
|
|
<property name="ant_task_repo_url" value="${mvnrepo}/org/apache/maven/maven-ant-tasks/${ant-task.version}/maven-ant-tasks-${ant-task.version}.jar" />
|
|
<property name="ivy_repo_url" value="${mvnrepo}/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" />
|
|
<property name="ivysettings.xml" location="${ivy.dir}/ivysettings.xml" />
|
|
<property name="ivy.org" value="org.apache.hadoop" />
|
|
|
|
<property name="build.ivy.dir" location="${build.dir}/ivy" />
|
|
<property name="build.ivy.lib.dir" location="${build.ivy.dir}/lib" />
|
|
<property name="common.ivy.lib.dir" location="${build.ivy.lib.dir}/common" />
|
|
<property name="test.ivy.lib.dir" location="${build.ivy.lib.dir}/test" />
|
|
<property name="build.ivy.report.dir" location="${build.ivy.dir}/report" />
|
|
<property name="build.ivy.maven.dir" location="${build.ivy.dir}/maven" />
|
|
|
|
<!--this is the naming policy for artifacts we want pulled down-->
|
|
<property name="ivy.module" location="hadoop-hbase" />
|
|
<property name="ivy.artifact.retrieve.pattern" value="[conf]/[artifact]-[revision].[ext]" />
|
|
|
|
<property name="ivyresolvelog" value="download-only"/>
|
|
<property name="ivyretrievelog" value="default"/>
|
|
|
|
<target name="ivy-init-dirs">
|
|
<mkdir dir="${build.ivy.dir}" />
|
|
<mkdir dir="${build.ivy.lib.dir}" />
|
|
<mkdir dir="${build.ivy.report.dir}" />
|
|
<mkdir dir="${build.ivy.maven.dir}" />
|
|
<mkdir dir="${common.ivy.lib.dir}" />
|
|
</target>
|
|
|
|
<target name="ivy-probe-antlib">
|
|
<condition property="ivy.found">
|
|
<typefound uri="antlib:org.apache.ivy.ant" name="cleancache" />
|
|
</condition>
|
|
</target>
|
|
|
|
<target name="ivy-download" description="To download ivy" unless="offline">
|
|
<get src="${ivy_repo_url}" dest="${ivy.jar}" usetimestamp="true" />
|
|
</target>
|
|
|
|
<target name="ivy-init-antlib" depends="ivy-download,ivy-init-dirs,ivy-probe-antlib" unless="ivy.found">
|
|
<typedef uri="antlib:org.apache.ivy.ant" onerror="fail" loaderRef="ivyLoader">
|
|
<classpath>
|
|
<pathelement location="${ivy.jar}" />
|
|
</classpath>
|
|
</typedef>
|
|
<fail>
|
|
<condition>
|
|
<not>
|
|
<typefound uri="antlib:org.apache.ivy.ant" name="cleancache" />
|
|
</not>
|
|
</condition>
|
|
You need Apache Ivy 2.0 or later from http://ant.apache.org/
|
|
It could not be loaded from ${ivy_repo_url}
|
|
</fail>
|
|
</target>
|
|
|
|
|
|
<target name="ivy-init" depends="ivy-init-antlib">
|
|
|
|
<!--Configure Ivy by reading in the settings file
|
|
If anyone has already read in a settings file into this settings ID, it gets priority
|
|
-->
|
|
<ivy:configure settingsid="${ant.project.name}.ivy.settings" file="${ivysettings.xml}" override='false' realm="Sonatype Nexus Repository Manager" />
|
|
|
|
</target>
|
|
|
|
<target name="ivy-resolve-common" depends="ivy-init">
|
|
<ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="common" log="${ivyresolvelog}" />
|
|
</target>
|
|
|
|
<target name="ivy-retrieve-common" depends="ivy-resolve-common" description="Retrieve Ivy-managed artifacts for the compile configurations">
|
|
<ivy:retrieve settingsRef="${ant.project.name}.ivy.settings" pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" log="${ivyretrievelog}" />
|
|
<ivy:cachepath pathid="ivy-common.classpath" conf="common" />
|
|
</target>
|
|
|
|
<target name="ivy-resolve-test" depends="ivy-init">
|
|
<ivy:resolve settingsRef="${ant.project.name}.ivy.settings" conf="test" log="${ivyresolvelog}" />
|
|
</target>
|
|
|
|
<target name="ivy-retrieve-test" depends="ivy-resolve-test" description="Retrieve Ivy-managed artifacts for the test configurations">
|
|
<ivy:retrieve settingsRef="${ant.project.name}.ivy.settings" pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" log="${ivyretrievelog}" />
|
|
<ivy:cachepath pathid="ivy-common.classpath" conf="test" />
|
|
</target>
|
|
|
|
</project>
|