You are viewing a plain text version of this content. The canonical link for it is here.
Posted to easyant-commits@incubator.apache.org by jl...@apache.org on 2012/10/16 19:36:24 UTC
svn commit: r1398945 - in /incubator/easyant/plugins/trunk:
ivy-repo-management/ ivy-repo-management/src/main/resources/
ivy-repo-management/src/test/antunit/ ivy-utils/
ivy-utils/src/main/resources/ ivy-utils/src/test/antunit/
Author: jlboudart
Date: Tue Oct 16 19:36:23 2012
New Revision: 1398945
URL: http://svn.apache.org/viewvc?rev=1398945&view=rev
Log:
Format plugin sources reference parent module (part2)
Modified:
incubator/easyant/plugins/trunk/ivy-repo-management/module.ivy
incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy-repo-management.ant
incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy.xml.tpl
incubator/easyant/plugins/trunk/ivy-repo-management/src/test/antunit/ivy-repo-management-test.xml
incubator/easyant/plugins/trunk/ivy-utils/module.ivy
incubator/easyant/plugins/trunk/ivy-utils/src/main/resources/ivy-utils.ant
incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/ivy-utils-test.xml
incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/sample-module.ivy
Modified: incubator/easyant/plugins/trunk/ivy-repo-management/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-repo-management/module.ivy?rev=1398945&r1=1398944&r2=1398945&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-repo-management/module.ivy (original)
+++ incubator/easyant/plugins/trunk/ivy-repo-management/module.ivy Tue Oct 16 19:36:23 2012
@@ -14,39 +14,50 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
+<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
<info organisation="org.apache.easyant.plugins" module="ivy-repo-management" revision="0.9">
- <description>
- <p>
- This module provides features to install artifacts on a given repository.<br/>
- This module can be used in interactive (ie. let easyant ask questions) or directly from the command line by settings -Dproperty.<br/>
- By default interactive mode is enabled.<br/>
- If you prefer you can directly set the property on the command line.<br/>
- </p>
- <p>
- Example:
- <div class="code">
+ <extends organisation="org.apache.easyant.plugins" module="parent-plugin" revision="0.1" />
+ <description>
+ <p>
+ This module provides features to install artifacts on a given repository.
+ <br />
+ This module can be used in interactive (ie. let easyant ask questions) or directly from the command line
+ by settings -Dproperty.
+ <br />
+ By default interactive mode is enabled.
+ <br />
+ If you prefer you can directly set the property on the command line.
+ <br />
+ </p>
+ <p>
+ Example:
+ <div class="code">
easyant install-ext-artifact -Dorg=myOrgName -Dmodule=myModuleName -Drev=myRevisionNumber
</div>
- Example2:
- <div class="code">
- easyant install-artifact -Dorg=myOrgName -Dmodule=myModuleName -Drev=myRevisionNumber -Dartifact=myFile
+ Example2:
+ <div class="code">
+ easyant install-artifact -Dorg=myOrgName -Dmodule=myModuleName -Drev=myRevisionNumber
+ -Dartifact=myFile
</div>
+ </p>
+ <p>
+ If one of the property is not set, easyant will ask you the question if interactive mode is set to
+ "true".
+ If you want to disable interactive mode you should set "install.interactive.mode" property to
+ "false".
</p>
- <p>
- If one of the property is not set, easyant will ask you the question if interactive mode is set to "true".
- If you want to disable interactive mode you should set "install.interactive.mode" property to "false".
- </p>
- </description>
- <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
- </info>
- <configurations>
- <conf name="default" description="runtime dependencies artifact can be used with this conf"/>
- <conf name="test" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
- <conf name="provided" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
- </configurations>
+ </description>
+ <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1" />
+ </info>
+ <configurations>
+ <conf name="default" description="runtime dependencies artifact can be used with this conf" />
+ <conf name="test"
+ description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." />
+ <conf name="provided"
+ description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive." />
+ </configurations>
<publications>
- <artifact type="ant"/>
- <artifact name="ivy.xml" type="tpl"/>
+ <artifact type="ant" />
+ <artifact name="ivy.xml" type="tpl" />
</publications>
-</ivy-module>
+</ivy-module>
\ No newline at end of file
Modified: incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy-repo-management.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy-repo-management.ant?rev=1398945&r1=1398944&r2=1398945&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy-repo-management.ant (original)
+++ incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy-repo-management.ant Tue Oct 16 19:36:23 2012
@@ -15,20 +15,26 @@
limitations under the License.
-->
<project name="org.apache.easyant.plugins#ivy-repo-management" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ea="antlib:org.apache.easyant">
-
<ea:core-version requiredrevision="[0.9,+]" />
<target name="ivy-repo-management:init">
<ea:parameter property="project.ivy.instance" default="project.ivy.instance" description="the ivy instance name for your project" />
- <ea:parameter property="default.from.resolver" default="public" description="the repository name where the artifact will be picked up" />
- <ea:parameter property="default.to.resolver" default="local" description="the repository name where the artifact will be installed" />
- <ea:parameter property="install.override" default="false" description="specify if the install targets should override an artifact on a repository if it already exists" />
- <ea:parameter property="install.ivy.template" default="${org.apache.easyant.plugins#ivy-repo-management.ivy.xml.tpl.file}" description="specify a template ivy file used when you call install-artifact" />
- <ea:parameter property="install.temp.directory" default="${target}/install" description="specify a temporary directory used to make replacement in the template ivy file" />
- <ea:parameter property="install.status" default="release" description="specify the status of the artifact that will be installed with the install-artifact target" />
- <ea:parameter property="install.interactive.mode" default="true" description="specify if easyant should ask questions instead of using -Dproperties" />
+ <ea:parameter property="default.from.resolver" default="public"
+ description="the repository name where the artifact will be picked up" />
+ <ea:parameter property="default.to.resolver" default="local"
+ description="the repository name where the artifact will be installed" />
+ <ea:parameter property="install.override" default="false"
+ description="specify if the install targets should override an artifact on a repository if it already exists" />
+ <ea:parameter property="install.ivy.template" default="${org.apache.easyant.plugins#ivy-repo-management.ivy.xml.tpl.file}"
+ description="specify a template ivy file used when you call install-artifact" />
+ <ea:parameter property="install.temp.directory" default="${target}/install"
+ description="specify a temporary directory used to make replacement in the template ivy file" />
+ <ea:parameter property="install.status" default="release"
+ description="specify the status of the artifact that will be installed with the install-artifact target" />
+ <ea:parameter property="install.interactive.mode" default="true"
+ description="specify if easyant should ask questions instead of using -Dproperties" />
<condition property="install.is.interactive">
- <istrue value="${install.interactive.mode}"/>
+ <istrue value="${install.interactive.mode}" />
</condition>
<!-- is project ivy settings configured ? -->
@@ -36,32 +42,38 @@
<ea:parameter property="project.ivy.settings.url" description="the ivysettings url used by your project" />
<condition property="is.project.ivy.settings.configured">
- <isreference refid="${project.ivy.instance}"/>
+ <isreference refid="${project.ivy.instance}" />
</condition>
- <fail unless="is.project.ivy.settings.configured" message="project ivy instance is not configured, at least one of the following property must be set : project.ivy.settings.file, project.ivy.settings.url"/>
+ <fail unless="is.project.ivy.settings.configured"
+ message="project ivy instance is not configured, at least one of the following property must be set : project.ivy.settings.file, project.ivy.settings.url" />
</target>
<!--
This target is just here to intialize default value if install.interactive.mode is not set
-->
<target name="-ivy-repo-management:check-interactive-mode" unless="install.is.interactive">
- <property name="from.resolver" value="${default.from.resolver}"/>
- <property name="to.resolver" value="${default.to.resolver}"/>
+ <property name="from.resolver" value="${default.from.resolver}" />
+ <property name="to.resolver" value="${default.to.resolver}" />
</target>
<!-- =================================
target: copy-artifact
================================= -->
- <target name="-ivy-repo-management:check-copy-artifact" depends="-ivy-repo-management:check-interactive-mode" if="install.is.interactive">
+ <target name="-ivy-repo-management:check-copy-artifact" depends="-ivy-repo-management:check-interactive-mode"
+ if="install.is.interactive">
<input message="Please enter the module name:" addproperty="module" />
<input message="Please enter the organasization name :" addproperty="org" />
<input message="Please enter the revision number :" addproperty="rev" />
- <input message="Please enter the repository name where the artifact will be picked up :" addproperty="from.resolver" defaultvalue="${default.from.resolver}" />
- <input message="Please enter the repository name where the artifact will be installed :" addproperty="to.resolver" defaultvalue="${default.to.resolver}" />
+ <input message="Please enter the repository name where the artifact will be picked up :" addproperty="from.resolver"
+ defaultvalue="${default.from.resolver}" />
+ <input message="Please enter the repository name where the artifact will be installed :" addproperty="to.resolver"
+ defaultvalue="${default.to.resolver}" />
</target>
- <target name="ivy-repo-management:copy-artifact" depends="ivy-repo-management:init,-ivy-repo-management:check-copy-artifact" description="copy an artifact from an external repository in our repository">
- <property name="mess" value="Usage: copy-artifact{line.separator}
+ <target name="ivy-repo-management:copy-artifact" depends="ivy-repo-management:init,-ivy-repo-management:check-copy-artifact"
+ description="copy an artifact from an external repository in our repository">
+ <property name="mess"
+ value="Usage: copy-artifact{line.separator}
easyant copy-artifact -Dorg=myOrgName -Dmodule=myModuleName -Drev=myRevisionNumber${line.separator}
Exemple:${line.separator}
easyant copy-artifact -Dorg=apache -Dmodule=commons-lang -Drev=1.0${line.separator}
@@ -73,24 +85,31 @@
<fail unless="org">org property is not defined${line.separator}${mess}</fail>
<fail unless="module">module property is not defined${line.separator}${mess}</fail>
<fail unless="rev">revision property is not defined${line.separator}${mess}</fail>
- <ea:checkresolver resolver="from.resolver" settingsRef="${project.ivy.instance}" description="the repository name where the artifact will be picked up"/>
- <ea:checkresolver resolver="to.resolver" settingsRef="${project.ivy.instance}" description="the repository name where the artifact will be installed"/>
- <ivy:install settingsRef="${project.ivy.instance}" organisation="${org}" module="${module}" revision="${rev}" from="${from.resolver}" to="${to.resolver}" transitive="true" overwrite="${install.override}" />
+ <ea:checkresolver resolver="from.resolver" settingsRef="${project.ivy.instance}"
+ description="the repository name where the artifact will be picked up" />
+ <ea:checkresolver resolver="to.resolver" settingsRef="${project.ivy.instance}"
+ description="the repository name where the artifact will be installed" />
+ <ivy:install settingsRef="${project.ivy.instance}" organisation="${org}" module="${module}"
+ revision="${rev}" from="${from.resolver}" to="${to.resolver}" transitive="true" overwrite="${install.override}" />
</target>
<!-- =================================
target: install-artifact
================================= -->
- <target name="-ivy-repo-management:check-install-artifact" depends="-ivy-repo-management:check-interactive-mode" if="install.is.interactive">
+ <target name="-ivy-repo-management:check-install-artifact" depends="-ivy-repo-management:check-interactive-mode"
+ if="install.is.interactive">
<input message="Please enter the module name:" addproperty="module" />
<input message="Please enter the organasization name :" addproperty="org" />
<input message="Please enter the revision number :" addproperty="rev" />
<input message="Please enter a path to the artifact :" addproperty="artifact" />
- <input message="Please enter the repository name where the artifact will be installed :" addproperty="to.resolver" defaultvalue="${default.to.resolver}" />
+ <input message="Please enter the repository name where the artifact will be installed :" addproperty="to.resolver"
+ defaultvalue="${default.to.resolver}" />
</target>
- <target name="ivy-repo-management:install-artifact" depends="ivy-repo-management:init,-ivy-repo-management:check-install-artifact" description="install a new artifact in your repository">
- <property name="mess" value="Usage: install-artifact${line.separator}
+ <target name="ivy-repo-management:install-artifact" depends="ivy-repo-management:init,-ivy-repo-management:check-install-artifact"
+ description="install a new artifact in your repository">
+ <property name="mess"
+ value="Usage: install-artifact${line.separator}
easyant install-artifact -Dorg=myOrgName -Dmodule=myModuleName -Drev=myRevisionNumber -Dartifact=myFile${line.separator}
Exemple:${line.separator}
easyant install-artifact -Dorg=apache -Dmodule=commons-lang -Drev=1.0 -Dartifact=commons-lang.jar${line.separator}
@@ -107,9 +126,10 @@
<fail unless="rev">revision property is not defined${line.separator}${mess}</fail>
<fail unless="artifact">artifact property is not defined${line.separator}${mess}</fail>
- <available file="${artifact}" property="artifact.available"/>
+ <available file="${artifact}" property="artifact.available" />
<fail unless="artifact.available">unable to find artifact at ${artifact}${line.separator}${mess}</fail>
- <ea:checkresolver resolver="to.resolver" settingsRef="${project.ivy.instance}" description="the repository name where the artifact will be installed"/>
+ <ea:checkresolver resolver="to.resolver" settingsRef="${project.ivy.instance}"
+ description="the repository name where the artifact will be installed" />
<basename file="${artifact}" property="artifact.to.install.file" />
@@ -125,12 +145,16 @@
<filter token="module" value="${module}" />
<filter token="revision" value="${rev}" />
</filterset>
- <copy file="${install.ivy.template}" tofile="${install.temp.directory}/${artifact.to.install.file}.xml" overwrite="true">
+ <copy file="${install.ivy.template}" tofile="${install.temp.directory}/${artifact.to.install.file}.xml"
+ overwrite="true">
<filterset refid="artifact.filter" />
</copy>
<echo message="Publishing artifact in ${to.resolver} repository" />
- <ivy:publish artifactspattern="${install.temp.directory}/${artifact.to.install.file}" organisation="${org}" module="${module}" revision="${rev}" srcivypattern="${install.temp.directory}/${artifact.to.install.file}.xml" resolver="${to.resolver}" pubrevision="${rev}" status="${install.status}" settingsRef="${project.ivy.instance}" overwrite="${install.override}" />
+ <ivy:publish artifactspattern="${install.temp.directory}/${artifact.to.install.file}" organisation="${org}"
+ module="${module}" revision="${rev}" srcivypattern="${install.temp.directory}/${artifact.to.install.file}.xml"
+ resolver="${to.resolver}" pubrevision="${rev}" status="${install.status}" settingsRef="${project.ivy.instance}"
+ overwrite="${install.override}" />
<echo message="Cleaning ${install.temp.directory}" />
<delete>
@@ -139,5 +163,4 @@
<echo message="${artifact.to.install.file} succefully installed in your ${to.resolver} repository" />
</target>
-
-</project>
+</project>
\ No newline at end of file
Modified: incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy.xml.tpl
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy.xml.tpl?rev=1398945&r1=1398944&r2=1398945&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy.xml.tpl (original)
+++ incubator/easyant/plugins/trunk/ivy-repo-management/src/main/resources/ivy.xml.tpl Tue Oct 16 19:36:23 2012
@@ -16,4 +16,4 @@
-->
<ivy-module version="1.0">
<info organisation="@organisation@" module="@module@" revision="@revision@"/>
-</ivy-module>
+</ivy-module>
\ No newline at end of file
Modified: incubator/easyant/plugins/trunk/ivy-repo-management/src/test/antunit/ivy-repo-management-test.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-repo-management/src/test/antunit/ivy-repo-management-test.xml?rev=1398945&r1=1398944&r2=1398945&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-repo-management/src/test/antunit/ivy-repo-management-test.xml (original)
+++ incubator/easyant/plugins/trunk/ivy-repo-management/src/test/antunit/ivy-repo-management-test.xml Tue Oct 16 19:36:23 2012
@@ -14,83 +14,79 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="org.apache.easyant.plugins;ivy-repo-management-test"
- xmlns:au="antlib:org.apache.ant.antunit"
- xmlns:ivy="antlib:org.apache.ivy.ant"
- xmlns:ea="antlib:org.apache.easyant">
+<project name="org.apache.easyant.plugins;ivy-repo-management-test" xmlns:au="antlib:org.apache.ant.antunit"
+ xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ea="antlib:org.apache.easyant">
- <!-- Import your plugin -->
- <property name="target" value="${basedir}/target/test-antunit"/>
+ <!-- Import your plugin -->
+ <property name="target" value="${basedir}/target/test-antunit" />
<!-- configure easyant in current project -->
<ea:configure-easyant-ivy-instance />
<!-- import our local plugin -->
- <ea:import-test-module moduleIvy="../../../module.ivy" sourceDirectory="../../main/resources"/>
+ <ea:import-test-module moduleIvy="../../../module.ivy" sourceDirectory="../../main/resources" />
- <!-- Defines a setUp / tearDown (before each test) that cleans the environnement -->
+ <!-- Defines a setUp / tearDown (before each test) that cleans the environnement -->
<target name="clean" description="remove stale build artifacts before / after each test">
<delete dir="${basedir}" includeemptydirs="true">
- <include name="**/target/**"/>
- <include name="**/lib/**"/>
+ <include name="**/target/**" />
+ <include name="**/lib/**" />
</delete>
</target>
-
+
<target name="setUp" depends="clean">
- <property name="ivy.local.default.root" value="${target}/local-repo"/>
- <property name="ivy.shared.default.root" value="${target}/shared-repo"/>
- <ivy:settings id="project.ivy.instance"/>
- <property name="install.interactive.mode" value="false"/>
+ <property name="ivy.local.default.root" value="${target}/local-repo" />
+ <property name="ivy.shared.default.root" value="${target}/shared-repo" />
+ <ivy:settings id="project.ivy.instance" />
+ <property name="install.interactive.mode" value="false" />
</target>
- <target name="tearDown" depends="clean"/>
-
+ <target name="tearDown" depends="clean" />
+
<target name="test-ivy-repo-management:init" depends="ivy-repo-management:init">
- <au:assertPropertyEquals name="project.ivy.instance" value="project.ivy.instance"/>
- <au:assertPropertyEquals name="default.from.resolver" value="public"/>
- <au:assertPropertyEquals name="default.to.resolver" value="local"/>
- <au:assertPropertyEquals name="install.override" value="false"/>
- <au:assertPropertyEquals name="install.ivy.template" value="${org.apache.easyant.plugins#ivy-repo-management.ivy.xml.tpl.file}"/>
- <au:assertPropertyEquals name="install.temp.directory" value="${target}/install"/>
- <au:assertPropertyEquals name="install.status" value="release"/>
- <au:assertPropertyEquals name="install.interactive.mode" value="false"/>
- <au:assertPropertyEquals name="is.project.ivy.settings.configured" value="true"/>
+ <au:assertPropertyEquals name="project.ivy.instance" value="project.ivy.instance" />
+ <au:assertPropertyEquals name="default.from.resolver" value="public" />
+ <au:assertPropertyEquals name="default.to.resolver" value="local" />
+ <au:assertPropertyEquals name="install.override" value="false" />
+ <au:assertPropertyEquals name="install.ivy.template"
+ value="${org.apache.easyant.plugins#ivy-repo-management.ivy.xml.tpl.file}" />
+ <au:assertPropertyEquals name="install.temp.directory" value="${target}/install" />
+ <au:assertPropertyEquals name="install.status" value="release" />
+ <au:assertPropertyEquals name="install.interactive.mode" value="false" />
+ <au:assertPropertyEquals name="is.project.ivy.settings.configured" value="true" />
</target>
-
+
<target name="test-ivy-repo-management:check-interactive-mode" depends="-ivy-repo-management:check-interactive-mode">
- <au:assertPropertyEquals name="from.resolver" value="${default.from.resolver}"/>
- <au:assertPropertyEquals name="to.resolver" value="${default.to.resolver}"/>
+ <au:assertPropertyEquals name="from.resolver" value="${default.from.resolver}" />
+ <au:assertPropertyEquals name="to.resolver" value="${default.to.resolver}" />
</target>
-
+
<target name="prepare-copy-artifact">
- <property name="org" value="junit"/>
- <property name="module" value="junit"/>
- <property name="rev" value="4.4"/>
+ <property name="org" value="junit" />
+ <property name="module" value="junit" />
+ <property name="rev" value="4.4" />
</target>
<target name="test-ivy-repo-management:copy-artifact" depends="prepare-copy-artifact, ivy-repo-management:copy-artifact">
- <au:assertLogContains text=":: installing junit#junit;4.4 ::"/>
- <au:assertLogContains text=":: installing in local ::"/>
- <au:assertLogContains text="publish commited"/>
+ <au:assertLogContains text=":: installing junit#junit;4.4 ::" />
+ <au:assertLogContains text=":: installing in local ::" />
+ <au:assertLogContains text="publish commited" />
</target>
<target name="prepare-install-artifact">
- <property name="org" value="org.foobar"/>
- <property name="module" value="foobar-core"/>
- <property name="rev" value="1.0"/>
- <echo file="myartifact"/>
- <property name="artifact" value="myartifact"/>
-
+ <property name="org" value="org.foobar" />
+ <property name="module" value="foobar-core" />
+ <property name="rev" value="1.0" />
+ <echo file="myartifact" />
+ <property name="artifact" value="myartifact" />
</target>
-
<target name="test-ivy-repo-management:install-artifact" depends="prepare-install-artifact, ivy-repo-management:install-artifact">
- <au:assertLogContains text="Creating ivy temp directory in ${install.temp.directory}"/>
- <au:assertFileExists file="${install.temp.directory}"/>
- <au:assertLogContains text="Copying ${artifact} in the ivy temp directory"/>
- <au:assertLogContains text="Generating ivy file for ${artifact}"/>
- <au:assertLogContains text="Publishing artifact in ${to.resolver} repository"/>
- <au:assertLogContains text="Cleaning ${install.temp.directory}"/>
- <au:assertLogContains text="${artifact.to.install.file} succefully installed in your ${to.resolver} repository"/>
- <au:assertLogContains text=":: publishing :: org.foobar#foobar-core"/>
- <au:assertLogContains text="publish commited"/>
-
+ <au:assertLogContains text="Creating ivy temp directory in ${install.temp.directory}" />
+ <au:assertFileExists file="${install.temp.directory}" />
+ <au:assertLogContains text="Copying ${artifact} in the ivy temp directory" />
+ <au:assertLogContains text="Generating ivy file for ${artifact}" />
+ <au:assertLogContains text="Publishing artifact in ${to.resolver} repository" />
+ <au:assertLogContains text="Cleaning ${install.temp.directory}" />
+ <au:assertLogContains text="${artifact.to.install.file} succefully installed in your ${to.resolver} repository" />
+ <au:assertLogContains text=":: publishing :: org.foobar#foobar-core" />
+ <au:assertLogContains text="publish commited" />
</target>
-</project>
+</project>
\ No newline at end of file
Modified: incubator/easyant/plugins/trunk/ivy-utils/module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-utils/module.ivy?rev=1398945&r1=1398944&r2=1398945&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-utils/module.ivy (original)
+++ incubator/easyant/plugins/trunk/ivy-utils/module.ivy Tue Oct 16 19:36:23 2012
@@ -14,19 +14,22 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
+<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
<info organisation="org.apache.easyant.plugins" module="ivy-utils" revision="0.9">
- <description>
- This module provides utilitaries target related to ivy (clean-cache / dependencies report)
+ <extends organisation="org.apache.easyant.plugins" module="parent-plugin" revision="0.1" />
+ <description>
+ This module provides utilitaries target related to ivy (clean-cache / dependencies report)
</description>
- <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1"/>
- </info>
- <configurations>
- <conf name="default" description="runtime dependencies artifact can be used with this conf"/>
- <conf name="test" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
- <conf name="provided" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
- </configurations>
+ <ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1" />
+ </info>
+ <configurations>
+ <conf name="default" description="runtime dependencies artifact can be used with this conf" />
+ <conf name="test"
+ description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." />
+ <conf name="provided"
+ description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive." />
+ </configurations>
<publications>
- <artifact type="ant"/>
+ <artifact type="ant" />
</publications>
-</ivy-module>
+</ivy-module>
\ No newline at end of file
Modified: incubator/easyant/plugins/trunk/ivy-utils/src/main/resources/ivy-utils.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-utils/src/main/resources/ivy-utils.ant?rev=1398945&r1=1398944&r2=1398945&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-utils/src/main/resources/ivy-utils.ant (original)
+++ incubator/easyant/plugins/trunk/ivy-utils/src/main/resources/ivy-utils.ant Tue Oct 16 19:36:23 2012
@@ -15,35 +15,32 @@
limitations under the License.
-->
<project name="org.apache.easyant.plugins#ivy-utils" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:ea="antlib:org.apache.easyant">
-
<ea:core-version requiredrevision="[0.9,+]" />
- <ea:import mrid="org.apache.easyant.plugins#abstract-provisioning;0.9" />
-
+ <ea:import mrid="org.apache.easyant.plugins#abstract-provisioning;0.9" />
+
<target name="ivy-utils:init">
- <ea:parameter property="project.ivy.instance" default="project.ivy.instance"
- description="the ivy instance name for your project" />
+ <ea:parameter property="project.ivy.instance" default="project.ivy.instance" description="the ivy instance name for your project" />
<!-- is project ivy settings configured ? -->
<ea:parameter property="project.ivy.settings.file" description="the ivysettings file used by your project" />
<ea:parameter property="project.ivy.settings.url" description="the ivysettings url used by your project" />
-
+
<condition property="is.project.ivy.settings.configured">
- <isreference refid="${project.ivy.instance}"/>
+ <isreference refid="${project.ivy.instance}" />
</condition>
- <fail unless="is.project.ivy.settings.configured" message="project ivy instance is not configured, at least one of the following property must be set : project.ivy.settings.file, project.ivy.settings.url"/>
-
+ <fail unless="is.project.ivy.settings.configured"
+ message="project ivy instance is not configured, at least one of the following property must be set : project.ivy.settings.file, project.ivy.settings.url" />
</target>
-
<!-- =================================
target: clean-report
================================= -->
<target name="ivy-utils:report" depends="abstract-provisioning:provisioning,ivy-utils:init" description="generate dependencies report">
- <ea:parameter property="target.reports" default="${target}/reports" description="directory where report will be generated"/>
- <ea:parameter property="target.report.ivy" default="${target.reports}/dependencies"
+ <ea:parameter property="target.reports" default="${target}/reports" description="directory where report will be generated" />
+ <ea:parameter property="target.report.ivy" default="${target.reports}/dependencies"
description="the directory where ivy report will be generated" />
- <mkdir dir="${target.report.ivy}"/>
+ <mkdir dir="${target.report.ivy}" />
<ivy:report todir="${target.report.ivy}" settingsRef="${project.ivy.instance}" />
</target>
@@ -51,25 +48,23 @@
target: clean-cache
================================= -->
<target name="ivy-utils:clean-cache" depends="ivy-utils:init" description="clean the ivy cache used to resolve project dependencies">
- <ivy:cleancache settingsRef="${project.ivy.instance}"/>
+ <ivy:cleancache settingsRef="${project.ivy.instance}" />
</target>
-
<!-- =================================
target: clean-eacache
================================= -->
- <target name="ivy-utils:clean-eacache" depends="ivy-utils:init" description="clean the ivy cache used by easyant to resolve plugins/ buildtypes">
+ <target name="ivy-utils:clean-eacache" depends="ivy-utils:init"
+ description="clean the ivy cache used by easyant to resolve plugins/ buildtypes">
<!-- clean easyant cache -->
- <ivy:cleancache settingsRef="easyant.ivy.instance"/>
+ <ivy:cleancache settingsRef="easyant.ivy.instance" />
</target>
-
<!-- =================================
target: clean-lib
================================= -->
<target name="ivy-utils:clean-lib" description="clean the project libraries directory">
- <ea:parameter property="lib.dir" default="lib" description="library directory"/>
+ <ea:parameter property="lib.dir" default="lib" description="library directory" />
<delete includeemptydirs="true" dir="${lib.dir}" />
</target>
-
-</project>
+</project>
\ No newline at end of file
Modified: incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/ivy-utils-test.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/ivy-utils-test.xml?rev=1398945&r1=1398944&r2=1398945&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/ivy-utils-test.xml (original)
+++ incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/ivy-utils-test.xml Tue Oct 16 19:36:23 2012
@@ -14,59 +14,52 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<project name="org.apache.easyant.plugins;ivy-utils-test"
- xmlns:au="antlib:org.apache.ant.antunit"
- xmlns:ivy="antlib:org.apache.ivy.ant"
+<project name="org.apache.easyant.plugins;ivy-utils-test" xmlns:au="antlib:org.apache.ant.antunit" xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:ea="antlib:org.apache.easyant">
- <!-- Import your plugin -->
- <property name="target" value="${basedir}/target/test-antunit"/>
+ <!-- Import your plugin -->
+ <property name="target" value="${basedir}/target/test-antunit" />
<!-- configure easyant in current project -->
<ea:configure-easyant-ivy-instance />
<!-- import our local plugin -->
- <ea:import-test-module moduleIvy="../../../module.ivy" sourceDirectory="../../main/resources"/>
+ <ea:import-test-module moduleIvy="../../../module.ivy" sourceDirectory="../../main/resources" />
- <!-- Defines a setUp / tearDown (before each test) that cleans the environnement -->
+ <!-- Defines a setUp / tearDown (before each test) that cleans the environnement -->
<target name="clean" description="remove stale build artifacts before / after each test">
<delete dir="${basedir}" includeemptydirs="true">
- <include name="**/target/**"/>
- <include name="**/lib/**"/>
+ <include name="**/target/**" />
+ <include name="**/lib/**" />
</delete>
</target>
-
+
<target name="setUp" depends="clean">
- <property name="ivy.local.default.root" value="${target}/local-repo"/>
- <property name="ivy.shared.default.root" value="${target}/shared-repo"/>
- <property name="project.ivy.file" value="sample-module.ivy"/>
- <ivy:settings id="project.ivy.instance"/>
- <ivy:resolve file="${project.ivy.file}" settingsRef="project.ivy.instance"/>
- <mkdir dir="${target}/artifacts"/>
- <echo file="${target}/artifacts/standard-java-app.jar"/>
+ <property name="ivy.local.default.root" value="${target}/local-repo" />
+ <property name="ivy.shared.default.root" value="${target}/shared-repo" />
+ <property name="project.ivy.file" value="sample-module.ivy" />
+ <ivy:settings id="project.ivy.instance" />
+ <ivy:resolve file="${project.ivy.file}" settingsRef="project.ivy.instance" />
+ <mkdir dir="${target}/artifacts" />
+ <echo file="${target}/artifacts/standard-java-app.jar" />
</target>
- <target name="tearDown" depends="clean"/>
-
+ <target name="tearDown" depends="clean" />
+
<target name="test-ivy-utils:init" depends="ivy-utils:init">
- <au:assertPropertyEquals name="project.ivy.instance" value="project.ivy.instance"/>
- <au:assertPropertyEquals name="is.project.ivy.settings.configured" value="true"/>
+ <au:assertPropertyEquals name="project.ivy.instance" value="project.ivy.instance" />
+ <au:assertPropertyEquals name="is.project.ivy.settings.configured" value="true" />
</target>
<target name="test-ivy-utils:report" depends="ivy-utils:report">
- <au:assertPropertyEquals name="target.reports" value="${target}/reports"/>
- <au:assertPropertyEquals name="target.report.ivy" value="${target.reports}/dependencies"/>
- <au:assertFileExists file="${target.report.ivy}"/>
+ <au:assertPropertyEquals name="target.reports" value="${target}/reports" />
+ <au:assertPropertyEquals name="target.report.ivy" value="${target.reports}/dependencies" />
+ <au:assertFileExists file="${target.report.ivy}" />
</target>
- <target name="test-ivy-utils:clean-cache" depends="ivy-utils:clean-cache">
- </target>
+ <target name="test-ivy-utils:clean-cache" depends="ivy-utils:clean-cache"/>
- <target name="test-ivy-utils:clean-eacache" depends="ivy-utils:clean-eacache">
- </target>
+ <target name="test-ivy-utils:clean-eacache" depends="ivy-utils:clean-eacache"/>
<target name="test-ivy-utils:clean-lib" depends="ivy-utils:clean-lib">
- <au:assertPropertyEquals name="lib.dir" value="lib"/>
+ <au:assertPropertyEquals name="lib.dir" value="lib" />
<au:assertFileDoesntExist file="${lib.dir}" />
</target>
-
-
-
-</project>
+</project>
\ No newline at end of file
Modified: incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/sample-module.ivy
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/sample-module.ivy?rev=1398945&r1=1398944&r2=1398945&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/sample-module.ivy (original)
+++ incubator/easyant/plugins/trunk/ivy-utils/src/test/antunit/sample-module.ivy Tue Oct 16 19:36:23 2012
@@ -15,15 +15,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
- <info organisation="org.apache.easyant" module="standard-java-app" revision="0.1" status="integration"/>
+<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
+ <info organisation="org.apache.easyant" module="standard-java-app" revision="0.1" status="integration" />
<configurations>
- <conf name="default" description="runtime dependencies artifact can be used with this conf"/>
- <conf name="test" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases."/>
- <conf name="provided" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
+ <conf name="default" description="runtime dependencies artifact can be used with this conf" />
+ <conf name="test"
+ description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." />
+ <conf name="provided"
+ description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive." />
</configurations>
<dependencies>
- <dependency org="junit" name="junit" rev="4.4" conf="*->default"/>
+ <dependency org="junit" name="junit" rev="4.4" conf="*->default" />
</dependencies>
-
-</ivy-module>
+</ivy-module>
\ No newline at end of file