You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jl...@apache.org on 2013/05/21 11:05:45 UTC
svn commit: r1484707 - in /ant/easyant/plugins/trunk/ivy-provisioning:
module.ivy src/main/resources/ivy-provisioning.ant
src/test/antunit/ivy-provisioning-test.xml
Author: jlboudart
Date: Tue May 21 09:05:44 2013
New Revision: 1484707
URL: http://svn.apache.org/r1484707
Log:
EASYANT-52
make ivy:resolve log option configurable
Modified:
ant/easyant/plugins/trunk/ivy-provisioning/module.ivy
ant/easyant/plugins/trunk/ivy-provisioning/src/main/resources/ivy-provisioning.ant
ant/easyant/plugins/trunk/ivy-provisioning/src/test/antunit/ivy-provisioning-test.xml
Modified: ant/easyant/plugins/trunk/ivy-provisioning/module.ivy
URL: http://svn.apache.org/viewvc/ant/easyant/plugins/trunk/ivy-provisioning/module.ivy?rev=1484707&r1=1484706&r2=1484707&view=diff
==============================================================================
--- ant/easyant/plugins/trunk/ivy-provisioning/module.ivy (original)
+++ ant/easyant/plugins/trunk/ivy-provisioning/module.ivy Tue May 21 09:05:44 2013
@@ -15,7 +15,7 @@
limitations under the License.
-->
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
- <info organisation="org.apache.easyant.plugins" module="ivy-provisioning" revision="0.9">
+ <info organisation="org.apache.easyant.plugins" module="ivy-provisioning" revision="0.10">
<extends organisation="org.apache.easyant.plugins" module="parent-plugin" revision="0.1" location="../parent.ivy" />
<ea:build organisation="org.apache.easyant.buildtypes" module="build-std-ant-plugin" revision="0.1" />
</info>
Modified: ant/easyant/plugins/trunk/ivy-provisioning/src/main/resources/ivy-provisioning.ant
URL: http://svn.apache.org/viewvc/ant/easyant/plugins/trunk/ivy-provisioning/src/main/resources/ivy-provisioning.ant?rev=1484707&r1=1484706&r2=1484707&view=diff
==============================================================================
--- ant/easyant/plugins/trunk/ivy-provisioning/src/main/resources/ivy-provisioning.ant (original)
+++ ant/easyant/plugins/trunk/ivy-provisioning/src/main/resources/ivy-provisioning.ant Tue May 21 09:05:44 2013
@@ -36,6 +36,14 @@
<ea:parameter property="retrieve.pattern.lib.provided" default="${lib.provided}/[artifact]-[revision].[ext]"
description="retrieve pattern for provided artifacts" />
+ <ea:parameter property="ivy.resolve.log" default="download-only"
+ description="the log setting to use during the resolve process.
+Available options are:
+
+ default : the default log settings, where all usual messages are output to the console
+ download-only : disable all usual messages but download ones. A resolve with everything in cache won't output any message.
+ quiet: disable all usual messages, making the whole resolve process quiet unless errors occur " />
+
<ea:parameter property="sync.lib.dir" default="true"
description="a boolean that define if lib dir should be synchronized or not" />
<!-- is project ivy settings configured ? -->
@@ -57,7 +65,7 @@
target: resolve
================================= -->
<target name="-ivy-provisioning:resolve" depends="abstract-provisioning:provisioning-ready">
- <ivy:resolve file="${project.ivy.file}" settingsRef="${project.ivy.instance}" />
+ <ivy:resolve file="${project.ivy.file}" settingsRef="${project.ivy.instance}" log="${ivy.resolve.log}" />
<condition property="project.contains.main.confs">
<matches string="${ivy.resolved.configurations}" pattern="${main.confs}" />
</condition>
@@ -74,7 +82,8 @@
description="resolve and retrieve dependencies with ivy" unless="skip.resolve" extensionOf="abstract-provisioning:provisioning" />
<target name="-ivy-provisioning:resolve-main-confs" depends="-ivy-provisioning:resolve" if="project.contains.main.confs">
- <ivy:cachepath pathid="cache.main.classpath" conf="${main.confs}" settingsRef="${project.ivy.instance}" />
+ <ivy:cachepath pathid="cache.main.classpath" conf="${main.confs}" settingsRef="${project.ivy.instance}"
+ log="${ivy.resolve.log}" />
<ea:path pathid="compile.main.classpath" overwrite="append-if-not-exist">
<path refid="cache.main.classpath" />
</ea:path>
@@ -83,7 +92,7 @@
<ac:then>
<mkdir dir="${lib.main}" />
<ivy:retrieve pattern="${retrieve.pattern.lib.main}" settingsRef="${project.ivy.instance}"
- conf="${main.confs}" sync="${sync.lib.dir}" />
+ conf="${main.confs}" sync="${sync.lib.dir}" log="${ivy.resolve.log}" />
<ea:path pathid="project.lib.main.classpath" overwrite="append">
<fileset dir="${lib.main}" includes="*.jar" erroronmissingdir="false" />
</ea:path>
@@ -92,7 +101,8 @@
</target>
<target name="-ivy-provisioning:resolve-test-confs" depends="-ivy-provisioning:resolve" if="project.contains.test.confs">
- <ivy:cachepath pathid="cache.test.classpath" conf="${test.confs}" settingsRef="${project.ivy.instance}" />
+ <ivy:cachepath pathid="cache.test.classpath" conf="${test.confs}" settingsRef="${project.ivy.instance}"
+ log="${ivy.resolve.log}" />
<ea:path pathid="compile.test.classpath" overwrite="append-if-not-exist">
<path refid="cache.test.classpath" />
</ea:path>
@@ -102,7 +112,7 @@
<mkdir dir="${lib.test}" />
<!-- resolve test dependencies -->
<ivy:retrieve pattern="${retrieve.pattern.lib.test}" settingsRef="${project.ivy.instance}"
- conf="${test.confs}" sync="${sync.lib.dir}" />
+ conf="${test.confs}" sync="${sync.lib.dir}" log="${ivy.resolve.log}" />
<ea:path pathid="project.lib.test.classpath" overwrite="append">
<fileset dir="${lib.test}" includes="*.jar" erroronmissingdir="false" />
</ea:path>
@@ -111,7 +121,7 @@
</target>
<target name="-ivy-provisioning:resolve-provided-confs" depends="-ivy-provisioning:resolve" if="project.contains.provided.confs">
- <ivy:cachepath pathid="cache.provided.classpath" conf="${provided.confs}" settingsRef="${project.ivy.instance}" />
+ <ivy:cachepath pathid="cache.provided.classpath" conf="${provided.confs}" settingsRef="${project.ivy.instance}" log="${ivy.resolve.log}"/>
<ea:path pathid="compile.main.classpath" overwrite="append-if-not-exist">
<path refid="cache.provided.classpath" />
</ea:path>
@@ -121,7 +131,7 @@
<mkdir dir="${lib.provided}" />
<!-- resolve provided dependencies -->
<ivy:retrieve pattern="${retrieve.pattern.lib.provided}" settingsRef="${project.ivy.instance}"
- conf="${provided.confs}" sync="${sync.lib.dir}" />
+ conf="${provided.confs}" sync="${sync.lib.dir}" log="${ivy.resolve.log}"/>
<ea:path pathid="project.lib.provided.classpath" overwrite="append">
<fileset dir="${lib.provided}" includes="*.jar" erroronmissingdir="false" />
</ea:path>
Modified: ant/easyant/plugins/trunk/ivy-provisioning/src/test/antunit/ivy-provisioning-test.xml
URL: http://svn.apache.org/viewvc/ant/easyant/plugins/trunk/ivy-provisioning/src/test/antunit/ivy-provisioning-test.xml?rev=1484707&r1=1484706&r2=1484707&view=diff
==============================================================================
--- ant/easyant/plugins/trunk/ivy-provisioning/src/test/antunit/ivy-provisioning-test.xml (original)
+++ ant/easyant/plugins/trunk/ivy-provisioning/src/test/antunit/ivy-provisioning-test.xml Tue May 21 09:05:44 2013
@@ -50,6 +50,7 @@
<au:assertPropertyEquals name="retrieve.pattern.lib.main" value="${lib.main}/[artifact]-[revision].[ext]" />
<au:assertPropertyEquals name="retrieve.pattern.lib.test" value="${lib.test}/[artifact]-[revision].[ext]" />
<au:assertPropertyEquals name="retrieve.pattern.lib.provided" value="${lib.provided}/[artifact]-[revision].[ext]" />
+ <au:assertPropertyEquals name="ivy.resolve.log" value="download-only"/>
<au:assertPropertyEquals name="sync.lib.dir" value="true" />
<au:assertPropertyEquals name="is.project.ivy.settings.configured" value="true" />
<au:assertReferenceSet refid="project.lib.main.classpath" />
@@ -58,6 +59,17 @@
</target>
<target name="test-ivy-provisioning:resolve" depends="-ivy-provisioning:resolve">
+ <au:assertLogDoesntContain text=":: resolving dependencies :: org.apache.easyant#standard-java-app;0.1" />
+ <au:assertPropertyEquals name="project.contains.main.confs" value="true" />
+ <au:assertPropertyEquals name="project.contains.test.confs" value="true" />
+ <au:assertPropertyEquals name="project.contains.provided.confs" value="true" />
+ </target>
+
+ <target name="prepare-verbose-log">
+ <property name="ivy.resolve.log" value="default"/>
+ </target>
+
+ <target name="test-ivy-provisioning:verbose-resolve" depends="prepare-verbose-log,-ivy-provisioning:resolve">
<au:assertLogContains text=":: resolving dependencies :: org.apache.easyant#standard-java-app;0.1" />
<au:assertPropertyEquals name="project.contains.main.confs" value="true" />
<au:assertPropertyEquals name="project.contains.test.confs" value="true" />