ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r609138 - in /ant/ivy/core/trunk: ./ doc/ src/java/org/apache/ivy/ant/ src/java/org/apache/ivy/core/module/descriptor/ src/java/org/apache/ivy/plugins/parser/xml/ src/java/org/apache/ivy/util/ src/java/org/apache/ivy/util/extendable/ test/j...
Date Sat, 05 Jan 2008 13:48:45 GMT
Author: xavier
Date: Sat Jan  5 05:47:31 2008
New Revision: 609138

URL: http://svn.apache.org/viewvc?rev=609138&view=rev
Log:
IMPROVEMENT: Use namespace aware validation (IVY-553)

Added:
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-extra-att-ns.xml   (with props)
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-namespaces.xml   (with props)
    ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/
    ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/ivy.xml   (with props)
    ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/mymodule-linux.jar   (with props)
    ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/mymodule-windows.jar   (with props)
Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/doc/concept.html
    ant/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyPublish.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/AbstractArtifact.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd
    ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/ExtendableItem.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/UnmodifiableExtendableItem.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-write-full.xml
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml
    ant/ivy/core/trunk/test/repositories/extra-attributes/ivysettings.xml

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Sat Jan  5 05:47:31 2008
@@ -60,6 +60,7 @@
 =====================================
 - NEW: Introduce RepositoryManagementEngine (IVY-665 - not completed yet)
 
+- IMPROVEMENT: Use namespace aware validation (IVY-553)
 - IMPROVEMENT: use ModuleRevisionId instead of ModuleId in IvySettings#getResolver (IVY-691)
 - IMPROVEMENT: Flexible cache management (IVY-399 - not completed yet)
 - IMPROVEMENT: Decrease memory footprint (IVY-662)

Modified: ant/ivy/core/trunk/doc/concept.html
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/concept.html?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/concept.html (original)
+++ ant/ivy/core/trunk/doc/concept.html Sat Jan  5 05:47:31 2008
@@ -168,13 +168,16 @@
 Several tags in ivy xml files are extensible with what is called extra attributes. 
 The idea is very simple: if you need some more information to define your modules, you can add the attribute you want and you will then be able to access it as any other attribute in your patterns for example.
 
+<span class="since">since 2.0</span>
+It's possible and recommended to use xml namespaces for your extra attributes. Using an Ivy extra namespace is the easiest way to add your own extra attributes.
+
 Example:
 Here is an ivy file with the attribute 'color' set to blue:
 <code type="xml">
-<ivy-module version="1.4">
+<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
 	<info organisation="apache"
 	       module="foo"
-	       color="blue"
+	       e:color="blue"
 	       status="integration"
 	       revision="1.59"
 	/>
@@ -182,14 +185,16 @@
 </code>
 Then you can use the extra attribute when you declare a dependency on foo:
 <code>
-<dependency org="apache" name="foo" color="blue" rev="1.5+" />
+<dependency org="apache" name="foo" e:color="blue" rev="1.5+" />
 </code>
 And you can define your repository pattern as:
 <code>
 ${repository.dir}/[organisation]/[module]/[color]/[revision]/[artifact].[ext]
 </code>
 
-Note that in order to use extra attributes, you will need to disable ivy file validation, since your files won't fulffill anymore the official ivy xsd. See the <a href="configuration/conf.html">configuration doc page</a> to see how to disable validation.
+Note that in patterns you must use the unqualified attribute name (no namespace prefix).
+
+If you don't want to use xml namespaces, it's possible but you will need to disable ivy file validation, since your files won't fulffill anymore the official ivy xsd. See the <a href="configuration/conf.html">settings documentation</a> to see how to disable validation.
 <h1><a name="checksum">Checksums</a></h1>
 <span class="since">since 1.4</span>
 Ivy allow to use checksums, also known as digester, to verify the correctness of a downloaded file.

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=609138&r1=609137&r2=609138&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 Sat Jan  5 05:47:31 2008
@@ -432,6 +432,10 @@
         public Map getExtraAttributes() {
             return new HashMap();
         }
+        
+        public Map getQualifiedExtraAttributes() {
+            return getExtraAttributes();
+        }
 
         public String getStandardAttribute(String attName) {
             return null;

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/AbstractArtifact.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/AbstractArtifact.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/AbstractArtifact.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/AbstractArtifact.java Sat Jan  5 05:47:31 2008
@@ -74,6 +74,10 @@
     public Map getExtraAttributes() {
         return getId().getExtraAttributes();
     }
+    
+    public Map getQualifiedExtraAttributes() {
+        return getId().getQualifiedExtraAttributes();
+    }
 
     public String getStandardAttribute(String attName) {
         return getId().getStandardAttribute(attName);

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultDependencyDescriptor.java Sat Jan  5 05:47:31 2008
@@ -508,6 +508,10 @@
         return revId.getExtraAttributes();
     }
 
+    public Map getQualifiedExtraAttributes() {
+        return revId.getQualifiedExtraAttributes();
+    }
+
     public String getStandardAttribute(String attName) {
         return revId.getStandardAttribute(attName);
     }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java Sat Jan  5 05:47:31 2008
@@ -212,6 +212,8 @@
     private List excludeRules = new ArrayList(); // List(ExcludeRule)
 
     private Artifact metadataArtifact;
+    
+    private Map/*<String,String>*/ extraAttributesNamespaces = new LinkedHashMap();
 
     public DefaultModuleDescriptor(ModuleRevisionId id, String status, Date pubDate) {
         this(id, status, pubDate, false);
@@ -543,6 +545,10 @@
         return resolvedRevId.getExtraAttributes();
     }
 
+    public Map getQualifiedExtraAttributes() {
+        return resolvedRevId.getQualifiedExtraAttributes();
+    }
+
     public String getStandardAttribute(String attName) {
         return resolvedRevId.getStandardAttribute(attName);
     }
@@ -603,5 +609,13 @@
 
     private boolean containsAny(String[] arr1, String[] arr2) {
         return new ArrayList(Arrays.asList(arr1)).removeAll(Arrays.asList(arr2));
+    }
+    
+    public Map getExtraAttributesNamespaces() {
+        return extraAttributesNamespaces;
+    }
+
+    public void addExtraAttributeNamespace(String prefix, String namespace) {
+        extraAttributesNamespaces.put(prefix, namespace);
     }
 }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java Sat Jan  5 05:47:31 2008
@@ -21,6 +21,7 @@
 import java.io.IOException;
 import java.text.ParseException;
 import java.util.Date;
+import java.util.Map;
 
 import org.apache.ivy.core.module.id.ArtifactId;
 import org.apache.ivy.core.module.id.ModuleId;
@@ -216,4 +217,17 @@
      * @return an array of {@link ExcludeRule} this module descriptor holds
      */
     public ExcludeRule[] getAllExcludeRules();
+
+    /**
+     * Returns the list of xml namespaces used by extra attributes, as Map from prefix to namespace
+     * URIs.
+     * <p>
+     * The returned list is never <code>null</code>, it is empty when no extra attribute is used
+     * or if extra attributes are used without xml namespaces
+     * </p>
+     * 
+     * @return the list of xml namespaces used by extra attributes, as Map from prefix to namespace
+     *         URIs.
+     */
+    Map/*<String,String>*/ getExtraAttributesNamespaces();
 }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java Sat Jan  5 05:47:31 2008
@@ -580,6 +580,14 @@
                         + " as default matcher");
                 defaultMatcher = ivy.getMatcher(PatternMatcher.EXACT_OR_REGEXP);
             }
+            
+            for (int i = 0; i < attributes.getLength(); i++) {
+                if (attributes.getQName(i).startsWith("xmlns:")) {
+                    md.addExtraAttributeNamespace(
+                        attributes.getQName(i).substring("xmlns:".length()), 
+                        attributes.getValue(i));
+                }
+            }
         }
 
         private void addDependencyArtifacts(String tag, Attributes attributes)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriter.java Sat Jan  5 05:47:31 2008
@@ -25,6 +25,7 @@
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.Map;
+import java.util.Map.Entry;
 
 import org.apache.ivy.Ivy;
 import org.apache.ivy.core.module.descriptor.Artifact;
@@ -36,6 +37,7 @@
 import org.apache.ivy.core.module.descriptor.IncludeRule;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.util.XMLHelper;
+import org.apache.ivy.util.extendable.ExtendableItem;
 
 /**
  *
@@ -62,7 +64,14 @@
             if (licenseHeader != null) {
                 out.print(licenseHeader);
             }
-            out.println("<ivy-module version=\"1.0\">");
+            StringBuffer xmlNamespace = new StringBuffer();
+            Map namespaces = md.getExtraAttributesNamespaces();
+            for (Iterator iter = namespaces.entrySet().iterator(); iter.hasNext();) {
+                Entry ns = (Entry) iter.next();
+                xmlNamespace.append(" xmlns:").append(ns.getKey()).append("=\"")
+                            .append(ns.getValue()).append("\"");
+            }
+            out.println("<ivy-module version=\"1.0\"" + xmlNamespace + ">");
             printInfoTag(md, out);
             printConfigurations(md, out);
             printPublications(md, out);
@@ -111,7 +120,7 @@
                 }
                 out.print("\"");
                 
-                printExtraAttributes(dds[i].getExtraAttributes(), out, " ");
+                printExtraAttributes(dds[i], out, " ");
                 
                 DependencyArtifactDescriptor[] depArtifacts = dds[i].getAllDependencyArtifacts();
                 if (depArtifacts.length > 0) {
@@ -254,13 +263,25 @@
                     }
                     out.print("\"");
                 }
-                printExtraAttributes(depArtifacts[j].getExtraAttributes(), out, " ");
+                printExtraAttributes(depArtifacts[j], out, " ");
                 out.println("/>");
             }
         }
     }
 
     /**
+     * Writes the extra attributes of the given {@link ExtendableItem} to the
+     * given <tt>PrintWriter</tt>.
+     * 
+     * @param item the {@link ExtendableItem}, cannot be <tt>null</tt>
+     * @param out the writer to use
+     * @param prefix the string to write before writing the attributes (if any)
+     */
+    private static void printExtraAttributes(ExtendableItem item, PrintWriter out, String prefix) {
+        printExtraAttributes(item.getQualifiedExtraAttributes(), out, prefix);
+    }
+
+    /**
      * Writes the specified <tt>Map</tt> containing the extra attributes to the
      * given <tt>PrintWriter</tt>.
      * 
@@ -291,7 +312,7 @@
             out.print(" type=\"" + XMLHelper.escape(artifacts[i].getType()) + "\"");
             out.print(" ext=\"" + XMLHelper.escape(artifacts[i].getExt()) + "\"");
             out.print(" conf=\"" + XMLHelper.escape(getConfs(md, artifacts[i])) + "\"");
-            printExtraAttributes(artifacts[i].getExtraAttributes(), out, " ");
+            printExtraAttributes(artifacts[i], out, " ");
             out.println("/>");
         }
         out.println("\t</publications>");
@@ -324,7 +345,7 @@
                 if (confs[i].getDeprecated() != null) {
                     out.print(" deprecated=\"" + XMLHelper.escape(confs[i].getDeprecated()) + "\"");
                 }
-                printExtraAttributes(confs[i].getExtraAttributes(), out, " ");
+                printExtraAttributes(confs[i], out, " ");
                 out.println("/>");
             }
             out.println("\t</configurations>");
@@ -358,7 +379,7 @@
             }
         }
         if (!md.getExtraAttributes().isEmpty()) {
-            printExtraAttributes(md.getExtraAttributes(), out, "\t\t");
+            printExtraAttributes(md, out, "\t\t");
             out.println();
         }
         out.println("\t/>");

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/ivy.xsd Sat Jan  5 05:47:31 2008
@@ -33,6 +33,7 @@
 				</xs:restriction>
 			</xs:simpleType>
 		</xs:attribute>
+        <xs:anyAttribute namespace="##other" processContents="lax" />
 	</xs:complexType>
 
   <xs:element name="ivy-module">
@@ -80,6 +81,7 @@
 		            <xs:attribute name="resolver" type="xs:string"/>
 		            <xs:attribute name="namespace" type="xs:string"/>
 		            <xs:attribute name="default" type="xs:boolean"/>
+		            <xs:anyAttribute namespace="##other" processContents="lax" />
 	            </xs:complexType>
       		</xs:element>
       		<xs:element name="configurations" minOccurs="0">
@@ -116,6 +118,7 @@
 						            <xs:attribute name="ext" type="xs:string"/>
 						            <xs:attribute name="conf" type="xs:string"/>
 						            <xs:attribute name="url" type="xs:string"/>
+						            <xs:anyAttribute namespace="##other" processContents="lax" />
 				            	</xs:complexType>
 				      		</xs:element>
 				        </xs:sequence>
@@ -154,6 +157,7 @@
 									            <xs:attribute name="ext" type="xs:string"/>
 									            <xs:attribute name="conf" type="xs:string"/>
 									            <xs:attribute name="url" type="xs:string"/>
+									            <xs:anyAttribute namespace="##other" processContents="lax" />
 							            	</xs:complexType>
 							      		</xs:element>
 							      		<xs:element name="include" minOccurs="0" maxOccurs="unbounded">
@@ -170,6 +174,7 @@
 									            <xs:attribute name="ext" type="xs:string"/>
 									            <xs:attribute name="conf" type="xs:string"/>
 									            <xs:attribute name="matcher" type="xs:string"/>
+									            <xs:anyAttribute namespace="##other" processContents="lax" />
 							            	</xs:complexType>
 							      		</xs:element>
 							      		<xs:element name="exclude" minOccurs="0" maxOccurs="unbounded">
@@ -188,6 +193,7 @@
 									            <xs:attribute name="ext" type="xs:string"/>
 									            <xs:attribute name="conf" type="xs:string"/>
 									            <xs:attribute name="matcher" type="xs:string"/>
+									            <xs:anyAttribute namespace="##other" processContents="lax" />
 							            	</xs:complexType>
 							      		</xs:element>
 							        </xs:sequence>
@@ -199,6 +205,7 @@
 						            <xs:attribute name="changing" type="xs:boolean" default="false"/>
 						            <xs:attribute name="transitive" type="xs:boolean" default="true"/>
 						            <xs:attribute name="conf" type="xs:string"/>
+						            <xs:anyAttribute namespace="##other" processContents="lax" />
 				            	</xs:complexType>
 				      		</xs:element>
 				      		<xs:element name="exclude" minOccurs="0" maxOccurs="unbounded">
@@ -217,6 +224,7 @@
 						            <xs:attribute name="ext" type="xs:string"/>
 						            <xs:attribute name="conf" type="xs:string"/>
 						            <xs:attribute name="matcher" type="xs:string"/>
+						            <xs:anyAttribute namespace="##other" processContents="lax" />
 				            	</xs:complexType>
 				      		</xs:element>
 				        </xs:sequence>
@@ -235,6 +243,7 @@
 						            <xs:attribute name="name" type="xs:string"/>
 						            <xs:attribute name="rev" type="xs:string"/>
 						            <xs:attribute name="matcher" type="xs:string"/>
+						            <xs:anyAttribute namespace="##other" processContents="lax" />
 				            	</xs:complexType>
 				      		</xs:element>
 				        </xs:sequence>

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/XMLHelper.java Sat Jan  5 05:47:31 2008
@@ -41,6 +41,9 @@
 
     static final String JAXP_SCHEMA_SOURCE 
         = "http://java.sun.com/xml/jaxp/properties/schemaSource";
+    
+    static final String XML_NAMESPACE_PREFIXES
+        = "http://xml.org/sax/features/namespace-prefixes";
 
     static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
 
@@ -60,6 +63,7 @@
             SAXParser parser = VALIDATING_FACTORY.newSAXParser();
             parser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
             parser.setProperty(JAXP_SCHEMA_SOURCE, schemaStream);
+            parser.getXMLReader().setFeature(XML_NAMESPACE_PREFIXES, true);
             return parser;
         } catch (SAXNotRecognizedException ex) {
             System.err.println(

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/ExtendableItem.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/ExtendableItem.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/ExtendableItem.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/ExtendableItem.java Sat Jan  5 05:47:31 2008
@@ -45,7 +45,8 @@
      * attribute, not a standard one (like organisation, revision)
      * 
      * @param attName
-     *            the name of the extra attribute to get
+     *            the name of the extra attribute to get. This name can be either qualified or
+     *            unqualified.
      * @return the value of the attribute, null if the attribute doesn't exist
      */
     String getExtraAttribute(String attName);
@@ -53,7 +54,7 @@
     /**
      * Returns a Map of all attributes of this extendable item, including standard and extra ones.
      * The Map keys are attribute names as Strings, and values are corresponding attribute values
-     * (as String too)
+     * (as String too). Extra attributes are included in unqualified form only.
      * 
      * @return A Map instance containing all the attributes and their values.
      */
@@ -68,10 +69,28 @@
     Map getStandardAttributes();
 
     /**
-     * Returns a Map of all extra attributes of this extendable item. The Map keys are attribute
-     * names as Strings, and values are corresponding attribute values (as String too)
+     * Returns a Map of all extra attributes of this extendable item. The Map keys are
+     * <b>unqualified</b> attribute names as Strings, and values are corresponding attribute values
+     * (as String too)
      * 
      * @return A Map instance containing all the extra attributes and their values.
+     * @see #getQualifiedExtraAttributes()
      */
     Map getExtraAttributes();
+
+    /**
+     * Returns a Map of all extra attributes of this extendable item.
+     * <p>
+     * The Map keys are <b>qualified</b> attribute names as Strings, and values are corresponding
+     * attribute values (as String too).
+     * </p>
+     * <p>
+     * An attribute name is qualified with a namespace exactly the same way xml attributes are
+     * qualified. Thus qualified attribute names are of the form <code>prefix:name</code>
+     * </p>
+     * 
+     * @return A Map instance containing all the extra attributes and their values.
+     * @see #getExtraAttributes()
+     */
+    Map getQualifiedExtraAttributes();
 }

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/UnmodifiableExtendableItem.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/UnmodifiableExtendableItem.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/UnmodifiableExtendableItem.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/extendable/UnmodifiableExtendableItem.java Sat Jan  5 05:47:31 2008
@@ -19,7 +19,9 @@
 
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.Map;
+import java.util.Map.Entry;
 
 public class UnmodifiableExtendableItem implements ExtendableItem {
     private final Map attributes = new HashMap();
@@ -35,14 +37,25 @@
     private final Map unmodifiableExtraAttributesView = 
                                     Collections.unmodifiableMap(extraAttributes);
 
+    /*
+     * this is the only place where extra attributes are stored in qualified form. In all other maps
+     * they are stored unqualified.
+     */
+    private final Map qualifiedExtraAttributes = new HashMap();
+
+    private final Map unmodifiableQualifiedExtraAttributesView = 
+                                    Collections.unmodifiableMap(qualifiedExtraAttributes);
+
     public UnmodifiableExtendableItem(Map stdAttributes, Map extraAttributes) {
         if (stdAttributes != null) {
             this.attributes.putAll(stdAttributes);
             this.stdAttributes.putAll(stdAttributes);
         }
         if (extraAttributes != null) {
-            this.attributes.putAll(extraAttributes);
-            this.extraAttributes.putAll(extraAttributes);
+            for (Iterator iter = extraAttributes.entrySet().iterator(); iter.hasNext();) {
+                Entry extraAtt = (Entry) iter.next();
+                setExtraAttribute((String) extraAtt.getKey(), (String) extraAtt.getValue());
+            }
         }
     }
 
@@ -51,7 +64,11 @@
     }
 
     public String getExtraAttribute(String attName) {
-        return (String) extraAttributes.get(attName);
+        String v = (String) qualifiedExtraAttributes.get(attName);
+        if (v == null) {
+            v = (String) extraAttributes.get(attName);
+        }
+        return v;
     }
 
     public String getStandardAttribute(String attName) {
@@ -68,6 +85,13 @@
 
     protected void setAttribute(String attName, String attValue, boolean extra) {
         if (extra) {
+            qualifiedExtraAttributes.put(attName, attValue);
+            
+            // unqualify att name if required
+            int index = attName.indexOf(':');
+            if (index != -1) {
+                attName = attName.substring(index + 1);
+            }
             extraAttributes.put(attName, attValue);
         } else {
             stdAttributes.put(attName, attValue);
@@ -85,6 +109,10 @@
 
     public Map getExtraAttributes() {
         return unmodifiableExtraAttributesView;
+    }
+    
+    public Map getQualifiedExtraAttributes() {
+        return unmodifiableQualifiedExtraAttributesView;
     }
 
 }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java Sat Jan  5 05:47:31 2008
@@ -3472,6 +3472,20 @@
         assertTrue(new File(cache, "apache/mymodule/task1/1854/mymodule-linux.jar").exists());
     }
 
+    public void testNamespaceExtraAttributes() throws Exception {
+        Ivy ivy = new Ivy();
+        ivy.configure(new File("test/repositories/extra-attributes/ivysettings.xml"));
+        ivy.getSettings().setDefaultCache(cache);
+
+        ResolveReport report = ivy.resolve(ResolveTest.class.getResource("ivy-extra-att-ns.xml"),
+            getResolveOptions(ivy.getSettings(), new String[] {"*"}).setValidate(true));
+        assertFalse(report.hasError());
+
+        assertTrue(new File(cache, "apache/mymodule/task1/1855/ivy.xml").exists());
+        assertTrue(new File(cache, "apache/mymodule/task1/1855/mymodule-windows.jar").exists());
+        assertTrue(new File(cache, "apache/mymodule/task1/1855/mymodule-linux.jar").exists());
+    }
+
     public void testBranches1() throws Exception {
         Ivy ivy = new Ivy();
         ivy.configure(new File("test/repositories/branches/ivysettings.xml"));

Added: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-extra-att-ns.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-extra-att-ns.xml?rev=609138&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-extra-att-ns.xml (added)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-extra-att-ns.xml Sat Jan  5 05:47:31 2008
@@ -0,0 +1,24 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0" xmlns:e="http://ant.apache.org/ivy/extra">
+    <info organisation="apache" module="extra-att" revision="1.0"/>
+    <dependencies>
+		<dependency name="mymodule" e:eatt="task1" rev="1855" />
+    </dependencies>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-extra-att-ns.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java Sat Jan  5 05:47:31 2008
@@ -21,6 +21,7 @@
 import java.io.IOException;
 import java.text.ParseException;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.Date;
 import java.util.GregorianCalendar;
 import java.util.HashSet;
@@ -34,6 +35,7 @@
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.module.descriptor.Configuration.Visibility;
 import org.apache.ivy.core.module.id.ModuleId;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.settings.IvySettings;
 import org.apache.ivy.plugins.conflict.ConflictManager;
 import org.apache.ivy.plugins.conflict.FixedConflictManager;
@@ -73,6 +75,20 @@
 
         assertNotNull(md.getDependencies());
         assertEquals(0, md.getDependencies().length);
+    }
+
+    public void testNamespaces() throws Exception {
+        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(settings,
+            getClass().getResource("test-namespaces.xml"), true);
+        assertNotNull(md);
+        ModuleRevisionId mrid = md.getModuleRevisionId();
+        assertEquals("myorg", mrid.getOrganisation());
+        assertEquals("mymodule", mrid.getName());
+        assertEquals("myval", mrid.getExtraAttribute("e:myextra"));
+        assertEquals(Collections.singletonMap("e:myextra", "myval"), mrid.getQualifiedExtraAttributes());
+        assertEquals("myval", mrid.getExtraAttribute("myextra"));
+        assertEquals(Collections.singletonMap("myextra", "myval"), mrid.getExtraAttributes());
+        assertEquals("http://ant.apache.org/ivy/extra", md.getExtraAttributesNamespaces().get("e"));
     }
 
     public void testEmptyDependencies() throws Exception {

Added: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-namespaces.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-namespaces.xml?rev=609138&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-namespaces.xml (added)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-namespaces.xml Sat Jan  5 05:47:31 2008
@@ -0,0 +1,24 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0" xmlns:e="http://ant.apache.org/ivy/extra">
+	<info organisation="myorg"
+	       module="mymodule"
+	       e:myextra="myval"
+	/>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-namespaces.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update-withvar.xml Sat Jan  5 05:47:31 2008
@@ -19,12 +19,13 @@
    under the License.    
 -->
 <!-- A comment before the first tag -->
-<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
+<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" xmlns:e="http://ant.apache.org/ivy/extra">
 	<!-- A comment with accent é & special characters -->
 	<info organisation="${myorg}"
 	       module="${mymodule}"
 	       revision="${myrev}"
 	       status="${mystatus}"
+	       e:myextra="myval"
 	       publication="{mypubdate}">
 	       
 		<license name="${mylicense}" url="${mylicenseurl}"/>

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-update.xml Sat Jan  5 05:47:31 2008
@@ -19,12 +19,13 @@
    under the License.    
 -->
 <!-- A comment before the first tag -->
-<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
+<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" xmlns:e="http://ant.apache.org/ivy/extra">
 	<!-- A comment with accent é & special characters -->
 	<info organisation="myorg"
 	       module="mymodule"
 	       revision="myrev"
 	       status="integration"
+	       e:myextra="myval"
 	       publication="20041101110000">
 	       
 		<license name="MyLicense" url="http://www.my.org/mymodule/mylicense.html"/>

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-write-full.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-write-full.xml?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-write-full.xml (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test-write-full.xml Sat Jan  5 05:47:31 2008
@@ -17,29 +17,29 @@
    specific language governing permissions and limitations
    under the License.    
 -->
-<ivy-module version="1.0">
+<ivy-module version="1.0" xmlns:e="http://ant.apache.org/ivy/extra">
 	<info organisation="myorg"
 		module="mymodule"
 		revision="myrev"
 		status="integration"
 		publication="20041101110000"
-		attr1="value1"
+		e:attr1="value1"
 	/>
 	<configurations>
-		<conf name="myconf1" visibility="public" description="desc 1" attr2="value2"/>
+		<conf name="myconf1" visibility="public" description="desc 1" e:attr2="value2"/>
 		<conf name="myconf2" visibility="public" description="desc 2"/>
 		<conf name="myconf3" visibility="private" description="desc 3"/>
 		<conf name="myconf4" visibility="public" description="desc 4" extends="myconf1,myconf2"/>
 		<conf name="myoldconf" visibility="public" description="my old desc" deprecated="20050115"/>
 	</configurations>
 	<publications>
-		<artifact name="myartifact1" type="jar" ext="jar" conf="myconf1,myconf2,myconf3,myconf4,myoldconf" attr3="value3"/>
+		<artifact name="myartifact1" type="jar" ext="jar" conf="myconf1,myconf2,myconf3,myconf4,myoldconf" e:attr3="value3"/>
 		<artifact name="myartifact2" type="jar" ext="jar" conf="myconf1"/>
 		<artifact name="myartifact3" type="jar" ext="jar" conf="myconf1,myconf2,myconf3"/>
 		<artifact name="myartifact4" type="jar" ext="jar" conf="myconf1,myconf3"/>
 	</publications>
 	<dependencies>
-		<dependency org="myorg" name="mymodule2" rev="2.0" conf="*->*" attr4="value4"/>
+		<dependency org="myorg" name="mymodule2" rev="2.0" conf="*->*" e:attr4="value4"/>
 		<dependency org="myorg" name="mymodule3" rev="2.0" changing="true" transitive="false" conf="*->*"/>
 		<dependency org="yourorg" name="yourmodule1" rev="1.1" conf="myconf1->myconf1"/>
 		<dependency org="yourorg" name="yourmodule2" rev="2+" conf="myconf1->yourconf1"/>
@@ -49,7 +49,7 @@
 		<dependency org="yourorg" name="yourmodule6" rev="latest.integration" conf="myconf1->yourconf1;myconf2->yourconf1,yourconf2"/>
 		<dependency org="yourorg" name="yourmodule7" rev="7.1" conf="myconf1->yourconf1;myconf2->yourconf1,yourconf2"/>
 		<dependency org="yourorg" name="yourmodule8" rev="8.1" conf="*->*">
-			<artifact name="yourartifact8-1" type="jar" ext="jar" attr5="value5"/>
+			<artifact name="yourartifact8-1" type="jar" ext="jar" e:attr5="value5"/>
 			<artifact name="yourartifact8-2" type="jar" ext="jar"/>
 		</dependency>
 		<dependency org="yourorg" name="yourmodule9" rev="9.1" conf="myconf1->default;myconf2->default;myconf3->default">

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/test.xml Sat Jan  5 05:47:31 2008
@@ -17,13 +17,13 @@
    specific language governing permissions and limitations
    under the License.    
 -->
-<ivy-module version="2.0">
+<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
 	<info organisation="myorg"
 	       module="mymodule"
 	       revision="myrev"
 	       status="integration"
 	       publication="20041101110000"
-	       attr1="value1">
+	       e:attr1="value1">
 	       
 		<license name="MyLicense" url="http://www.my.org/mymodule/mylicense.html"/>
 		
@@ -38,14 +38,14 @@
 		</description>
 	</info>
 	<configurations>
-		<conf name="myconf1" description="desc 1" attr2="value2"/>
+		<conf name="myconf1" description="desc 1" e:attr2="value2"/>
 		<conf name="myconf2" description="desc 2" visibility="public"/>
 		<conf name="myconf3" description="desc 3" visibility="private"/>
 		<conf name="myconf4" description="desc 4" extends="myconf1, myconf2"/>		
 		<conf name="myoldconf" description="my old desc" deprecated="20050115"/>
 	</configurations>
 	<publications>
-		<artifact name="myartifact1" type="jar" attr3="value3"/>
+		<artifact name="myartifact1" type="jar" e:attr3="value3"/>
 		<artifact name="myartifact2" type="jar" conf="myconf1"/>
 		<artifact name="myartifact3" type="jar" conf="myconf1, myconf2, myconf3"/>
 		<artifact name="myartifact4" type="jar">
@@ -54,7 +54,7 @@
 		</artifact>
 	</publications>
 	<dependencies>
-		<dependency name="mymodule2" rev="2.0" attr4="value4"/>
+		<dependency name="mymodule2" rev="2.0" e:attr4="value4"/>
 		<dependency name="mymodule3" rev="2.0" changing="true" transitive="false"/>
 		<dependency org="yourorg" name="yourmodule1" rev="1.1" conf="myconf1"/>
 		<dependency org="yourorg" name="yourmodule2" rev="2+" conf="myconf1->yourconf1"/>
@@ -78,7 +78,7 @@
 		</dependency>
 
 		<dependency org="yourorg" name="yourmodule8" rev="8.1">
-			<artifact name="yourartifact8-1" type="jar" attr5="value5"/>
+			<artifact name="yourartifact8-1" type="jar" e:attr5="value5"/>
 			<artifact name="yourartifact8-2" type="jar"/>
 		</dependency>		
 

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/updated.xml Sat Jan  5 05:47:31 2008
@@ -19,9 +19,9 @@
    under the License.    
 -->
 <!-- A comment before the first tag -->
-<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
+<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" xmlns:e="http://ant.apache.org/ivy/extra">
 	<!-- A comment with accent é & special characters -->
-	<info organisation="myorg" module="mymodule" revision="mynewrev" status="release" publication="20050322143254">
+	<info organisation="myorg" module="mymodule" revision="mynewrev" status="release" publication="20050322143254" e:myextra="myval">
 	       
 		<license name="MyLicense" url="http://www.my.org/mymodule/mylicense.html"/>
 		

Modified: ant/ivy/core/trunk/test/repositories/extra-attributes/ivysettings.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/extra-attributes/ivysettings.xml?rev=609138&r1=609137&r2=609138&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/repositories/extra-attributes/ivysettings.xml (original)
+++ ant/ivy/core/trunk/test/repositories/extra-attributes/ivysettings.xml Sat Jan  5 05:47:31 2008
@@ -19,10 +19,12 @@
 <ivysettings>
    <settings 
      defaultCache="${ivy.settings.dir}/cache" 
-     cacheIvyPattern="[organisation]/[module]/[eatt]/[revision]/ivy.xml"
-     cacheArtifactPattern="[organisation]/[module]/[eatt]/[revision]/[artifact]-[platform].[ext]"
 	 defaultResolver="default" 
 	 />
+   <caches      
+   	 ivyPattern="[organisation]/[module]/[eatt]/[revision]/ivy.xml"
+     artifactPattern="[organisation]/[module]/[eatt]/[revision]/[artifact]-[platform].[ext]"
+   />
    <resolvers>
         <filesystem name="default"> 
           <ivy pattern="${ivy.settings.dir}/[module]/[eatt]/[revision]/ivy.xml" /> 

Added: ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/ivy.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/ivy.xml?rev=609138&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/ivy.xml (added)
+++ ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/ivy.xml Sat Jan  5 05:47:31 2008
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0" xmlns:e="http://ant.apache.org/ivy/extra">
+    <info 
+        organisation="apache"
+        module="mymodule"
+        e:eatt="task1"
+        revision="1855"
+        status="integration">
+	</info>
+	<publications>
+		<artifact name="mymodule" e:platform="windows" type="jar"/>
+		<artifact name="mymodule" e:platform="linux" type="jar"/>
+	</publications>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/ivy.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/mymodule-linux.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/mymodule-linux.jar?rev=609138&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/mymodule-linux.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/mymodule-windows.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/mymodule-windows.jar?rev=609138&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/ivy/core/trunk/test/repositories/extra-attributes/mymodule/task1/1855/mymodule-windows.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message