Repository: ant-ivy Updated Branches: refs/heads/master 147fe0eb2 -> 4c6450f45
http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a2fdfe67/src/example/multi-project/common/common.xml ---------------------------------------------------------------------- diff --git a/src/example/multi-project/common/common.xml b/src/example/multi-project/common/common.xml index 89cd508..cdbd0da 100644 --- a/src/example/multi-project/common/common.xml +++ b/src/example/multi-project/common/common.xml @@ -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" /> - - <!-- ================================= - 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 +<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"/> + + <!-- ================================= + 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> + <!-- 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}" /> + <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> - - <!-- 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"/> + <!-- 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" /> + <!-- 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: 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="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" /> - - <!-- load generated version properties file --> - <property file="${classes.dir}/${ant.project.name}.properties" /> - </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: 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: 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-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-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" /> + <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="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"/> + + <!-- load generated version properties file --> + <property file="${classes.dir}/${ant.project.name}.properties"/> + </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: 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: 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-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-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> http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a2fdfe67/src/java/org/apache/ivy/ant/antlib.xml ---------------------------------------------------------------------- diff --git a/src/java/org/apache/ivy/ant/antlib.xml b/src/java/org/apache/ivy/ant/antlib.xml index 0111f78..c93be30 100644 --- a/src/java/org/apache/ivy/ant/antlib.xml +++ b/src/java/org/apache/ivy/ant/antlib.xml @@ -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> http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a2fdfe67/test/java/org/apache/ivy/TestHelper.java ---------------------------------------------------------------------- diff --git a/test/java/org/apache/ivy/TestHelper.java b/test/java/org/apache/ivy/TestHelper.java index 72d216b..7963407 100644 --- a/test/java/org/apache/ivy/TestHelper.java +++ b/test/java/org/apache/ivy/TestHelper.java @@ -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: *