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

Unnecessary warning when parent ivy.xml is located using resolvers rather than a location attribute on the extends element

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0, 2.3.0-RC1
    • 2.3.0-RC2
    • Core

    Description

      When using an <extends> element without a location attribute an unnecessary warning is output stating that ../ivy.xml could not be parsed (unless there is in fact a file ../ivy.xml relative to the ivy.xml that contains the <extends>).

      For example:

      ...
          <info organisation="foo" module="bar" revision="1.0" status="integration">
              <extends organisation="foo" module="parent" revision="1.0.0" />
          </info>
      ...
      
      [ivy:resolve] Unable to parse included ivy file ../ivy.xml: D:\project\component\ivy.xml
      (The system cannot find the file specified) in file:/D:/project/component/ivy.xml
      

      XmlModuleDescriptorParser.extendsStarted() is the source of the warning. If no location was specified on the <extends> it uses a default location of ../ivy.xml. It then attempts to find and use the ../ivy.xml location, and only falls back to resolving the parent descriptor if ../ivy.xml doesn't exist or if its ModuleId is not what is expected.

      The behavior is sensible and I do not suggest that it be changed. However, it would be nice if the warning that ../ivy.xml could not be parsed were suppressed when that file is being used as a default. The warning would still be appropriate if location="../ivy.xml" were explicitly included in the <extends> element.

      Attachments

        1. IVY-1346.zip
          3 kB
          Matt Hurne
        2. IVY-1346.patch
          0.9 kB
          Matt Hurne

        Activity

          People

            maartenc Maarten Coene
            mhurne Matt Hurne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: