mirror of https://github.com/apache/ant-ivy
Whitespace cleanup
This commit is contained in:
parent
147fe0eb27
commit
a2fdfe6737
|
|
@ -14,22 +14,19 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="retrieve-ivy-deps" default="retrieve-all"
|
||||
<project name="retrieve-ivy-deps" default="retrieve-all"
|
||||
xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<target name="init-ivy">
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant">
|
||||
<classpath>
|
||||
<pathelement location="ivy.jar" />
|
||||
</classpath>
|
||||
</taskdef>
|
||||
uri="antlib:org.apache.ivy.ant"
|
||||
classpath="ivy.jar"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="report">
|
||||
<ivy:report graph="false" todir="report" />
|
||||
<ivy:report graph="false" todir="report"/>
|
||||
<echo>
|
||||
=======================================================================
|
||||
Dependencies retrieved in lib directory
|
||||
|
|
@ -37,22 +34,22 @@ Dependency report generated in report directory
|
|||
=======================================================================
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="retrieve-conf" depends="init-ivy"
|
||||
description="--> Retrieves a set of configuration (get only dependencies needed).">
|
||||
<ivy:info file="ivy.xml" />
|
||||
<ivy:info file="ivy.xml"/>
|
||||
<echo>
|
||||
=======================================================================
|
||||
Please enter configuration (or comma separated list of configurations).
|
||||
Available configurations are: ${ivy.configurations}</echo>
|
||||
<input message="Configuration(s):" addproperty="ivy.confs"/>
|
||||
<ivy:retrieve conf="${ivy.confs}"/>
|
||||
<antcall target="report" inheritRefs="true" />
|
||||
<antcall target="report" inheritRefs="true"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="retrieve-all" depends="init-ivy"
|
||||
description="--> Retrieves all Ivy dependencies into the lib directory">
|
||||
<ivy:retrieve />
|
||||
<antcall target="report" inheritRefs="true" />
|
||||
<ivy:retrieve/>
|
||||
<antcall target="report" inheritRefs="true"/>
|
||||
</target>
|
||||
</project>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
under the License.
|
||||
-->
|
||||
<project name="IvyRelease" default="snapshot"
|
||||
xmlns:ivy="antlib:org.apache.ivy.ant"
|
||||
xmlns:ivy2="antlib:org.apache.ivy.ant_2"
|
||||
xmlns:xooki="antlib:xooki"
|
||||
xmlns:openpgp="antlib:org.apache.commons.openpgp.ant">
|
||||
xmlns:ivy="antlib:org.apache.ivy.ant"
|
||||
xmlns:ivy2="antlib:org.apache.ivy.ant_2"
|
||||
xmlns:xooki="antlib:xooki"
|
||||
xmlns:openpgp="antlib:org.apache.commons.openpgp.ant">
|
||||
<import file="build.xml"/>
|
||||
|
||||
<macrodef name="run-tutorial">
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
</sequential>
|
||||
</macrodef>
|
||||
|
||||
<target name="generate-tutorial-output" depends="jar, generate-doc-init">
|
||||
<target name="generate-tutorial-output" depends="jar,generate-doc-init">
|
||||
<property name="output.dir" value="${build.dir}/output"/>
|
||||
<delete dir="${output.dir}"/>
|
||||
<mkdir dir="${output.dir}"/>
|
||||
|
|
@ -176,12 +176,12 @@
|
|||
<copy todir="${doc.tmp.dir}" preservelastmodified="true" overwrite="true">
|
||||
<fileset dir="${doc.src.dir}"/>
|
||||
<filterset>
|
||||
<filter token="version" value="${build.version}"/>
|
||||
<filter token="version" value="${build.version}"/>
|
||||
</filterset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="generate-doc" depends="generate-doc-init, generate-tutorial-output">
|
||||
<target name="generate-doc" depends="generate-doc-init,generate-tutorial-output">
|
||||
<copy todir="${doc.build.dir}">
|
||||
<fileset dir="${doc.src.dir}" includes="images/**,style/**,samples/**,js/**,ivy.xsd"/>
|
||||
<fileset dir="${doc.tmp.dir}" includes="tutorial/log/multi-project-general-publishall.txt"/>
|
||||
|
|
@ -216,13 +216,13 @@
|
|||
xookidir="${doc.src.dir}/xooki"/>
|
||||
</target>
|
||||
|
||||
<target name="all-doc" depends="javadoc, generate-doc"/>
|
||||
<target name="all-doc" depends="javadoc,generate-doc"/>
|
||||
|
||||
<target name="init-snapshot" depends="default-version">
|
||||
<property name="snapshot.full.name" value="apache-ivy-${build.version}"/>
|
||||
</target>
|
||||
|
||||
<target name="snapshot-metadata" depends="init-snapshot, resolve">
|
||||
<target name="snapshot-metadata" depends="init-snapshot,resolve">
|
||||
<mkdir dir="${artifacts.build.dir}"/>
|
||||
<ivy:deliver
|
||||
deliverpattern="${artifacts.build.dir}/ivy.xml"
|
||||
|
|
@ -244,12 +244,12 @@
|
|||
<zipfileset dir="${build.dir}/snapshot-src" prefix="${snapshot.full.name}"/>
|
||||
</zip>
|
||||
<tar destfile="${distrib.dir}/dist/${build.version}/${snapshot.full.name}-src.tar.gz"
|
||||
compression="gzip" longfile="gnu">
|
||||
compression="gzip" longfile="gnu">
|
||||
<zipfileset src="${distrib.dir}/dist/${build.version}/${snapshot.full.name}-src.zip"/>
|
||||
</tar>
|
||||
</target>
|
||||
|
||||
<target name="snapshot-bin-without-dependencies" depends="snapshot-metadata, jar, all-doc">
|
||||
<target name="snapshot-bin-without-dependencies" depends="snapshot-metadata,jar,all-doc">
|
||||
<mkdir dir="${distrib.dir}/dist/${build.version}"/>
|
||||
<zip destfile="${distrib.dir}/dist/${build.version}/${snapshot.full.name}-bin.zip">
|
||||
<zipfileset dir="${doc.build.dir}" prefix="${snapshot.full.name}/doc" excludes="**/reports/coverage/**,**/reports/test/**"/>
|
||||
|
|
@ -266,12 +266,12 @@
|
|||
<zipfileset dir="${artifacts.build.dir}/jars" includes="${final.name}" fullpath="${snapshot.full.name}/ivy-${build.version}.jar"/>
|
||||
</zip>
|
||||
<tar destfile="${distrib.dir}/dist/${build.version}/${snapshot.full.name}-bin.tar.gz"
|
||||
compression="gzip" longfile="gnu">
|
||||
compression="gzip" longfile="gnu">
|
||||
<zipfileset src="${distrib.dir}/dist/${build.version}/${snapshot.full.name}-bin.zip"/>
|
||||
</tar>
|
||||
</target>
|
||||
|
||||
<target name="snapshot-bin-with-dependencies" depends="snapshot-metadata, jar, all-doc">
|
||||
<target name="snapshot-bin-with-dependencies" depends="snapshot-metadata,jar,all-doc">
|
||||
<mkdir dir="${distrib.dir}/dist/${build.version}"/>
|
||||
<delete dir="${build.dir}/lib"/>
|
||||
<ivy:retrieve conf="default" pattern="${build.dir}/lib/[artifact]-[revision].[ext]"/>
|
||||
|
|
@ -297,15 +297,14 @@
|
|||
</target>
|
||||
|
||||
<target name="snapshot-bin"
|
||||
depends="snapshot-bin-with-dependencies, snapshot-bin-without-dependencies"/>
|
||||
depends="snapshot-bin-with-dependencies,snapshot-bin-without-dependencies"/>
|
||||
|
||||
<target name="release-xsd" depends="init-snapshot">
|
||||
<!-- copies current ivy xml schema to doc source, so that it will be available from web site -->
|
||||
<copy file="${src.dir}/org/apache/ivy/plugins/parser/xml/ivy.xsd" todir="${doc.src.dir}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="snapshot-maven2" depends="init-snapshot, snapshot-metadata, jar, sources, javadoc">
|
||||
<target name="snapshot-maven2" depends="init-snapshot,snapshot-metadata,jar,sources,javadoc">
|
||||
<property name="m2.distrib.dir" value="${distrib.dir}/maven2/${build.version}"/>
|
||||
<ivy:makepom ivyfile="${artifacts.build.dir}/ivy.xml"
|
||||
pomfile="${m2.distrib.dir}/ivy-${build.version}.pom"
|
||||
|
|
@ -337,7 +336,6 @@
|
|||
</checksum>
|
||||
</target>
|
||||
|
||||
|
||||
<target name="snapshot-checksums">
|
||||
<checksum algorithm="md5">
|
||||
<fileset dir="${distrib.dir}/dist/${build.version}">
|
||||
|
|
@ -382,7 +380,7 @@
|
|||
<ivy:retrieve conf="default" pattern="${build.dir}/lib/[artifact]-[revision].[ext]"/>
|
||||
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant_2">
|
||||
uri="antlib:org.apache.ivy.ant_2">
|
||||
<classpath>
|
||||
<fileset dir="${artifacts.build.dir}/jars" includes="${final.name}"/>
|
||||
<fileset dir="${build.dir}/lib" excludes="ant-*.jar"/>
|
||||
|
|
@ -473,11 +471,11 @@
|
|||
</fail>
|
||||
</target>
|
||||
|
||||
<target name="upload-nexus" depends="release-version, init-ivy, jar">
|
||||
<target name="upload-nexus" depends="release-version,init-ivy,jar">
|
||||
<ivy:retrieve conf="default" pattern="${build.dir}/lib/[artifact]-[revision].[ext]"/>
|
||||
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant_2">
|
||||
uri="antlib:org.apache.ivy.ant_2">
|
||||
<classpath>
|
||||
<fileset dir="${artifacts.build.dir}/jars" includes="${final.name}"/>
|
||||
<fileset dir="${build.dir}/lib" excludes="ant-*.jar"/>
|
||||
|
|
@ -494,14 +492,14 @@
|
|||
<ivy2:settings id="upload.settingsId" file="ivysettings-release.xml"/>
|
||||
<ivy2:resolve file="${basedir}/build/artifact/ivy.xml" transitive="false"/>
|
||||
<ivy2:publish organisation="org.apache.ivy"
|
||||
module="ivy"
|
||||
revision="${build.version}"
|
||||
srcivypattern="${basedir}/build/artifact/ivy.xml"
|
||||
artifactspattern="${basedir}/build/distrib/maven2/[revision]/[artifact]-[revision](-[classifier]).[ext]"
|
||||
publishivy="false"
|
||||
conf="core"
|
||||
settingsRef="upload.settingsId"
|
||||
resolver="nexus">
|
||||
module="ivy"
|
||||
revision="${build.version}"
|
||||
srcivypattern="${basedir}/build/artifact/ivy.xml"
|
||||
artifactspattern="${basedir}/build/distrib/maven2/[revision]/[artifact]-[revision](-[classifier]).[ext]"
|
||||
publishivy="false"
|
||||
conf="core"
|
||||
settingsRef="upload.settingsId"
|
||||
resolver="nexus">
|
||||
<!-- The standard maven2 artifacts -->
|
||||
<artifact name="ivy" ext="pom" type="ivy"/>
|
||||
<artifact name="ivy" ext="jar" type="sources" classifier="sources"/>
|
||||
|
|
@ -510,10 +508,10 @@
|
|||
</target>
|
||||
|
||||
<target name="prepare-snapshot"
|
||||
depends="/localivy, clean-ivy-home, clean, clean-lib, snapshot-version, install, clean-examples, test-report"/>
|
||||
depends="/localivy, clean-ivy-home, clean, clean-lib, snapshot-version, install, clean-examples, test-report" />
|
||||
<target name="snapshot"
|
||||
depends="prepare-snapshot, snapshot-src, snapshot-bin, snapshot-maven2, snapshot-checksums"
|
||||
depends="prepare-snapshot,snapshot-src,snapshot-bin,snapshot-maven2,snapshot-checksums"
|
||||
description="used for nightly and integration builds"/>
|
||||
<target name="release" depends="release-version, /localivy, clean-ivy-home, clean, clean-lib, rat, snapshot" description="make a new release of Ivy"/>
|
||||
<target name="release" depends="release-version,/localivy,clean-ivy-home,clean,clean-lib,rat,snapshot" description="make a new release of Ivy"/>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@
|
|||
-->
|
||||
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="ivy-bintray-example" default="retrieve">
|
||||
<target name="retrieve">
|
||||
<ivy:retrieve />
|
||||
<ivy:retrieve/>
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<echo>Nothing to clean here.</echo>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -15,106 +15,108 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<!-- ======================================================================
|
||||
<!-- ======================================================================
|
||||
This is a sample project to build our own ivy repository.
|
||||
====================================================================== -->
|
||||
<project name="ivy-repository" default="maven2" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<property name="settings.dir" value="settings"/>
|
||||
<property name="from.resolver" value="libraries"/>
|
||||
<property name="to.resolver" value="my-repository"/>
|
||||
|
||||
<property name="ivy.cache.dir" value="${basedir}/cache" />
|
||||
<property name="dest.repo.dir" value="${basedir}/myrepository" />
|
||||
<property name="settings.dir" value="settings"/>
|
||||
<property name="from.resolver" value="libraries"/>
|
||||
<property name="to.resolver" value="my-repository"/>
|
||||
|
||||
<property name="ivy.jar.dir" value="${user.home}/.ivy2/jars" />
|
||||
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
|
||||
<property name="ivy.cache.dir" value="${basedir}/cache"/>
|
||||
<property name="dest.repo.dir" value="${basedir}/myrepository"/>
|
||||
|
||||
<!-- =================================
|
||||
target: load-ivy
|
||||
this target is not necessary if you put ivy.jar in your ant lib directory
|
||||
if you already have ivy 1.4 in your ant lib, you can simply remove this
|
||||
target
|
||||
<property name="ivy.jar.dir" value="${user.home}/.ivy2/jars"/>
|
||||
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
|
||||
|
||||
<!-- =================================
|
||||
target: load-ivy
|
||||
this target is not necessary if you put ivy.jar in your ant lib directory
|
||||
if you already have ivy 1.4 in your ant lib, you can simply remove this
|
||||
target
|
||||
================================= -->
|
||||
<target name="load-ivy">
|
||||
<!-- try to load ivy here from home ivy dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as ivy home lib dir exists (it may be empty) and
|
||||
ivy is in at least one of ant's lib dir or the ivy home lib dir. -->
|
||||
<path id="ivy.lib.path">
|
||||
<pathelement location="${ivy.jar.file}"/>
|
||||
</path>
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
||||
</target>
|
||||
|
||||
<!-- - - - - - - - - - - - - - - - - -
|
||||
target: init-ivy
|
||||
- - - - - - - - - - - - - - - - - -->
|
||||
<target name="init-ivy" depends="load-ivy">
|
||||
<ivy:settings id="basic.settings" file="${settings.dir}/ivysettings-basic.xml"/>
|
||||
<ivy:settings id="advanced.settings" file="${settings.dir}/ivysettings-advanced.xml"/>
|
||||
<!-- try to load ivy here from home ivy dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as ivy home lib dir exists (it may be empty) and
|
||||
ivy is in at least one of ant's lib dir or the ivy home lib dir. -->
|
||||
<path id="ivy.lib.path">
|
||||
<pathelement location="${ivy.jar.file}"/>
|
||||
</path>
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================
|
||||
<!-- - - - - - - - - - - - - - - - - -
|
||||
target: init-ivy
|
||||
- - - - - - - - - - - - - - - - - -->
|
||||
<target name="init-ivy" depends="load-ivy">
|
||||
<ivy:settings id="basic.settings" file="${settings.dir}/ivysettings-basic.xml"/>
|
||||
<ivy:settings id="advanced.settings" file="${settings.dir}/ivysettings-advanced.xml"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================
|
||||
target: maven2
|
||||
maven 2 no namespace and no dependencies
|
||||
================================= -->
|
||||
<target name="maven2" depends="init-ivy"
|
||||
description="--> install module from maven 2 repository">
|
||||
<ivy:install settingsRef="basic.settings"
|
||||
organisation="commons-lang" module="commons-lang" revision="1.0"
|
||||
from="${from.resolver}" to="${to.resolver}" />
|
||||
description="--> install module from maven 2 repository">
|
||||
<ivy:install settingsRef="basic.settings"
|
||||
organisation="commons-lang" module="commons-lang" revision="1.0"
|
||||
from="${from.resolver}" to="${to.resolver}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
<!-- =================================
|
||||
target: maven2-deps
|
||||
maven 2 no namespace with dependencies
|
||||
================================= -->
|
||||
<target name="maven2-deps" depends="init-ivy"
|
||||
description="--> install module from maven 2 repository with dependencies">
|
||||
<ivy:install settingsRef="basic.settings"
|
||||
organisation="org.hibernate" module="hibernate" revision="3.2.5.ga"
|
||||
from="${from.resolver}" to="${to.resolver}" transitive="true" />
|
||||
<target name="maven2-deps" depends="init-ivy"
|
||||
description="--> install module from maven 2 repository with dependencies">
|
||||
<ivy:install settingsRef="basic.settings"
|
||||
organisation="org.hibernate" module="hibernate" revision="3.2.5.ga"
|
||||
from="${from.resolver}" to="${to.resolver}" transitive="true"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
<!-- =================================
|
||||
target: maven2-namespace
|
||||
maven 2 with namespace no dependencies
|
||||
================================= -->
|
||||
<target name="maven2-namespace" depends="init-ivy"
|
||||
description="--> install module from maven 2 using namespaces">
|
||||
<ivy:install settingsRef="advanced.settings"
|
||||
organisation="apache" module="commons-lang" revision="1.0"
|
||||
from="${from.resolver}" to="${to.resolver}" />
|
||||
<target name="maven2-namespace" depends="init-ivy"
|
||||
description="--> install module from maven 2 using namespaces">
|
||||
<ivy:install settingsRef="advanced.settings"
|
||||
organisation="apache" module="commons-lang" revision="1.0"
|
||||
from="${from.resolver}" to="${to.resolver}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
<!-- =================================
|
||||
target: maven2-namespace-deps
|
||||
maven 2 with namespace and dependencies
|
||||
================================= -->
|
||||
<target name="maven2-namespace-deps" depends="init-ivy"
|
||||
description="--> install module with dependencies from maven2 repo using namespaces">
|
||||
<ivy:install settingsRef="advanced.settings"
|
||||
organisation="hibernate" module="hibernate" revision="3.2.5.ga"
|
||||
from="${from.resolver}" to="${to.resolver}" transitive="true" />
|
||||
description="--> install module with dependencies from maven2 repo using namespaces">
|
||||
<ivy:install settingsRef="advanced.settings"
|
||||
organisation="hibernate" module="hibernate" revision="3.2.5.ga"
|
||||
from="${from.resolver}" to="${to.resolver}" transitive="true"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" depends="init-ivy" description="--> clean the cache">
|
||||
<ivy:cleancache settingsRef="basic.settings" />
|
||||
<ivy:cleancache settingsRef="advanced.settings" />
|
||||
<delete dir="${ivy.cache.dir}" failonerror="true" />
|
||||
<ivy:cleancache settingsRef="basic.settings"/>
|
||||
<ivy:cleancache settingsRef="advanced.settings"/>
|
||||
<delete dir="${ivy.cache.dir}" failonerror="true"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
<!-- =================================
|
||||
target: clean-repo
|
||||
================================= -->
|
||||
<target name="clean-repo" description="--> clean the destination repository">
|
||||
<delete dir="${dest.repo.dir}" failonerror="true" />
|
||||
<delete dir="${dest.repo.dir}" failonerror="true"/>
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="clean-repo"/>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,25 +14,25 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project default="clean-all" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean directories">
|
||||
<ant dir="chainedresolvers-project" antfile="build.xml" target="clean" inheritall="false" inheritrefs="false" />
|
||||
<ant dir="chainedresolvers-project" antfile="build.xml" target="clean" inheritall="false" inheritrefs="false"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<property name="ivy.settings.dir" value="settings" />
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
|
||||
<target name="clean-all" depends="clean, clean-cache" description="--> clean directories and ivy cache"/>
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<property name="ivy.settings.dir" value="settings"/>
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
|
||||
<target name="clean-all" depends="clean,clean-cache" description="--> clean directories and ivy cache"/>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,68 +14,68 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="chainedresolvers-project" default="run" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- some variables used -->
|
||||
<property name="lib.dir" value="${basedir}/lib" />
|
||||
<property name="build.dir" value="${basedir}/build" />
|
||||
<property name="src.dir" value="${basedir}/src" />
|
||||
|
||||
<!-- ivy properties used -->
|
||||
<property name="ivy.settings.dir" value="../settings" />
|
||||
<property name="lib.dir" value="${basedir}/lib"/>
|
||||
<property name="build.dir" value="${basedir}/build"/>
|
||||
<property name="src.dir" value="${basedir}/src"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<!-- ivy properties used -->
|
||||
<property name="ivy.settings.dir" value="../settings"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<path id="lib.path.id">
|
||||
<fileset dir="${lib.dir}" />
|
||||
</path>
|
||||
<fileset dir="${lib.dir}"/>
|
||||
</path>
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id" />
|
||||
<path location="${build.dir}" />
|
||||
<path refid="lib.path.id"/>
|
||||
<path location="${build.dir}"/>
|
||||
</path>
|
||||
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" description="--> resolve and retrieve dependencies with ivy">
|
||||
<ivy:retrieve/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
|
||||
<!-- =================================
|
||||
target: run
|
||||
================================= -->
|
||||
<target name="run" depends="resolve" description="--> compile and run the project">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" />
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id"/>
|
||||
<java classpathref="run.path.id" classname="example.Hello"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}">
|
||||
<exclude name="src/**" />
|
||||
<exclude name="build.xml" />
|
||||
<exclude name="ivy.xml" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<exclude name="src/**"/>
|
||||
<exclude name="build.xml"/>
|
||||
<exclude name="ivy.xml"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,84 +14,85 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="configurations" default="run.dev" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- some variables used -->
|
||||
<property name="lib.dir" value="lib" />
|
||||
<property name="build.dir" value="build" />
|
||||
<property name="src.dir" value="src" />
|
||||
|
||||
<property name="lib.dir" value="lib"/>
|
||||
<property name="build.dir" value="build"/>
|
||||
<property name="src.dir" value="src"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<path id="compile.path.id">
|
||||
<fileset dir="${lib.dir}/compile" />
|
||||
</path>
|
||||
<path id="lib.run.dev.id">
|
||||
<path location="${build.dir}" />
|
||||
<fileset dir="${lib.dir}/rundev" />
|
||||
</path>
|
||||
<path id="lib.run.prod.id">
|
||||
<path location="${build.dir}" />
|
||||
<fileset dir="${lib.dir}/runprod" />
|
||||
<fileset dir="${lib.dir}/compile"/>
|
||||
</path>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
<path id="lib.run.dev.id">
|
||||
<path location="${build.dir}"/>
|
||||
<fileset dir="${lib.dir}/rundev"/>
|
||||
</path>
|
||||
<path id="lib.run.prod.id">
|
||||
<path location="${build.dir}"/>
|
||||
<fileset dir="${lib.dir}/runprod"/>
|
||||
</path>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" description="--> retreive dependencies with ivy">
|
||||
<!-- conf="*" will copie artifacts defined for each conf in a dir matching conf name -->
|
||||
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact]-[revision].[ext]"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
<!-- conf="*" will copy artifacts defined for each conf in a dir matching conf name -->
|
||||
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact]-[revision].[ext]"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: run.dev
|
||||
<!-- =================================
|
||||
target: run.dev
|
||||
================================= -->
|
||||
<target name="run.dev" depends="resolve" description="--> compile and run the project">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.run.dev.id" includeAntRuntime="false"/>
|
||||
<copy todir="${build.dir}">
|
||||
<fileset dir="${src.dir}" includes="**/*.properties"></fileset>
|
||||
</copy>
|
||||
<copy todir="${build.dir}">
|
||||
<fileset dir="${src.dir}" includes="**/*.properties"></fileset>
|
||||
</copy>
|
||||
<java classpathref="lib.run.dev.id" classname="example.ConfigurationsExample" fork="true">
|
||||
<arg value="--dev"/>
|
||||
<arg value="--dev"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: run.prod
|
||||
|
||||
<!-- =================================
|
||||
target: run.prod
|
||||
================================= -->
|
||||
<target name="run.prod" depends="resolve" description="--> compile and run the project">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.run.prod.id" includeAntRuntime="false"/>
|
||||
<copy todir="${build.dir}">
|
||||
<fileset dir="${src.dir}" includes="**/*.properties"></fileset>
|
||||
</copy>
|
||||
<java classpathref="lib.run.prod.id" classname="example.ConfigurationsExample" fork="true" />
|
||||
<copy todir="${build.dir}">
|
||||
<fileset dir="${src.dir}" includes="**/*.properties"></fileset>
|
||||
</copy>
|
||||
<java classpathref="lib.run.prod.id" classname="example.ConfigurationsExample" fork="true"/>
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}">
|
||||
<exclude name="src/**" />
|
||||
<exclude name="build.xml" />
|
||||
<exclude name="ivy.xml" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<exclude name="src/**"/>
|
||||
<exclude name="build.xml"/>
|
||||
<exclude name="ivy.xml"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,125 +14,126 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="filter-framework" default="publish" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- some variables used -->
|
||||
<property name="lib.dir" value="lib" />
|
||||
<property name="build.dir" value="build" />
|
||||
<property name="distrib.dir" location="distrib" />
|
||||
<property name="src.dir" value="src" />
|
||||
<property name="test.dir" value="test" />
|
||||
<property name="build.test.dir" value="${build.dir}/test-classes" />
|
||||
<property name="report.test.dir" value="${build.dir}/test-report" />
|
||||
<property name="revision" value="1.3" />
|
||||
|
||||
<property name="ivy.local.default.root" location="${user.home}/.ivy2/local"/>
|
||||
|
||||
<property name="lib.dir" value="lib"/>
|
||||
<property name="build.dir" value="build"/>
|
||||
<property name="distrib.dir" location="distrib"/>
|
||||
<property name="src.dir" value="src"/>
|
||||
<property name="test.dir" value="test"/>
|
||||
<property name="build.test.dir" value="${build.dir}/test-classes"/>
|
||||
<property name="report.test.dir" value="${build.dir}/test-report"/>
|
||||
<property name="revision" value="1.3"/>
|
||||
|
||||
<property name="ivy.local.default.root" location="${user.home}/.ivy2/local"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<path id="compile.path.id">
|
||||
<fileset dir="${lib.dir}/cc-impl" />
|
||||
</path>
|
||||
|
||||
<fileset dir="${lib.dir}/cc-impl"/>
|
||||
</path>
|
||||
|
||||
<path id="test.path.id">
|
||||
<path location="${build.dir}" />
|
||||
<path location="${build.test.dir}" />
|
||||
<fileset dir="${lib.dir}/test" />
|
||||
</path>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
<path location="${build.dir}"/>
|
||||
<path location="${build.test.dir}"/>
|
||||
<fileset dir="${lib.dir}/test"/>
|
||||
</path>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" description="--> retreive dependencies with ivy">
|
||||
<!-- conf="*" will copie artifacts defined for each conf in a dir matching conf name -->
|
||||
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact]-[revision].[ext]"/>
|
||||
<target name="resolve" description="--> retrieve dependencies with ivy">
|
||||
<!-- conf="*" will copie artifacts defined for each conf in a dir matching conf name -->
|
||||
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact]-[revision].[ext]"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: build
|
||||
|
||||
<!-- =================================
|
||||
target: build
|
||||
================================= -->
|
||||
<target name="build" depends="clean, resolve" description="--> compile and jar project">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${distrib.dir}"/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${distrib.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="compile.path.id" includeAntRuntime="false"/>
|
||||
<jar destfile="${distrib.dir}/filter-api.jar" >
|
||||
<fileset dir="${build.dir}">
|
||||
<include name="filter/*.class"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
<jar destfile="${distrib.dir}/filter-hmimpl.jar" >
|
||||
<fileset dir="${build.dir}">
|
||||
<include name="filter/hmimpl/*.class"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
<jar destfile="${distrib.dir}/filter-ccimpl.jar" >
|
||||
<fileset dir="${build.dir}">
|
||||
<include name="filter/ccimpl/*.class"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
<jar destfile="${distrib.dir}/filter-api.jar" >
|
||||
<fileset dir="${build.dir}">
|
||||
<include name="filter/*.class"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
<jar destfile="${distrib.dir}/filter-hmimpl.jar" >
|
||||
<fileset dir="${build.dir}">
|
||||
<include name="filter/hmimpl/*.class"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
<jar destfile="${distrib.dir}/filter-ccimpl.jar" >
|
||||
<fileset dir="${build.dir}">
|
||||
<include name="filter/ccimpl/*.class"/>
|
||||
</fileset>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: test
|
||||
================================= -->
|
||||
<target name="test" depends="build" description="--> compile and test the project">
|
||||
<mkdir dir="${report.test.dir}"/>
|
||||
<mkdir dir="${build.test.dir}"/>
|
||||
|
||||
<javac srcdir="${test.dir}" destdir="${build.test.dir}" classpathref="test.path.id"/>
|
||||
<junit printsummary="yes" fork="yes" haltonfailure="yes" >
|
||||
<classpath refid="test.path.id"/>
|
||||
<formatter type="plain"/>
|
||||
<batchtest todir="${report.test.dir}" >
|
||||
<fileset dir="${build.test.dir}">
|
||||
<include name="**/**Test.*"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: publish
|
||||
================================= -->
|
||||
|
||||
<!-- =================================
|
||||
target: test
|
||||
================================= -->
|
||||
<target name="test" depends="build" description="--> compile and test the project">
|
||||
<mkdir dir="${report.test.dir}"/>
|
||||
<mkdir dir="${build.test.dir}"/>
|
||||
|
||||
<javac srcdir="${test.dir}" destdir="${build.test.dir}" classpathref="test.path.id"/>
|
||||
<junit printsummary="yes" fork="yes" haltonfailure="yes" >
|
||||
<classpath refid="test.path.id"/>
|
||||
<formatter type="plain"/>
|
||||
<batchtest todir="${report.test.dir}" >
|
||||
<fileset dir="${build.test.dir}">
|
||||
<include name="**/**Test.*"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: publish
|
||||
================================= -->
|
||||
<target name="publish" depends="test" description="--> compile test and publish this project in the local ivy repository">
|
||||
<property name="revision" value="${revision}"/>
|
||||
<ivy:publish artifactspattern="${distrib.dir}/[artifact].[ext]"
|
||||
resolver="local"
|
||||
pubrevision="${revision}"
|
||||
status="release"/>
|
||||
<echo message="project ${ant.project.name} released with version ${revision}" />
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: clean
|
||||
<ivy:publish artifactspattern="${distrib.dir}/[artifact].[ext]"
|
||||
resolver="local"
|
||||
pubrevision="${revision}"
|
||||
status="release"/>
|
||||
<echo message="project ${ant.project.name} released with version ${revision}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}">
|
||||
<exclude name="src/**" />
|
||||
<exclude name="test/**" />
|
||||
<exclude name="build.xml" />
|
||||
<exclude name="ivy.xml" />
|
||||
<exclude name=".*" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<exclude name="src/**"/>
|
||||
<exclude name="test/**"/>
|
||||
<exclude name="build.xml"/>
|
||||
<exclude name="ivy.xml"/>
|
||||
<exclude name=".*"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-local
|
||||
================================= -->
|
||||
<target name="clean-local" description="--> clean the local user repository">
|
||||
<delete dir="${ivy.local.default.root}"/>
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: clean-local
|
||||
================================= -->
|
||||
<target name="clean-local" description="--> clean the local user repository">
|
||||
<delete dir="${ivy.local.default.root}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}"/>
|
||||
|
|
|
|||
|
|
@ -14,80 +14,81 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="myapp" default="run-cc" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- some variables used -->
|
||||
<property name="lib.dir" value="lib" />
|
||||
<property name="build.dir" value="build" />
|
||||
<property name="src.dir" value="src" />
|
||||
|
||||
<property name="lib.dir" value="lib"/>
|
||||
<property name="build.dir" value="build"/>
|
||||
<property name="src.dir" value="src"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<path id="lib.path.id">
|
||||
<fileset dir="${lib.dir}/build" />
|
||||
</path>
|
||||
<fileset dir="${lib.dir}/build"/>
|
||||
</path>
|
||||
<path id="run.hm.path.id">
|
||||
<path location="${build.dir}" />
|
||||
<fileset dir="${lib.dir}/noexternaljar" />
|
||||
<path location="${build.dir}"/>
|
||||
<fileset dir="${lib.dir}/noexternaljar"/>
|
||||
</path>
|
||||
<path id="run.cc.path.id">
|
||||
<path location="${build.dir}" />
|
||||
<fileset dir="${lib.dir}/withexternaljar" />
|
||||
<path location="${build.dir}"/>
|
||||
<fileset dir="${lib.dir}/withexternaljar"/>
|
||||
</path>
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" description="--> retreive dependencies with ivy">
|
||||
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact].[ext]"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
<target name="resolve" description="--> retrieve dependencies with ivy">
|
||||
<ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[artifact].[ext]"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: build
|
||||
|
||||
<!-- =================================
|
||||
target: build
|
||||
================================= -->
|
||||
<target name="build" depends="resolve" description="--> compile the project">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" includeAntRuntime="false"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: run with home made implementation
|
||||
|
||||
<!-- =================================
|
||||
target: run with home made implementation
|
||||
================================= -->
|
||||
<target name="run-hm" depends="build" description="--> run the project with ome made implementation">
|
||||
<java classpathref="run.hm.path.id" classname="myapp.Main" fork="true"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: run with ext lib implementation
|
||||
<!-- =================================
|
||||
target: run with ext lib implementation
|
||||
================================= -->
|
||||
<target name="run-cc" depends="build" description="--> run the project with ext lib implementation">
|
||||
<java classpathref="run.cc.path.id" classname="myapp.Main" fork="true"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}">
|
||||
<exclude name="src/**" />
|
||||
<exclude name="build.xml" />
|
||||
<exclude name="ivy.xml" />
|
||||
<exclude name=".*" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<exclude name="src/**"/>
|
||||
<exclude name="build.xml"/>
|
||||
<exclude name="ivy.xml"/>
|
||||
<exclude name=".*"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,29 +14,29 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project default="clean">
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean directories">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="settings" excludes="ivysettings.*" />
|
||||
</delete>
|
||||
<ant dir="dependee" antfile="build.xml" target="clean" inheritall="false" inheritrefs="false" />
|
||||
<ant dir="depender" antfile="build.xml" target="clean" inheritall="false" inheritrefs="false" />
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="settings" excludes="ivysettings.*"/>
|
||||
</delete>
|
||||
<ant dir="dependee" antfile="build.xml" target="clean" inheritall="false" inheritrefs="false"/>
|
||||
<ant dir="depender" antfile="build.xml" target="clean" inheritall="false" inheritrefs="false"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: all
|
||||
<!-- =================================
|
||||
target: all
|
||||
================================= -->
|
||||
<target name="all" depends="clean" description="--> make the whole example of dependency">
|
||||
<ant dir="dependee" antfile="build.xml" target="publish" inheritall="false" inheritrefs="false" />
|
||||
<ant dir="depender" antfile="build.xml" inheritall="false" inheritrefs="false" />
|
||||
<ant dir="dependee" antfile="build.xml" target="publish" inheritall="false" inheritrefs="false" />
|
||||
<ant dir="depender" antfile="build.xml" inheritall="false" inheritrefs="false" />
|
||||
<ant dir="dependee" antfile="build.xml" target="publish" inheritall="false" inheritrefs="false"/>
|
||||
<ant dir="depender" antfile="build.xml" inheritall="false" inheritrefs="false"/>
|
||||
<ant dir="dependee" antfile="build.xml" target="publish" inheritall="false" inheritrefs="false"/>
|
||||
<ant dir="depender" antfile="build.xml" inheritall="false" inheritrefs="false"/>
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,97 +14,95 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="dependee" default="run" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- some variables used -->
|
||||
<property name="lib.dir" value="${basedir}/lib" />
|
||||
<property name="build.dir" value="${basedir}/build" />
|
||||
<property name="classes.dir" value="${build.dir}/classes" />
|
||||
<property name="src.dir" value="${basedir}/src" />
|
||||
<property name="lib.dir" value="${basedir}/lib"/>
|
||||
<property name="build.dir" value="${basedir}/build"/>
|
||||
<property name="classes.dir" value="${build.dir}/classes"/>
|
||||
<property name="src.dir" value="${basedir}/src"/>
|
||||
|
||||
<!-- ivy properties used -->
|
||||
<property name="ivy.settings.dir" value="../settings" />
|
||||
<property file="${ivy.settings.dir}/ivysettings.properties" />
|
||||
|
||||
<property name="ivy.settings.dir" value="../settings"/>
|
||||
<property file="${ivy.settings.dir}/ivysettings.properties"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<path id="lib.path.id">
|
||||
<fileset dir="${lib.dir}" />
|
||||
</path>
|
||||
<fileset dir="${lib.dir}"/>
|
||||
</path>
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id" />
|
||||
<path location="${classes.dir}" />
|
||||
<path refid="lib.path.id"/>
|
||||
<path location="${classes.dir}"/>
|
||||
</path>
|
||||
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" description="--> resolve and retrieve dependencies with ivy">
|
||||
<ivy:retrieve />
|
||||
<ivy:retrieve/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: compile
|
||||
|
||||
<!-- =================================
|
||||
target: compile
|
||||
================================= -->
|
||||
<target name="compile" depends="resolve" description="--> description">
|
||||
<mkdir dir="${classes.dir}" />
|
||||
<mkdir dir="${classes.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="lib.path.id" includeAntRuntime="false"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
|
||||
<!-- =================================
|
||||
target: run
|
||||
================================= -->
|
||||
<target name="run" depends="compile" description="--> compile and run the project">
|
||||
<java classpathref="run.path.id" classname="standalone.Main"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: jar
|
||||
|
||||
<!-- =================================
|
||||
target: jar
|
||||
================================= -->
|
||||
<target name="jar" depends="compile" description="--> make a jar file for this project">
|
||||
<propertyfile file="${classes.dir}/version.properties">
|
||||
<entry key="version" type="int" operation="+" default="0" />
|
||||
</propertyfile>
|
||||
<property file="${classes.dir}/version.properties" />
|
||||
<entry key="version" type="int" operation="+" default="0"/>
|
||||
</propertyfile>
|
||||
<property file="${classes.dir}/version.properties"/>
|
||||
<jar destfile="${build.dir}/${ant.project.name}.jar">
|
||||
<fileset dir="${classes.dir}" />
|
||||
<fileset dir="${classes.dir}"/>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: publish
|
||||
<!-- =================================
|
||||
target: publish
|
||||
================================= -->
|
||||
<target name="publish" depends="jar" description="--> publish this project in the ivy repository">
|
||||
<property name="revision" value="${version}"/>
|
||||
<delete file="${build.dir}/ivy.xml"/>
|
||||
<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
|
||||
resolver="projects"
|
||||
pubrevision="${revision}"
|
||||
status="release"
|
||||
/>
|
||||
<echo message="project ${ant.project.name} released with version ${revision}" />
|
||||
<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
|
||||
resolver="projects"
|
||||
pubrevision="${revision}"
|
||||
status="release"/>
|
||||
<echo message="project ${ant.project.name} released with version ${revision}"/>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}">
|
||||
<exclude name="src/**" />
|
||||
<exclude name="build.xml" />
|
||||
<exclude name="ivy.xml" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<exclude name="src/**"/>
|
||||
<exclude name="build.xml"/>
|
||||
<exclude name="ivy.xml"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,80 +14,80 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="depender" default="run" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- some variables used -->
|
||||
<property name="lib.dir" value="${basedir}/lib" />
|
||||
<property name="build.dir" value="${basedir}/build" />
|
||||
<property name="classes.dir" value="${build.dir}/classes" />
|
||||
<property name="src.dir" value="${basedir}/src" />
|
||||
<property name="lib.dir" value="${basedir}/lib"/>
|
||||
<property name="build.dir" value="${basedir}/build"/>
|
||||
<property name="classes.dir" value="${build.dir}/classes"/>
|
||||
<property name="src.dir" value="${basedir}/src"/>
|
||||
|
||||
<!-- ivy properties used -->
|
||||
<property name="ivy.settings.dir" value="../settings" />
|
||||
<property file="${ivy.settings.dir}/ivysettings.properties" />
|
||||
|
||||
<property name="ivy.settings.dir" value="../settings"/>
|
||||
<property file="${ivy.settings.dir}/ivysettings.properties"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<path id="lib.path.id">
|
||||
<fileset dir="${lib.dir}" />
|
||||
</path>
|
||||
<fileset dir="${lib.dir}"/>
|
||||
</path>
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id" />
|
||||
<path location="${classes.dir}" />
|
||||
<path refid="lib.path.id"/>
|
||||
<path location="${classes.dir}"/>
|
||||
</path>
|
||||
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" description="--> resolve and retrieve dependencies with ivy">
|
||||
<ivy:retrieve />
|
||||
<ivy:retrieve/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}" dot="true"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
|
||||
<!-- =================================
|
||||
target: gen-graph
|
||||
================================= -->
|
||||
<target name="gen-graph" depends="report" description="--> generates a graph of dependencies (requires dot in your path - see http://www.graphviz.org/)">
|
||||
<property name="dot.file" value="${build.dir}/apache-depending-default.dot" />
|
||||
<property name="ivygraph.output.file" value="${build.dir}/graph.png" />
|
||||
<exec executable="dot">
|
||||
<arg line="-T png -o ${ivygraph.output.file} ${dot.file}" />
|
||||
</exec>
|
||||
<property name="dot.file" value="${build.dir}/apache-depending-default.dot"/>
|
||||
<property name="ivygraph.output.file" value="${build.dir}/graph.png"/>
|
||||
<exec executable="dot">
|
||||
<arg line="-T png -o ${ivygraph.output.file} ${dot.file}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: compile
|
||||
|
||||
<!-- =================================
|
||||
target: compile
|
||||
================================= -->
|
||||
<target name="compile" depends="resolve" description="--> description">
|
||||
<mkdir dir="${classes.dir}" />
|
||||
<mkdir dir="${classes.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="lib.path.id" includeAntRuntime="false"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
|
||||
<!-- =================================
|
||||
target: run
|
||||
================================= -->
|
||||
<target name="run" depends="clean, compile" description="--> compile and run the project">
|
||||
<java classpathref="run.path.id" classname="depending.Main"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}">
|
||||
<exclude name="src/**" />
|
||||
<exclude name="build.xml" />
|
||||
<exclude name="ivy.xml" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<exclude name="src/**"/>
|
||||
<exclude name="build.xml"/>
|
||||
<exclude name="ivy.xml"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,25 +14,25 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project default="clean-all" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean directories">
|
||||
<ant dir="project" antfile="build.xml" target="clean" inheritall="false" inheritrefs="false" />
|
||||
<ant dir="project" antfile="build.xml" target="clean" inheritall="false" inheritrefs="false"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<property name="ivy.settings.dir" value="settings" />
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
|
||||
<target name="clean-all" depends="clean, clean-cache" description="--> clean directories and ivy cache"/>
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<property name="ivy.settings.dir" value="settings"/>
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
|
||||
<target name="clean-all" depends="clean,clean-cache" description="--> clean directories and ivy cache"/>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,68 +14,68 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="dual-ivy" default="run" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- some variables used -->
|
||||
<property name="lib.dir" value="${basedir}/lib" />
|
||||
<property name="build.dir" value="${basedir}/build" />
|
||||
<property name="src.dir" value="${basedir}/src" />
|
||||
|
||||
<!-- ivy properties used -->
|
||||
<property name="ivy.settings.dir" value="../settings" />
|
||||
<property name="lib.dir" value="${basedir}/lib"/>
|
||||
<property name="build.dir" value="${basedir}/build"/>
|
||||
<property name="src.dir" value="${basedir}/src"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<!-- ivy properties used -->
|
||||
<property name="ivy.settings.dir" value="../settings"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<path id="lib.path.id">
|
||||
<fileset dir="${lib.dir}" />
|
||||
</path>
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id" />
|
||||
<path location="${build.dir}" />
|
||||
<fileset dir="${lib.dir}"/>
|
||||
</path>
|
||||
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml" />
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id"/>
|
||||
<path location="${build.dir}"/>
|
||||
</path>
|
||||
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" description="--> resolve and retrieve dependencies with ivy">
|
||||
<ivy:retrieve />
|
||||
<ivy:retrieve/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
|
||||
<!-- =================================
|
||||
target: run
|
||||
================================= -->
|
||||
<target name="run" depends="resolve" description="--> compile and run the project">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" includeAntRuntime="false"/>
|
||||
<java classpathref="run.path.id" classname="example.Hello"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}">
|
||||
<exclude name="src/**" />
|
||||
<exclude name="build.xml" />
|
||||
<exclude name="ivy.xml" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<exclude name="src/**"/>
|
||||
<exclude name="build.xml"/>
|
||||
<exclude name="ivy.xml"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,100 +14,99 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="go-ivy" default="go" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!--
|
||||
this build file is a self contained project: it doesn't require anything else
|
||||
<!--
|
||||
this build file is a self contained project: it doesn't require anything else
|
||||
that ant 1.6.2 or greater and java 1.4 or greater properly installed.
|
||||
|
||||
|
||||
It is used to showcase how easy and straightforward it can be to use Ivy.
|
||||
|
||||
|
||||
This is not an example of the best pratice to use in a project, especially
|
||||
for the java source code "generation" :-) (see generate-src target)
|
||||
|
||||
|
||||
To run copy this file in an empty directory, open a shell or a command window
|
||||
in this directory and run "ant". It will download ivy and then use it to resolve
|
||||
in this directory and run "ant". It will download ivy and then use it to resolve
|
||||
the dependency of the class which is itself "contained" in this build script.
|
||||
|
||||
|
||||
After a successful build run "ant" again and you will see the build will be
|
||||
much faster.
|
||||
|
||||
|
||||
More information can be found at http://ant.apache.org/ivy/
|
||||
-->
|
||||
|
||||
<!-- here is the version of ivy we will use. change this property to try a newer
|
||||
version if you want -->
|
||||
<property name="ivy.install.version" value="2.0.0-beta1" />
|
||||
<property name="ivy.jar.dir" value="${basedir}/ivy" />
|
||||
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
|
||||
|
||||
<property name="build.dir" value="build" />
|
||||
<property name="src.dir" value="src" />
|
||||
|
||||
|
||||
<!-- here is the version of ivy we will use. change this property to try a newer
|
||||
version if you want -->
|
||||
<property name="ivy.install.version" value="2.0.0-beta1"/>
|
||||
<property name="ivy.jar.dir" value="${basedir}/ivy"/>
|
||||
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
|
||||
|
||||
<property name="build.dir" value="build"/>
|
||||
<property name="src.dir" value="src"/>
|
||||
|
||||
<target name="download-ivy" unless="skip.download">
|
||||
<mkdir dir="${ivy.jar.dir}"/>
|
||||
<!-- download Ivy from web site so that it can be used even without any special installation -->
|
||||
<echo message="installing ivy..."/>
|
||||
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
|
||||
dest="${ivy.jar.file}" usetimestamp="true"/>
|
||||
<mkdir dir="${ivy.jar.dir}"/>
|
||||
<!-- download Ivy from web site so that it can be used even without any special installation -->
|
||||
<echo message="installing ivy..."/>
|
||||
<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
|
||||
dest="${ivy.jar.file}" usetimestamp="true"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: install-ivy
|
||||
this target is not necessary if you put ivy.jar in your ant lib directory
|
||||
if you already have ivy in your ant lib, you can simply remove this
|
||||
target and the dependency the 'go' target has on it
|
||||
================================= -->
|
||||
|
||||
<!-- =================================
|
||||
target: install-ivy
|
||||
this target is not necessary if you put ivy.jar in your ant lib directory
|
||||
if you already have ivy in your ant lib, you can simply remove this
|
||||
target and the dependency the 'go' target has on it
|
||||
================================= -->
|
||||
<target name="install-ivy" depends="download-ivy" description="--> install ivy">
|
||||
<!-- try to load ivy here from local ivy dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as the ivy jar is in at least one of ant's lib dir or
|
||||
the local lib dir. -->
|
||||
<path id="ivy.lib.path">
|
||||
<pathelement location="${ivy.jar.file}"/>
|
||||
</path>
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: go
|
||||
Go ivy, go!
|
||||
<!-- try to load ivy here from local ivy dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as the ivy jar is in at least one of ant's lib dir or
|
||||
the local lib dir. -->
|
||||
<path id="ivy.lib.path">
|
||||
<pathelement location="${ivy.jar.file}"/>
|
||||
</path>
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: go
|
||||
Go ivy, go!
|
||||
================================= -->
|
||||
<target name="go" depends="install-ivy, generate-src"
|
||||
<target name="go" depends="install-ivy, generate-src"
|
||||
description="--> resolve dependencies, compile and run the project">
|
||||
<echo message="using ivy to resolve commons-lang 2.1..."/>
|
||||
<!-- here comes the magic line: asks ivy to resolve a dependency on
|
||||
<echo message="using ivy to resolve commons-lang 2.1..."/>
|
||||
<!-- here comes the magic line: asks ivy to resolve a dependency on
|
||||
commons-lang 2.1 and to build an ant path with it from its cache -->
|
||||
<ivy:cachepath organisation="commons-lang" module="commons-lang" revision="2.1"
|
||||
<ivy:cachepath organisation="commons-lang" module="commons-lang" revision="2.1"
|
||||
pathid="lib.path.id" inline="true"/>
|
||||
|
||||
<echo message="compiling..."/>
|
||||
<mkdir dir="${build.dir}" />
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" includeAntRuntime="false"/>
|
||||
|
||||
<echo>
|
||||
|
||||
<echo message="compiling..."/>
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" includeAntRuntime="false"/>
|
||||
|
||||
<echo>
|
||||
We are now ready to execute our simple program with its dependency on commons-lang.
|
||||
Let's go!
|
||||
</echo>
|
||||
<java classname="example.Hello">
|
||||
</echo>
|
||||
<java classname="example.Hello">
|
||||
<classpath>
|
||||
<path refid="lib.path.id" />
|
||||
<path location="${build.dir}" />
|
||||
<path refid="lib.path.id"/>
|
||||
<path location="${build.dir}"/>
|
||||
</classpath>
|
||||
</java>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: generate-src
|
||||
'Generates' the class source. It actually just echo a simple java
|
||||
source code to a file. In real life this file would already be
|
||||
present on your file system, and this target wouldn't be necessary.
|
||||
<!-- =================================
|
||||
target: generate-src
|
||||
'Generates' the class source. It actually just echo a simple java
|
||||
source code to a file. In real life this file would already be
|
||||
present on your file system, and this target wouldn't be necessary.
|
||||
================================= -->
|
||||
<target name="generate-src">
|
||||
<mkdir dir="${src.dir}/example" />
|
||||
<mkdir dir="${src.dir}/example"/>
|
||||
<echo file="${src.dir}/example/Hello.java">
|
||||
package example;
|
||||
|
||||
|
|
@ -117,35 +116,35 @@ public class Hello {
|
|||
public static void main(String[] args) {
|
||||
String message = "hello ivy !";
|
||||
System.out.println("standard message : " + message);
|
||||
System.out.println("capitalized by " + WordUtils.class.getName()
|
||||
System.out.println("capitalized by " + WordUtils.class.getName()
|
||||
+ " : " + WordUtils.capitalizeFully(message));
|
||||
}
|
||||
}
|
||||
</echo>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true" quiet="true">
|
||||
<fileset dir="${src.dir}" />
|
||||
<fileset dir="${build.dir}" />
|
||||
</delete>
|
||||
<fileset dir="${src.dir}"/>
|
||||
<fileset dir="${build.dir}"/>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-ivy
|
||||
|
||||
<!-- =================================
|
||||
target: clean-ivy
|
||||
================================= -->
|
||||
<target name="clean-ivy" description="--> clean the ivy installation">
|
||||
<delete dir="${ivy.jar.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
<target name="clean-ivy" description="--> clean the ivy installation">
|
||||
<delete dir="${ivy.jar.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" depends="install-ivy"
|
||||
description="--> clean the ivy cache">
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
<target name="clean-cache" depends="install-ivy"
|
||||
description="--> clean the ivy cache">
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,67 +14,67 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="hello-ivy" default="run" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- some variables used -->
|
||||
<property name="lib.dir" value="lib" />
|
||||
<property name="build.dir" value="build" />
|
||||
<property name="src.dir" value="src" />
|
||||
|
||||
<property name="lib.dir" value="lib"/>
|
||||
<property name="build.dir" value="build"/>
|
||||
<property name="src.dir" value="src"/>
|
||||
|
||||
<!-- paths used for compilation and run -->
|
||||
<path id="lib.path.id">
|
||||
<fileset dir="${lib.dir}" />
|
||||
</path>
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id" />
|
||||
<path location="${build.dir}" />
|
||||
<fileset dir="${lib.dir}"/>
|
||||
</path>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id"/>
|
||||
<path location="${build.dir}"/>
|
||||
</path>
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" description="--> retreive dependencies with ivy">
|
||||
<ivy:retrieve/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
<!-- =================================
|
||||
target: run
|
||||
================================= -->
|
||||
<target name="run" depends="resolve" description="--> compile and run the project">
|
||||
<mkdir dir="${build.dir}" />
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="lib.path.id" includeAntRuntime="false"/>
|
||||
<property name="msg" value="hello ivy !"/>
|
||||
<property name="msg" value="hello ivy !"/>
|
||||
<java classpathref="run.path.id" classname="example.Hello">
|
||||
<arg value="-message"/>
|
||||
<arg value="${msg}"/>
|
||||
</java>
|
||||
<arg value="-message"/>
|
||||
<arg value="${msg}"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" description="--> clean the project">
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}">
|
||||
<exclude name="src/**" />
|
||||
<exclude name="build.xml" />
|
||||
<exclude name="ivy.xml" />
|
||||
</fileset>
|
||||
</delete>
|
||||
<exclude name="src/**"/>
|
||||
<exclude name="build.xml"/>
|
||||
<exclude name="ivy.xml"/>
|
||||
</fileset>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
|
||||
<!-- =================================
|
||||
target: clean-cache
|
||||
================================= -->
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
<target name="clean-cache" description="--> clean the ivy cache">
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,56 +14,53 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="all"
|
||||
xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<property name="ivy.jar.dir" value="${user.home}/.ivy2/jars" />
|
||||
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
|
||||
<project name="all" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
|
||||
<property name="build.dir" value="build" />
|
||||
<property name="src.dir" value="src" />
|
||||
|
||||
|
||||
<!-- =================================
|
||||
target: load-ivy
|
||||
this target is not necessary if you put ivy.jar in your ant lib directory
|
||||
if you already have ivy 1.4 in your ant lib, you can simply remove this
|
||||
target
|
||||
<property name="ivy.jar.dir" value="${user.home}/.ivy2/jars"/>
|
||||
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
|
||||
|
||||
<property name="build.dir" value="build"/>
|
||||
<property name="src.dir" value="src"/>
|
||||
|
||||
|
||||
<!-- =================================
|
||||
target: load-ivy
|
||||
this target is not necessary if you put ivy.jar in your ant lib directory
|
||||
if you already have ivy 1.4 in your ant lib, you can simply remove this
|
||||
target
|
||||
================================= -->
|
||||
<target name="load-ivy">
|
||||
<!-- try to load ivy here from home ivy dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as ivy home lib dir exists (it may be empty) and
|
||||
ivy is in at least one of ant's lib dir or the ivy home lib dir. -->
|
||||
<path id="ivy.lib.path">
|
||||
<pathelement location="${ivy.jar.file}"/>
|
||||
</path>
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
||||
</target>
|
||||
|
||||
<target name="buildlist" depends="load-ivy">
|
||||
<ivy:buildlist reference="build-path">
|
||||
<fileset dir="projects" includes="**/build.xml"/>
|
||||
</ivy:buildlist>
|
||||
</target>
|
||||
|
||||
<target name="publish-all" depends="buildlist"
|
||||
description="compile, jar and publish all projects in the right order">
|
||||
<subant target="publish" buildpathref="build-path" />
|
||||
</target>
|
||||
<!-- try to load ivy here from home ivy dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as ivy home lib dir exists (it may be empty) and
|
||||
ivy is in at least one of ant's lib dir or the ivy home lib dir. -->
|
||||
<path id="ivy.lib.path">
|
||||
<pathelement location="${ivy.jar.file}"/>
|
||||
</path>
|
||||
<taskdef resource="org/apache/ivy/ant/antlib.xml"
|
||||
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
|
||||
</target>
|
||||
|
||||
<target name="clean-all" depends="buildlist" description="clean all projects">
|
||||
<subant target="clean" buildpathref="build-path" />
|
||||
<target name="buildlist" depends="load-ivy">
|
||||
<ivy:buildlist reference="build-path">
|
||||
<fileset dir="projects" includes="**/build.xml"/>
|
||||
</ivy:buildlist>
|
||||
</target>
|
||||
|
||||
<target name="publish-all" depends="buildlist"
|
||||
description="compile, jar and publish all projects in the right order">
|
||||
<subant target="publish" buildpathref="build-path"/>
|
||||
</target>
|
||||
|
||||
<target name="clean-all" depends="buildlist" description="clean all projects">
|
||||
<subant target="clean" buildpathref="build-path"/>
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="clean-all, load-ivy"
|
||||
description="clean tutorial: delete repository, ivy cache, and all projects">
|
||||
<delete dir="repository"/>
|
||||
<ivy:cleancache/>
|
||||
</target>
|
||||
|
||||
<target name="clean" depends="clean-all, load-ivy"
|
||||
description="clean tutorial: delete repository, ivy cache, and all projects">
|
||||
<delete dir="repository"/>
|
||||
<ivy:cleancache />
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -14,192 +14,187 @@
|
|||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
under the License.
|
||||
-->
|
||||
<project name="common"
|
||||
xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- a sample common ant build file, used for ivy multi-project tutorial
|
||||
feel free to copy and adapt it to your own needs
|
||||
Note that the only targets specific to ivy are:
|
||||
load-ivy
|
||||
resolve
|
||||
report
|
||||
ivy-new-version
|
||||
publish
|
||||
publish-local
|
||||
|
||||
All other targets are usual ant based targets, which could have been written
|
||||
in a build not depending at all on ivy:
|
||||
resolve constructs a lib directory based upon ivy dependencies, and then the lib dir
|
||||
is used as in any classical ant build
|
||||
-->
|
||||
|
||||
<property file="${common.dir}/build.properties"/>
|
||||
|
||||
<property name="ivy.jar.dir" value="${user.home}/.ivy2/jars" />
|
||||
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
|
||||
<project name="common" xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<!-- a sample common ant build file, used for ivy multi-project tutorial
|
||||
feel free to copy and adapt it to your own needs
|
||||
Note that the only targets specific to ivy are:
|
||||
load-ivy
|
||||
resolve
|
||||
report
|
||||
ivy-new-version
|
||||
publish
|
||||
publish-local
|
||||
|
||||
<!-- =================================
|
||||
target: load-ivy
|
||||
this target is not necessary if you put ivy.jar in your ant lib directory
|
||||
if you already have ivy 2.0 in your ant lib, you can simply remove this
|
||||
target
|
||||
================================= -->
|
||||
<target name="load-ivy">
|
||||
<!-- try to load ivy here from home ivy dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as ivy home lib dir exists (it may be empty) and
|
||||
ivy is in at least one of ant's lib dir or the ivy home lib dir. -->
|
||||
<mkdir dir="${ivy.jar.dir}" />
|
||||
<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>
|
||||
|
||||
<path id="lib.path.id">
|
||||
<fileset dir="${lib.dir}" />
|
||||
</path>
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id" />
|
||||
<path location="${classes.dir}" />
|
||||
</path>
|
||||
|
||||
|
||||
<!-- setup ivy default configuration with some custom info -->
|
||||
<property name="ivy.local.default.root" value="${repository.dir}/local"/>
|
||||
<property name="ivy.shared.default.root" value="${repository.dir}/shared"/>
|
||||
|
||||
<!-- here is how we would have configured ivy if we had our own ivysettings file
|
||||
<ivy:settings file="${common.dir}/ivysettings.xml" />
|
||||
All other targets are usual ant based targets, which could have been written
|
||||
in a build not depending at all on ivy:
|
||||
resolve constructs a lib directory based upon ivy dependencies, and then the lib dir
|
||||
is used as in any classical ant build
|
||||
-->
|
||||
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
<property file="${common.dir}/build.properties"/>
|
||||
|
||||
<property name="ivy.jar.dir" value="${user.home}/.ivy2/jars"/>
|
||||
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
|
||||
|
||||
<!-- =================================
|
||||
target: load-ivy
|
||||
this target is not necessary if you put ivy.jar in your ant lib directory
|
||||
if you already have ivy 2.0 in your ant lib, you can simply remove this
|
||||
target
|
||||
================================= -->
|
||||
<target name="load-ivy">
|
||||
<!-- try to load ivy here from home ivy dir, in case the user has not already dropped
|
||||
it into ant's lib dir (note that the latter copy will always take precedence).
|
||||
We will not fail as long as ivy home lib dir exists (it may be empty) and
|
||||
ivy is in at least one of ant's lib dir or the ivy home lib dir. -->
|
||||
<mkdir dir="${ivy.jar.dir}"/>
|
||||
<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>
|
||||
|
||||
<path id="lib.path.id">
|
||||
<fileset dir="${lib.dir}"/>
|
||||
</path>
|
||||
<path id="run.path.id">
|
||||
<path refid="lib.path.id"/>
|
||||
<path location="${classes.dir}"/>
|
||||
</path>
|
||||
|
||||
<!-- setup ivy default configuration with some custom info -->
|
||||
<property name="ivy.local.default.root" value="${repository.dir}/local"/>
|
||||
<property name="ivy.shared.default.root" value="${repository.dir}/shared"/>
|
||||
|
||||
<!-- here is how we would have configured ivy if we had our own ivysettings file
|
||||
<ivy:settings file="${common.dir}/ivysettings.xml"/>
|
||||
-->
|
||||
|
||||
<!-- =================================
|
||||
target: resolve
|
||||
================================= -->
|
||||
<target name="resolve" depends="clean-lib, load-ivy" description="--> resolve and retrieve dependencies with ivy">
|
||||
<mkdir dir="${lib.dir}"/> <!-- not usually necessary, ivy creates the directory IF there are dependencies -->
|
||||
|
||||
<!-- the call to resolve is not mandatory, retrieve makes an implicit call if we don't -->
|
||||
<ivy:resolve file="${ivy.file}"/>
|
||||
<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" />
|
||||
|
||||
<!-- the call to resolve is not mandatory, retrieve makes an implicit call if we don't -->
|
||||
<ivy:resolve file="${ivy.file}"/>
|
||||
<ivy:retrieve pattern="${lib.dir}/[artifact].[ext]"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
|
||||
<!-- =================================
|
||||
target: report
|
||||
================================= -->
|
||||
<target name="report" depends="resolve" description="--> generates a report of dependencies">
|
||||
<ivy:report todir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: compile
|
||||
|
||||
<!-- =================================
|
||||
target: compile
|
||||
================================= -->
|
||||
<target name="compile" depends="resolve" description="--> compile the project">
|
||||
<mkdir dir="${classes.dir}" />
|
||||
<mkdir dir="${classes.dir}"/>
|
||||
<javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="lib.path.id" debug="true" includeAntRuntime="false"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: run
|
||||
|
||||
<!-- =================================
|
||||
target: run
|
||||
================================= -->
|
||||
<target name="run" depends="version, compile" description="--> compile and run the project">
|
||||
<java classpathref="run.path.id" classname="${main.class.name}"/>
|
||||
</target>
|
||||
|
||||
<target name="ivy-new-version" depends="load-ivy" unless="ivy.new.revision">
|
||||
<!-- default module version prefix value -->
|
||||
<property name="module.version.prefix" value="${module.version.target}-dev-b" />
|
||||
|
||||
<!-- asks to ivy an available version number -->
|
||||
<ivy:info file="${ivy.file}" />
|
||||
<ivy:buildnumber
|
||||
organisation="${ivy.organisation}" module="${ivy.module}"
|
||||
revision="${module.version.prefix}" defaultBuildNumber="1" revSep=""/>
|
||||
</target>
|
||||
<target name="ivy-new-version" depends="load-ivy" unless="ivy.new.revision">
|
||||
<!-- default module version prefix value -->
|
||||
<property name="module.version.prefix" value="${module.version.target}-dev-b"/>
|
||||
|
||||
<target name="local-version">
|
||||
<tstamp>
|
||||
<format property="now" pattern="yyyyMMddHHmmss"/>
|
||||
</tstamp>
|
||||
<property name="ivy.new.revision" value="${module.version.target}-local-${now}"/>
|
||||
</target>
|
||||
|
||||
<target name="version" depends="ivy-new-version">
|
||||
<!-- create version file in classpath for later inclusion in jar -->
|
||||
<mkdir dir="${classes.dir}"/>
|
||||
<echo message="version=${ivy.new.revision}" file="${classes.dir}/${ant.project.name}.properties" append="false" />
|
||||
<!-- asks to ivy an available version number -->
|
||||
<ivy:info file="${ivy.file}"/>
|
||||
<ivy:buildnumber
|
||||
organisation="${ivy.organisation}" module="${ivy.module}"
|
||||
revision="${module.version.prefix}" defaultBuildNumber="1" revSep=""/>
|
||||
</target>
|
||||
|
||||
<!-- load generated version properties file -->
|
||||
<property file="${classes.dir}/${ant.project.name}.properties" />
|
||||
</target>
|
||||
<target name="local-version">
|
||||
<tstamp>
|
||||
<format property="now" pattern="yyyyMMddHHmmss"/>
|
||||
</tstamp>
|
||||
<property name="ivy.new.revision" value="${module.version.target}-local-${now}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: jar
|
||||
================================= -->
|
||||
<target name="jar" depends="version, compile" description="--> make a jar file for this project">
|
||||
<jar destfile="${jar.file}">
|
||||
<fileset dir="${classes.dir}" />
|
||||
<manifest>
|
||||
<attribute name="Built-By" value="${user.name}"/>
|
||||
<attribute name="Build-Version" value="${version}" />
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
<target name="version" depends="ivy-new-version">
|
||||
<!-- create version file in classpath for later inclusion in jar -->
|
||||
<mkdir dir="${classes.dir}"/>
|
||||
<echo message="version=${ivy.new.revision}" file="${classes.dir}/${ant.project.name}.properties" append="false"/>
|
||||
|
||||
<!-- =================================
|
||||
target: publish
|
||||
================================= -->
|
||||
<target name="publish" depends="clean-build, jar" description="--> publish this project in the ivy repository">
|
||||
<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
|
||||
resolver="shared"
|
||||
pubrevision="${version}"
|
||||
status="release"
|
||||
/>
|
||||
<echo message="project ${ant.project.name} released with version ${version}" />
|
||||
</target>
|
||||
<!-- load generated version properties file -->
|
||||
<property file="${classes.dir}/${ant.project.name}.properties"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: publish-local
|
||||
================================= -->
|
||||
<target name="publish-local" depends="local-version, jar" description="--> publish this project in the local ivy repository">
|
||||
<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
|
||||
resolver="local"
|
||||
pubrevision="${version}"
|
||||
pubdate="${now}"
|
||||
status="integration"
|
||||
forcedeliver="true"
|
||||
/>
|
||||
<echo message="project ${ant.project.name} published locally with version ${version}" />
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: jar
|
||||
================================= -->
|
||||
<target name="jar" depends="version, compile" description="--> make a jar file for this project">
|
||||
<jar destfile="${jar.file}">
|
||||
<fileset dir="${classes.dir}"/>
|
||||
<manifest>
|
||||
<attribute name="Built-By" value="${user.name}"/>
|
||||
<attribute name="Build-Version" value="${version}"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-local
|
||||
================================= -->
|
||||
<target name="clean-local" depends="load-ivy"
|
||||
description="--> cleans the local repository for the current module">
|
||||
<ivy:info file="${ivy.file}" />
|
||||
<delete dir="${ivy.local.default.root}/${ivy.organisation}/${ivy.module}"/>
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: publish
|
||||
================================= -->
|
||||
<target name="publish" depends="clean-build, jar" description="--> publish this project in the ivy repository">
|
||||
<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
|
||||
resolver="shared"
|
||||
pubrevision="${version}"
|
||||
status="release"/>
|
||||
<echo message="project ${ant.project.name} released with version ${version}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-lib
|
||||
================================= -->
|
||||
<target name="clean-lib" description="--> clean the project libraries directory (dependencies)">
|
||||
<delete includeemptydirs="true" dir="${lib.dir}"/>
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: publish-local
|
||||
================================= -->
|
||||
<target name="publish-local" depends="local-version, jar" description="--> publish this project in the local ivy repository">
|
||||
<ivy:publish artifactspattern="${build.dir}/[artifact].[ext]"
|
||||
resolver="local"
|
||||
pubrevision="${version}"
|
||||
pubdate="${now}"
|
||||
status="integration"
|
||||
forcedeliver="true"/>
|
||||
<echo message="project ${ant.project.name} published locally with version ${version}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-build
|
||||
================================= -->
|
||||
<target name="clean-build" description="--> clean the project built files">
|
||||
<delete includeemptydirs="true" dir="${build.dir}"/>
|
||||
</target>
|
||||
<!-- =================================
|
||||
target: clean-local
|
||||
================================= -->
|
||||
<target name="clean-local" depends="load-ivy"
|
||||
description="--> cleans the local repository for the current module">
|
||||
<ivy:info file="${ivy.file}"/>
|
||||
<delete dir="${ivy.local.default.root}/${ivy.organisation}/${ivy.module}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" depends="clean-build, clean-lib" description="--> clean the project" />
|
||||
<!-- =================================
|
||||
target: clean-lib
|
||||
================================= -->
|
||||
<target name="clean-lib" description="--> clean the project libraries directory (dependencies)">
|
||||
<delete includeemptydirs="true" dir="${lib.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean-build
|
||||
================================= -->
|
||||
<target name="clean-build" description="--> clean the project built files">
|
||||
<delete includeemptydirs="true" dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- =================================
|
||||
target: clean
|
||||
================================= -->
|
||||
<target name="clean" depends="clean-build,clean-lib" description="--> clean the project"/>
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
under the License.
|
||||
-->
|
||||
<antlib xmlns:current="ant:current">
|
||||
<typedef name="settings" classname="org.apache.ivy.ant.IvyAntSettings"/>
|
||||
<typedef name="resources" classname="org.apache.ivy.ant.IvyResources" onerror="report"/>
|
||||
<typedef name="settings" classname="org.apache.ivy.ant.IvyAntSettings"/>
|
||||
<typedef name="resources" classname="org.apache.ivy.ant.IvyResources" onerror="report"/>
|
||||
<taskdef name="configure" classname="org.apache.ivy.ant.IvyConfigure"/>
|
||||
<taskdef name="resolve" classname="org.apache.ivy.ant.IvyResolve"/>
|
||||
<taskdef name="retrieve" classname="org.apache.ivy.ant.IvyRetrieve"/>
|
||||
|
|
@ -44,10 +44,10 @@
|
|||
<taskdef name="findrevision" classname="org.apache.ivy.ant.IvyFindRevision"/>
|
||||
<taskdef name="buildnumber" classname="org.apache.ivy.ant.IvyBuildNumber"/>
|
||||
<taskdef name="cleancache" classname="org.apache.ivy.ant.IvyCleanCache"/>
|
||||
<taskdef name="buildobr" classname="org.apache.ivy.ant.BuildOBRTask" />
|
||||
<taskdef name="convertmanifest" classname="org.apache.ivy.ant.ConvertManifestTask" />
|
||||
<taskdef name="fixdeps" classname="org.apache.ivy.ant.FixDepsTask" />
|
||||
<taskdef name="dependencytree" classname="org.apache.ivy.ant.IvyDependencyTree"/>
|
||||
<taskdef name="checkdepsupdate" classname="org.apache.ivy.ant.IvyDependencyUpdateChecker"/>
|
||||
<typedef name="workspaceresolver" classname="org.apache.ivy.ant.AntWorkspaceResolver" />
|
||||
<taskdef name="buildobr" classname="org.apache.ivy.ant.BuildOBRTask"/>
|
||||
<taskdef name="convertmanifest" classname="org.apache.ivy.ant.ConvertManifestTask"/>
|
||||
<taskdef name="fixdeps" classname="org.apache.ivy.ant.FixDepsTask"/>
|
||||
<taskdef name="dependencytree" classname="org.apache.ivy.ant.IvyDependencyTree"/>
|
||||
<taskdef name="checkdepsupdate" classname="org.apache.ivy.ant.IvyDependencyUpdateChecker"/>
|
||||
<typedef name="workspaceresolver" classname="org.apache.ivy.ant.AntWorkspaceResolver"/>
|
||||
</antlib>
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public class TestHelper {
|
|||
}
|
||||
|
||||
/**
|
||||
* Parses a string represenation of a module descriptor in micro ivy format.
|
||||
* Parses a string representation of a module descriptor in micro ivy format.
|
||||
* <p>
|
||||
* Examples:
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue