Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-929

Extra Attributes specified in the Dependency's Module Descriptor are not available to resolvers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.0-RC1
    • 2.0-RC2
    • Core
    • None
    • Windows
      Java 6

    Description

      This is a follow up to IVY-773

      Consider the following IVY file:

      <ivy-module version="1.0">
          <info organisation="apache" module="extra-att" revision="1.0"/>
          <dependencies>
      		<dependency name="mymodule" rev="1748" />
          </dependencies>
      </ivy-module>
      

      and the corresponding dependency's IVY file:

      <ivy-module version="1.0">
          <info 
              organisation="apache"
              module="mymodule"
              myextraattrib="abc123"
              revision="1748"
              status="integration"/>
      	<publications>
      		<artifact name="mymodule" platform="windows" type="jar"/>
      		<artifact name="mymodule" platform="linux" type="jar"/>
      	</publications>
      </ivy-module>
      

      When a resolver resolves to determine the revision of dependency, it seems that the extra attribute myextraattrib is not available.

      I've narrowed it down to the method in BasicResolver:

          public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) {}
      

      where at this point:

        rmr = parse(ivyRef, systemDd, data);
      

      rmr contains the extra attributes... but at this point:

                              if (systemMd instanceof DefaultModuleDescriptor) {
                                  DefaultModuleDescriptor defaultMd = (DefaultModuleDescriptor) systemMd;
                                  ModuleRevisionId revision = getRevision(ivyRef, systemMrid, systemMd);
                                  defaultMd.setModuleRevisionId(revision);
                                  defaultMd.setResolvedModuleRevisionId(revision);
      
                                  ModuleRevisionId revision = getRevision(ivyRef, systemMrid, systemMd);
      

      revision is missing the extra attributes.

      I am not familiar enough with the meanings of each of the objects to be able to fix this.

      Thanks

      Scott

      Attachments

        Activity

          People

            maartenc Maarten Coene
            scoheb Scott Hebert
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: