ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r821169 - in /ant/ivy/core/trunk: src/java/org/apache/ivy/core/search/ test/repositories/IVY-1128/test/a/extraatt.a/ test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ test/repo...
Date Fri, 02 Oct 2009 21:16:38 GMT
Author: maartenc
Date: Fri Oct  2 21:16:37 2009
New Revision: 821169

URL: http://svn.apache.org/viewvc?rev=821169&view=rev
Log:
FIX: SearchEngine.listModules returns MRID without extra attributes (IVY-1128) (thanks to
Michael Scheetz)

Added:
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-1.xml
  (with props)
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-2.xml
  (with props)
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-1.xml  
(with props)
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-2.xml  
(with props)
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-1.xml  
(with props)
    ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-2.xml  
(with props)
Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/search/SearchEngine.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/search/SearchEngine.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/search/SearchEngine.java?rev=821169&r1=821168&r2=821169&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/search/SearchEngine.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/search/SearchEngine.java Fri Oct  2 21:16:37
2009
@@ -27,6 +27,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.Map.Entry;
 
 import org.apache.ivy.core.IvyPatternHelper;
 import org.apache.ivy.core.module.id.ModuleId;
@@ -228,11 +229,10 @@
         List ret = new ArrayList();
 
         Map criteria = new HashMap();
-        addMatcher(matcher, moduleCrit.getOrganisation(), 
-                   criteria, IvyPatternHelper.ORGANISATION_KEY);
-        addMatcher(matcher, moduleCrit.getName(), criteria, IvyPatternHelper.MODULE_KEY);
-        addMatcher(matcher, moduleCrit.getBranch(), criteria, IvyPatternHelper.BRANCH_KEY);
-        addMatcher(matcher, moduleCrit.getRevision(), criteria, IvyPatternHelper.REVISION_KEY);
+        for (Iterator it = moduleCrit.getAttributes().entrySet().iterator(); it.hasNext();
) {
+            Map.Entry entry = (Entry) it.next();
+            addMatcher(matcher, (String) entry.getValue(), criteria, (String) entry.getKey());
+        }
 
         String[] tokensToList = (String[]) moduleCrit.getAttributes().keySet().toArray(
                     new String[moduleCrit.getAttributes().size()]);
@@ -284,11 +284,10 @@
     public ModuleRevisionId[] listModules(
             DependencyResolver resolver, ModuleRevisionId moduleCrit, PatternMatcher matcher)
{
         Map criteria = new HashMap();
-        addMatcher(matcher, moduleCrit.getOrganisation(), 
-                   criteria, IvyPatternHelper.ORGANISATION_KEY);
-        addMatcher(matcher, moduleCrit.getName(), criteria, IvyPatternHelper.MODULE_KEY);
-        addMatcher(matcher, moduleCrit.getBranch(), criteria, IvyPatternHelper.BRANCH_KEY);
-        addMatcher(matcher, moduleCrit.getRevision(), criteria, IvyPatternHelper.REVISION_KEY);
+        for (Iterator it = moduleCrit.getAttributes().entrySet().iterator(); it.hasNext();
) {
+            Map.Entry entry = (Entry) it.next();
+            addMatcher(matcher, (String) entry.getValue(), criteria, (String) entry.getKey());
+        }
         
         String[] tokensToList = (String[]) moduleCrit.getAttributes().keySet().toArray(
             new String[moduleCrit.getAttributes().size()]);

Added: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-1.xml?rev=821169&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-1.xml
(added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-1.xml
Fri Oct  2 21:16:37 2009
@@ -0,0 +1,22 @@
+<!--
+   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.4" xmlns:e="http://ant.apache.org/ivy/extra">
+   <info organisation="test" module="a" revision="1" status="integration" publication="20090108103716"
e:att1="extraatt.a" e:att2="extraatt2.a"/>
+   <publications/>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-2.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-2.xml?rev=821169&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-2.xml
(added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-2.xml
Fri Oct  2 21:16:37 2009
@@ -0,0 +1,22 @@
+<!--
+   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.4" xmlns:e="http://ant.apache.org/ivy/extra">
+   <info organisation="test" module="a" revision="2" status="integration" publication="20090108103716"
e:att1="extraatt.a" e:att2="extraatt2.a"/>
+   <publications/>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2.a/ivy-2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-1.xml?rev=821169&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-1.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-1.xml Fri
Oct  2 21:16:37 2009
@@ -0,0 +1,22 @@
+<!--
+   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.4" xmlns:e="http://ant.apache.org/ivy/extra">
+   <info organisation="test" module="a" revision="1" status="integration" publication="20090108103716"
e:att1="extraatt.a" e:att2="extraatt2"/>
+   <publications/>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-2.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-2.xml?rev=821169&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-2.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-2.xml Fri
Oct  2 21:16:37 2009
@@ -0,0 +1,22 @@
+<!--
+   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.4" xmlns:e="http://ant.apache.org/ivy/extra">
+   <info organisation="test" module="a" revision="2" status="integration" publication="20090108103716"
e:att1="extraatt.a" e:att2="extraatt2"/>
+   <publications/>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt.a/extraatt2/ivy-2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-1.xml?rev=821169&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-1.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-1.xml Fri
Oct  2 21:16:37 2009
@@ -0,0 +1,22 @@
+<!--
+   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.4" xmlns:e="http://ant.apache.org/ivy/extra">
+   <info organisation="test" module="a" revision="1" status="integration" publication="20090108103716"
e:att1="extraatt" e:att2="extraatt2.a"/>
+   <publications/>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-2.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-2.xml?rev=821169&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-2.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-2.xml Fri
Oct  2 21:16:37 2009
@@ -0,0 +1,22 @@
+<!--
+   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.4" xmlns:e="http://ant.apache.org/ivy/extra">
+   <info organisation="test" module="a" revision="2" status="integration" publication="20090108103716"
e:att1="extraatt" e:att2="extraatt2.a"/>
+   <publications/>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/IVY-1128/test/a/extraatt/extraatt2.a/ivy-2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message