ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r898344 - in /ant/ivy/core/trunk: CHANGES.txt doc/use/info.html src/java/org/apache/ivy/ant/IvyInfo.java test/java/org/apache/ivy/ant/IvyInfoTest.java test/java/org/apache/ivy/ant/ivy-info-all.xml
Date Tue, 12 Jan 2010 14:36:59 GMT
Author: maartenc
Date: Tue Jan 12 14:36:58 2010
New Revision: 898344

URL: http://svn.apache.org/viewvc?rev=898344&view=rev
Log:
NEW: Make ivy.xml <conf description> available (IVY-1158)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/doc/use/info.html
    ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInfoTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-info-all.xml

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=898344&r1=898343&r2=898344&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Tue Jan 12 14:36:58 2010
@@ -99,6 +99,8 @@
 =====================================
 - DOCUMENTATION: ivy-doc.xsl does not show configurations (IVY-1151) (thanks to Jasper Blues)
 
+- NEW: Make ivy.xml <conf description> available (IVY-1158)
+
 - IMPROVEMENT: Ivy doesn't support Maven 2.0.9 'import' scope (IVY-807)
 - IMPROVEMENT: resolver attribute for listmodules task (IVY-1057)
 - IMPROVEMENT: discover 'src' sources in maven repos (IVY-1138)

Modified: ant/ivy/core/trunk/doc/use/info.html
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/use/info.html?rev=898344&r1=898343&r2=898344&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/use/info.html (original)
+++ ant/ivy/core/trunk/doc/use/info.html Tue Jan 12 14:36:58 2010
@@ -29,7 +29,11 @@
 The info task ease the access to some essential data contained in an ivy file without performing
a dependency resolution.
 
 The information is retrieved by setting ant properties:
-<table>
+<table class="ant">
+<thead>
+    <tr><th class="ant-prop">Property</th><th class="ant-desc">Description</th></tr>
+</thead>
+<tbody>
 <tr><td>ivy.organisation</td><td>The organisation of the module,
as found in the <a href="../ivyfile/info.html">info</a> tag of the ivy file parsed</td></tr>
 <tr><td>ivy.module</td><td>The name of the module, as found in the
<a href="../ivyfile/info.html">info</a> tag of the ivy file parsed</td></tr>
 <tr><td>ivy.branch</td><td>The branch of the module if any, as found
in the <a href="../ivyfile/info.html">info</a> tag of the ivy file parsed</td></tr>
@@ -38,6 +42,8 @@
 <tr><td>ivy.extra.<i>[any extra attribute]</i></td><td>Corresponding
extra attribute value, as found in the <a href="../ivyfile/info.html">info</a>
tag of the ivy file parsed</td></tr>
 <tr><td>ivy.configurations</td><td>A comma separated list of configurations
of the module, as declared in the <a href="../ivyfile/configurations.html">configurations</a>
section</td></tr>
 <tr><td>ivy.public.configurations</td><td>A comma separated list
of public configurations of the module, as declared in the <a href="../ivyfile/configurations.html">configurations</a>
section</td></tr>
+<tr><td>ivy.configuration.<i>[config name]</i>.desc</td><td>For
each configuration with a description, a property is created containing this description.
<span class="since">(Since 2.2)</span></td></tr>
+</tbody>
 </table>
 <br/>
 <span class="since">since 2.0</span>

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java?rev=898344&r1=898343&r2=898344&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyInfo.java Tue Jan 12 14:36:58 2010
@@ -171,8 +171,14 @@
         Configuration[] configs = md.getConfigurations();
         List publicConfigsList = new ArrayList();
         for (int i = 0; i < configs.length; i++) {
+            String name = configs[i].getName();
             if (Visibility.PUBLIC.equals(configs[i].getVisibility())) {
-                publicConfigsList.add(configs[i].getName());
+                publicConfigsList.add(name);
+            }
+            
+            if (configs[i].getDescription() != null) {
+                getProject().setProperty(property + ".configuration." + name + ".desc",
+                                         configs[i].getDescription());
             }
         }
         String[] publicConfigs = (String[]) publicConfigsList

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInfoTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInfoTest.java?rev=898344&r1=898343&r2=898344&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInfoTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInfoTest.java Tue Jan 12 14:36:58 2010
@@ -56,6 +56,11 @@
         assertEquals("default, test", info.getProject().getProperty("ivy.public.configurations"));
         assertEquals("trunk", info.getProject().getProperty("ivy.branch"));
         assertEquals("myvalue", info.getProject().getProperty("ivy.extra.myextraatt"));
+        
+        // test the configuration descriptions
+        assertEquals("The default dependencies", info.getProject().getProperty("ivy.configuration.default.desc"));
+        assertEquals("Dependencies used for testing", info.getProject().getProperty("ivy.configuration.test.desc"));
+        assertNull(info.getProject().getProperty("ivy.configuration.private.desc"));
     }
 
     public void testIVY726() throws Exception {

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-info-all.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-info-all.xml?rev=898344&r1=898343&r2=898344&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-info-all.xml (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-info-all.xml Tue Jan 12 14:36:58 2010
@@ -25,8 +25,8 @@
 	       e:myextraatt="myvalue"
 	/>
 	<configurations>
-		<conf name="default" />
-		<conf name="test" />
+		<conf name="default" description="The default dependencies" />
+		<conf name="test" description="Dependencies used for testing" />
 		<conf name="private" visibility="private"/>
 	</configurations>
 	<dependencies>



Mime
View raw message