Ivy
  1. Ivy
  2. IVY-1115

ResolveEngine.getDependencies does not work using extra attributes.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-RC2
    • Fix Version/s: 2.2.0-RC1
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Ivy SVN version 808087
      Apache Ant version 1.7.0 compiled on December 13 2006

      Description

      I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.

      public void testBuildDependencyList_ExtraAtt() throws Exception {
      System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
      System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
      String org = "apache";
      String mod = "mymodule";
      String rev = "1749";
      Map extraAttributes = new HashMap();
      extraAttributes.put("eatt", "task2");
      extraAttributes.put("eatt2", "test");

      ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
      ivy.getEventManager(), ivy.getSortEngine());

      ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
      DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[]

      {"*"}, true, false);
      String resolveId = ResolveOptions.getDefaultResolveId(md);
      ResolveOptions options = new ResolveOptions();
      options.setConfs(new String[] {"*"}

      );
      options.setResolveId(resolveId);
      ResolveReport report = new ResolveReport(md, options.getResolveId());

      IvyNode[] deps = engine.getDependencies(md, options, report);

      assertEquals(2, deps.length);
      assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
      assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
      }

      public void testBuildDependencyList_MultiDeps() throws Exception {
      System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
      System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
      String org = "org2";
      String mod = "mod2.3";
      String rev = "0.4";

      ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
      ivy.getEventManager(), ivy.getSortEngine());

      ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
      DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[]

      {"*"}, true, false);
      String resolveId = ResolveOptions.getDefaultResolveId(md);
      ResolveOptions options = new ResolveOptions();
      options.setConfs(new String[] {"*"}

      );
      options.setResolveId(resolveId);
      ResolveReport report = new ResolveReport(md, options.getResolveId());

      IvyNode[] deps = engine.getDependencies(md, options, report);

      assertEquals(4, deps.length);
      }

      Update:
      There seems to be parsing issue using extra attributes on the artifact, or perhaps there is a test setup issue. Lookup with only module level extra attributes seems to work.

      java.text.ParseException: [xml parsing: ivy.xml.original:28:60: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
      , xml parsing: ivy.xml.original:29:58: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
      ]
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:342)
      at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:103)
      at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:638)
      at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:655)
      at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:942)
      at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:542)
      at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:263)
      at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
      at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:274)
      at org.apache.ivy.core.resolve.VisitNodeTest.testLoadData_ExtraAtt_artifact(VisitNodeTest.java:84)

      I don't have a test for it, yet, but I think

      ...
      ModuleRevisionId[] mridArr = ...
      DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mridArr, true, true);
      IvyNode[] deps = engine.getDependencies(md, options, report);
      ...

      Is not transitive in that it only returns the immediate dependencies for the mridArr objects but not the rest of the dependencies.

        Issue Links

          Activity

          Michael Scheetz created issue -
          Michael Scheetz made changes -
          Field Original Value New Value
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("org-dontCare#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }
          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }
          Scott Hebert made changes -
          Link This issue relates to IVY-1079 [ IVY-1079 ]
          Scott Hebert made changes -
          Link This issue relates to IVY-956 [ IVY-956 ]
          Michael Scheetz made changes -
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }
          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.
          Michael Scheetz made changes -
          Attachment IVY-1115.svn.patch [ 12419087 ]
          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419088 ]
          Michael Scheetz made changes -
          Attachment IVY-1115.svn.patch [ 12419087 ]
          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419096 ]
          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419088 ]
          Michael Scheetz made changes -
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.
          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.

          From there, there is a call to resolver.getDependency(dependencyDescriptor, data); which throws the following exception:

          java.text.ParseException: [xml parsing: ivy.xml.original:28:60: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          , xml parsing: ivy.xml.original:29:58: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          ]
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:342)
          at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:103)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:638)
          at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:655)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:942)
          at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:542)
          at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:263)
          at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
          at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:274)
          at org.apache.ivy.core.resolve.VisitNodeTest.testLoadData_ExtraAtt(VisitNodeTest.java:83)
          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419101 ]
          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419096 ]
          Michael Scheetz made changes -
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.

          From there, there is a call to resolver.getDependency(dependencyDescriptor, data); which throws the following exception:

          java.text.ParseException: [xml parsing: ivy.xml.original:28:60: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          , xml parsing: ivy.xml.original:29:58: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          ]
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:342)
          at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:103)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:638)
          at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:655)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:942)
          at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:542)
          at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:263)
          at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
          at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:274)
          at org.apache.ivy.core.resolve.VisitNodeTest.testLoadData_ExtraAtt(VisitNodeTest.java:83)
          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.
          Michael Scheetz made changes -
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.
          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.

          From there a call is made to
              module = resolver.getDependency(dependencyDescriptor, data);
          which returns a null module.

          Michael Scheetz made changes -
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.

          From there a call is made to
              module = resolver.getDependency(dependencyDescriptor, data);
          which returns a null module.

          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.

          From there a call is made to
              module = resolver.getDependency(dependencyDescriptor, data);
          which returns a null module.

          Within the resolver, the call
                          ResolvedResource ivyRef = findIvyFileRef(nsDd, data);
          returns a null ivyRef.

          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419114 ]
          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419101 ]
          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419116 ]
          Michael Scheetz made changes -
          Attachment IVY-1115.tests.svn.patch [ 12419114 ]
          Michael Scheetz made changes -
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:

          So far, I have traced the issue down to the VisitNode.loadData(String[], boolean) method. This method returns false when extra attributes are used, even if there are additional dependencies to follow.

          From there a call is made to
              module = resolver.getDependency(dependencyDescriptor, data);
          which returns a null module.

          Within the resolver, the call
                          ResolvedResource ivyRef = findIvyFileRef(nsDd, data);
          returns a null ivyRef.

          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:
          There seems to be parsing issue using extra attributes on the artifact. Lookup with only module level extra attributes seems to work.

          java.text.ParseException: [xml parsing: ivy.xml.original:28:60: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          , xml parsing: ivy.xml.original:29:58: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          ]
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:342)
          at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:103)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:638)
          at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:655)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:942)
          at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:542)
          at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:263)
          at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
          at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:274)
          at org.apache.ivy.core.resolve.VisitNodeTest.testLoadData_ExtraAtt_artifact(VisitNodeTest.java:84)

          Michael Scheetz made changes -
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:
          There seems to be parsing issue using extra attributes on the artifact. Lookup with only module level extra attributes seems to work.

          java.text.ParseException: [xml parsing: ivy.xml.original:28:60: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          , xml parsing: ivy.xml.original:29:58: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          ]
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:342)
          at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:103)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:638)
          at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:655)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:942)
          at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:542)
          at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:263)
          at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
          at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:274)
          at org.apache.ivy.core.resolve.VisitNodeTest.testLoadData_ExtraAtt_artifact(VisitNodeTest.java:84)

          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:
          There seems to be parsing issue using extra attributes on the artifact, or perhaps there is a test setup issue. Lookup with only module level extra attributes seems to work.

          java.text.ParseException: [xml parsing: ivy.xml.original:28:60: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          , xml parsing: ivy.xml.original:29:58: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          ]
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:342)
          at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:103)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:638)
          at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:655)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:942)
          at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:542)
          at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:263)
          at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
          at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:274)
          at org.apache.ivy.core.resolve.VisitNodeTest.testLoadData_ExtraAtt_artifact(VisitNodeTest.java:84)

          Priority Major [ 3 ] Minor [ 4 ]
          Michael Scheetz made changes -
          Description I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:
          There seems to be parsing issue using extra attributes on the artifact, or perhaps there is a test setup issue. Lookup with only module level extra attributes seems to work.

          java.text.ParseException: [xml parsing: ivy.xml.original:28:60: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          , xml parsing: ivy.xml.original:29:58: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          ]
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:342)
          at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:103)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:638)
          at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:655)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:942)
          at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:542)
          at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:263)
          at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
          at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:274)
          at org.apache.ivy.core.resolve.VisitNodeTest.testLoadData_ExtraAtt_artifact(VisitNodeTest.java:84)

          I wrote these two tests for 'test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java'. The one using extra attributes to build a dependency list does not return the complete set of dependencies.


              public void testBuildDependencyList_ExtraAtt() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/extra-attributes").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/extra-attributes/ivysettings.xml");
                  String org = "apache";
                  String mod = "mymodule";
                  String rev = "1749";
                  Map extraAttributes = new HashMap();
                  extraAttributes.put("eatt", "task2");
                  extraAttributes.put("eatt2", "test");
                  
                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev, extraAttributes);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(2, deps.length);
                  assertTrue(Arrays.toString(deps).contains("apache#mymodule;1749"));
                  assertTrue(Arrays.toString(deps).contains("apache#module2;1976"));
              }
              
              public void testBuildDependencyList_MultiDeps() throws Exception {
                  System.setProperty("ivy.local.default.root", new File("test/repositories/1").getAbsolutePath());
                  System.setProperty("ivy.settings.file", "test/repositories/ivysettings-1.xml");
                  String org = "org2";
                  String mod = "mod2.3";
                  String rev = "0.4";

                  ResolveEngine engine = new ResolveEngine(ivy.getSettings(),
                      ivy.getEventManager(), ivy.getSortEngine());

                  ModuleRevisionId mRevId = ModuleRevisionId.newInstance(org, mod, rev);
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mRevId, new String[] {"*"}, true, false);
                  String resolveId = ResolveOptions.getDefaultResolveId(md);
                  ResolveOptions options = new ResolveOptions();
                  options.setConfs(new String[] {"*"});
                  options.setResolveId(resolveId);
                  ResolveReport report = new ResolveReport(md, options.getResolveId());

                  IvyNode[] deps = engine.getDependencies(md, options, report);

                  assertEquals(4, deps.length);
              }


          Update:
          There seems to be parsing issue using extra attributes on the artifact, or perhaps there is a test setup issue. Lookup with only module level extra attributes seems to work.

          java.text.ParseException: [xml parsing: ivy.xml.original:28:60: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          , xml parsing: ivy.xml.original:29:58: cvc-complex-type.3.2.2: Attribute 'platform' is not allowed to appear in element 'artifact'. in file:/Project/ivy/test/repositories/extra-attributes/cache/apache/mymodule/task2/1749/ivy.xml.original
          ]
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:342)
          at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:103)
          at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:638)
          at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:655)
          at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:942)
          at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:542)
          at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:263)
          at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:170)
          at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:274)
          at org.apache.ivy.core.resolve.VisitNodeTest.testLoadData_ExtraAtt_artifact(VisitNodeTest.java:84)



          I don't have a test for it, yet, but I think

          ...
                  ModuleRevisionId[] mridArr = ...
                  DefaultModuleDescriptor md = DefaultModuleDescriptor.newCallerInstance(mridArr, true, true);
                  IvyNode[] deps = engine.getDependencies(md, options, report);
          ...

          Is not transitive in that it only returns the immediate dependencies for the mridArr objects but not the rest of the dependencies.
          Maarten Coene made changes -
          Original Estimate 48h [ 172800 ]
          Remaining Estimate 48h [ 172800 ]
          Maarten Coene made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Maarten Coene [ maartenc ]
          Fix Version/s trunk [ 12313426 ]
          Fix Version/s 2.1.0-RC2 [ 12314062 ]
          Resolution Fixed [ 1 ]
          Maarten Coene made changes -
          Fix Version/s 2.2.0-RC1 [ 12315013 ]
          Fix Version/s trunk [ 12313426 ]

            People

            • Assignee:
              Maarten Coene
              Reporter:
              Michael Scheetz
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development