incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1418634 - in /incubator/easyant/plugins/trunk/ivy-publication/src: main/resources/ivy-publication.ant test/antunit/ivy-publication-test.xml
Date Sat, 08 Dec 2012 09:09:17 GMT
Author: jlboudart
Date: Sat Dec  8 09:09:16 2012
New Revision: 1418634

URL: http://svn.apache.org/viewvc?rev=1418634&view=rev
Log:
publication artifact pattern should be parametrized, adapt unit tests

Modified:
    incubator/easyant/plugins/trunk/ivy-publication/src/main/resources/ivy-publication.ant
    incubator/easyant/plugins/trunk/ivy-publication/src/test/antunit/ivy-publication-test.xml

Modified: incubator/easyant/plugins/trunk/ivy-publication/src/main/resources/ivy-publication.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-publication/src/main/resources/ivy-publication.ant?rev=1418634&r1=1418633&r2=1418634&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-publication/src/main/resources/ivy-publication.ant
(original)
+++ incubator/easyant/plugins/trunk/ivy-publication/src/main/resources/ivy-publication.ant
Sat Dec  8 09:09:16 2012
@@ -29,7 +29,7 @@
             description="the name of the resolver use for release publication" />
         <ea:parameter property="shared.resolver" default="shared" description="the name
of the shared resolver" />
         <ea:parameter property="local.resolver" default="local" description="the name
of the local resolver" />
-
+      
         <ea:parameter property="project.ivy.instance" default="project.ivy.instance" description="ivy
instance name" />
         <ea:parameter property="project.ivy.file" required="true"
             description="ivy file (use to resolve dependencies for the project)" />
@@ -42,6 +42,7 @@
         <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" />
         <ea:parameter property="target.artifacts" default="${target}/artifacts" description="destination
directory for target artifacts" />
+        <ea:parameter property="publish.artifacts.pattern" default="${target.artifacts}/[artifact](-[classifier]).[ext]"
description="defines publication artifacts pattern"/>
 
         <ea:parameter property="fail.publication.if.no.revision" default="true"
             description="fail build if current module has no revision in 'info' tag of the
module.ivy" />
@@ -83,7 +84,7 @@
         <ea:checkresolver resolver="release.resolver" settingsRef="${project.ivy.instance}"
             description="name of the repository used to publish releases" />
         <check-version-number />
-        <ivy:publish artifactspattern="${target.artifacts}/[artifact](-[classifier]).[ext]"
resolver="${release.resolver}"
+        <ivy:publish artifactspattern="${publish.artifacts.pattern}" resolver="${release.resolver}"
             pubrevision="${version}" status="release" settingsRef="${project.ivy.instance}"
overwrite="${publish.overwrite}"
             haltonmissing="${ivy.haltonmissing}" update="true" />
         <echo message="project ${module.name} released with version ${version} on ${release.resolver}"
/>
@@ -99,7 +100,7 @@
         <tstamp>
             <format property="now" pattern="yyyyMMddHHmmss" />
         </tstamp>
-        <ivy:publish artifactspattern="${target.artifacts}/[artifact](-[classifier]).[ext]"
resolver="${shared.resolver}"
+        <ivy:publish artifactspattern="${publish.artifacts.pattern}" resolver="${shared.resolver}"
             forcedeliver="true" pubdate="${now}" pubrevision="${version}" status="integration"
overwrite="${publish.overwrite}"
             settingsRef="${project.ivy.instance}" haltonmissing="${ivy.haltonmissing}" />
         <echo message="project ${module.name} published with version ${version} on ${shared.resolver}"
/>
@@ -109,12 +110,14 @@
           target: publish-local              
          ================================= -->
     <target name="ivy-publication:publish-local" depends="-ivy-publication:init,ivy-publication:generate-local-version,ivy-publication:publish-ready">
+        <ea:checkresolver resolver="local.resolver" settingsRef="${project.ivy.instance}"
+            description="name of the repository used to publish local versions" />
         <check-version-number />
         <tstamp>
             <format property="now" pattern="yyyyMMddHHmmss" />
         </tstamp>
 
-        <ivy:publish artifactspattern="${target.artifacts}/[artifact](-[classifier]).[ext]"
resolver="${local.resolver}"
+        <ivy:publish artifactspattern="${publish.artifacts.pattern}" resolver="${local.resolver}"
             pubrevision="${version}" pubdate="${now}" status="integration" forcedeliver="true"
overwrite="${publish.overwrite}"
             settingsRef="${project.ivy.instance}" haltonmissing="${ivy.haltonmissing}" />
         <echo message="project ${module.name} published locally with version ${version}"
/>

Modified: incubator/easyant/plugins/trunk/ivy-publication/src/test/antunit/ivy-publication-test.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/ivy-publication/src/test/antunit/ivy-publication-test.xml?rev=1418634&r1=1418633&r2=1418634&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/ivy-publication/src/test/antunit/ivy-publication-test.xml
(original)
+++ incubator/easyant/plugins/trunk/ivy-publication/src/test/antunit/ivy-publication-test.xml
Sat Dec  8 09:09:16 2012
@@ -19,6 +19,7 @@
     
     <!-- 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 -->
@@ -36,8 +37,9 @@
         <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" />
+        <property name="project.ivy.instance" value="test.ivy.instance" />
+        <ivy:configure settingsId="${project.ivy.instance}" url="${ivy.default.settings.dir}/ivysettings.xml"/>
+        <ivy:resolve file="${project.ivy.file}" settingsRef="${project.ivy.instance}"
 />
         <mkdir dir="${target}/artifacts" />
         <echo file="${target}/artifacts/standard-java-app.jar" />
     </target>
@@ -47,10 +49,10 @@
         <au:assertPropertyEquals name="release.resolver" value="shared" />
         <au:assertPropertyEquals name="shared.resolver" value="shared" />
         <au:assertPropertyEquals name="local.resolver" value="local" />
-        <au:assertPropertyEquals name="project.ivy.instance" value="project.ivy.instance"
/>
         <au:assertPropertyEquals name="publish.overwrite" value="false" />
         <au:assertPropertyEquals name="ivy.haltonmissing" value="true" />
         <au:assertPropertyEquals name="target.artifacts" value="${target}/artifacts" />
+        <au:assertPropertyEquals name="publish.artifacts.pattern" value="${target.artifacts}/[artifact](-[classifier]).[ext]"/>
         <au:assertPropertyEquals name="is.project.ivy.settings.configured" value="true"
/>
     </target>
 



Mime
View raw message