ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r988691 - in /ant/ivy/core/trunk: CHANGES.txt doc/use/publish.html src/java/org/apache/ivy/ant/IvyPublish.java
Date Tue, 24 Aug 2010 19:50:06 GMT
Author: maartenc
Date: Tue Aug 24 19:50:05 2010
New Revision: 988691

URL: http://svn.apache.org/viewvc?rev=988691&view=rev
Log:
- DOCUMENTATION: Added missing documentation about the ivy:publish child elements.
- IMPROVEMENT: the <artifact> child of ivy:publish now accepts any attribute.

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/doc/use/publish.html
    ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=988691&r1=988690&r2=988691&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Tue Aug 24 19:50:05 2010
@@ -111,8 +111,10 @@ for detailed view of each issue, please 
 	
    trunk
 =====================================
+- DOCUMENTATION: Added missing documentation about the ivy:publish child elements.
 - DOCUMENTATION: Grammar, spelling, and clarity of Settings File documentation (IVY-1216)
(thanks to Steve Miller)
 
+- IMPROVEMENT: the <artifact> child of ivy:publish now accepts any attribute
 - IMPROVEMENT: Handle attributes in description subelements (IVY-1214) (thanks to Jean-Louis
Boudart)
 - IMPROVEMENT: Use IvyAuthenticator only when it is really necessary (IVY-1211)
 - IMPROVEMENT: MakePom task handling of mulitple artifacts for Maven2 (IVY-707) (thanks to
Jesper Pedersen)

Modified: ant/ivy/core/trunk/doc/use/publish.html
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/use/publish.html?rev=988691&r1=988690&r2=988691&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/use/publish.html (original)
+++ ant/ivy/core/trunk/doc/use/publish.html Tue Aug 24 19:50:05 2010
@@ -86,14 +86,29 @@ The source artifact pattern can be speci
         <td>No. No recursive delivery is done by default</td></tr>
     <tr><td>settingsRef</td><td>A reference to the ivy settings that
must be used by this task <span class="since">(since 2.0)</span></td><td>No,
'ivy.instance' is taken by default.</td></tr></tbody>
 </table>
+<h1>Child elements</h1>
+<table class="ivy-children">
+<thead>
+    <tr><th class="ivy-chld">Element</th><th class="ivy-chld-desc">Description</th><th
class="ivy-chld-card">Cardinality</th></tr>
+</thead>
+<tbody>
+    <tr><td>artifact</td>
+        <td>Describe additional artifacts to publish<br/>These elements can have
any attribute: standard artifact attributes and (since 2.2) extra attributes are supported.</td>
+        <td>0..n</td></tr>
+    <tr><td>artifacts</td>
+        <td>Specify the pattern used to find the artifact.<br/>These elements
have a <i>pattern</i> attribute containing the pattern used to find the artifact.</td>
+        <td>0..n</td></tr>
+</tbody>
+</table>
+
 <h1>Examples</h1>
 <code type="xml">
 <ivy:publish resolver="local" pubrevision="1.0">
-   <artifacts pattern="1/[artifact].[ext]" />
-   <artifacts pattern="2/[artifact].[ext]" />
+   <artifacts pattern="build/artifacts/jars/[artifact].[ext]" />
+   <artifacts pattern="build/artifacts/zips/[artifact].[ext]" />
 </ivy:publish>
 </code>
-Publishes the last resolved module in the local resolver with revision 1.0, looking for artifacts
in directories 1 and 2.
+Publishes the last resolved module in the local resolver with revision 1.0, looking for artifacts
in directories <i>build/artifacts/jars</i> and <i>build/artifacts/zips</i>.
 	</textarea>
 <script type="text/javascript">xooki.postProcess();</script>
 </body>

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java?rev=988691&r1=988690&r2=988691&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java Tue Aug 24 19:50:05 2010
@@ -34,6 +34,7 @@ import org.apache.ivy.core.module.id.Mod
 import org.apache.ivy.core.publish.PublishOptions;
 import org.apache.ivy.core.settings.IvySettings;
 import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DynamicAttribute;
 
 /**
  * This task allow to publish a module revision to an Ivy repository.
@@ -385,12 +386,14 @@ public class IvyPublish extends IvyTask 
         this.update = update;
     }
 
-    public class PublishArtifact implements Artifact {
+    public class PublishArtifact implements Artifact, DynamicAttribute {
         private String ext;
 
         private String name;
 
         private String type;
+        
+        private Map extra = new HashMap();
 
         public String[] getConfigurations() {
             return null;
@@ -437,36 +440,32 @@ public class IvyPublish extends IvyTask 
         }
 
         public String getAttribute(String attName) {
-            return null;
+            return (String) extra.get(attName);
         }
 
         public Map getAttributes() {
-            return new HashMap();
+            return extra;
         }
 
         public String getExtraAttribute(String attName) {
-            return null;
+            return (String) extra.get(attName);
         }
 
         public Map getExtraAttributes() {
-            return new HashMap();
+            return extra;
         }
         
         public Map getQualifiedExtraAttributes() {
-            return new HashMap();
-        }
-
-        public String getStandardAttribute(String attName) {
-            return null;
+            return extra;
         }
 
-        public Map getStandardAttributes() {
-            return new HashMap();
-        }
-        
         public boolean isMetadata() {
             return false;
         }
+        
+        public void setDynamicAttribute(String name, String value) {
+            extra.put(name, value);
+        }
     }
 
     public static class ArtifactsPattern {



Mime
View raw message