Ivy
  1. Ivy
  2. IVY-1359

ivy.xml extends feature complains about Windows filesystem path

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0-RC1
    • Fix Version/s: 2.3.0-RC2, 2.4.0-RC1
    • Component/s: Core
    • Labels:
      None
    • Environment:

      Windows, Ant 1.7.1 (but should be the same on Ant 1.8.3)

      Description

      I'm trying to use the parent Ivy module feature through the /ivy-module/info/extends element:
      <info organisation="foo" module="bar" revision="1.0-SNAPSHOT">
      <extends organisation="foo" module="master-parent" revision="1.0-SNAPSHOT"
      location="$

      {env.MASTER_PARENT_PROJECT_DIR}

      /ivy.xml" extendType="configurations" />
      </info>

      The property placeholder in the location attribute translates to an absolute filesystem path. This works in a functional sense. However, I'm seeing the following false-positive warning message, apparently because I'm using a Windows filesystem path:
      [ivy:resolve] :: problems summary ::
      [ivy:resolve] :::: WARNINGS
      [ivy:resolve] Unable to parse included ivy file C:\...\master-parent/ivy.xml: unknown protocol: c
      [ivy:resolve]
      [ivy:resolve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

      Here's the passage in XmlModuleDescriptorParser where this is arising:
      //check on filesystem based on location attribute (for dev ONLY)
      try

      { checkParentModuleOnFilesystem(location); }

      catch (IOException e)

      { Message.warn("Unable to parse included ivy file " + location + ": " + e.getMessage()); }

      I hope people can agree that showing users a misleading warning message every time they do an ivy:resolve is a bug worth resolving before there's a final 2.3.0 release.

      1. ivy-trunk.patch
        10 kB
        Mitch Gitman
      2. ivy-2.3.x.patch
        10 kB
        Mitch Gitman

        Activity

        Hide
        Nicolas Lalevée added a comment -

        I have integrated your patch, modified regarding Jean-Louis comments.
        Before letting this into the 2.3.x branch, it would be nice if you can confirm it solves your issues. I didn't took the time to test it under Windows.

        Show
        Nicolas Lalevée added a comment - I have integrated your patch, modified regarding Jean-Louis comments. Before letting this into the 2.3.x branch, it would be nice if you can confirm it solves your issues. I didn't took the time to test it under Windows.
        Hide
        Mitch Gitman added a comment -

        I'm attaching two patch files, one for the 2.3.x branch, one for trunk. These patches contain the fixes for three bugs: IVY-1359, IVY-1363, IVY-1364. The fixes involve a single file: XmlModuleDescriptorParser.

        Show
        Mitch Gitman added a comment - I'm attaching two patch files, one for the 2.3.x branch, one for trunk. These patches contain the fixes for three bugs: IVY-1359 , IVY-1363 , IVY-1364 . The fixes involve a single file: XmlModuleDescriptorParser.
        Hide
        Mitch Gitman added a comment -

        I've submitted a patch for another bug I'd reported, issue IVY-1364: "buildlist task chokes on absolute path to parent Ivy module."
        https://issues.apache.org/jira/browse/IVY-1364

        I've verified that that fix also fixes this bug. Both these bugs have their root in XmlModuleDescriptorParser.checkParentModuleOnFilesystem not up to now accounting for an absolute path.

        Show
        Mitch Gitman added a comment - I've submitted a patch for another bug I'd reported, issue IVY-1364 : "buildlist task chokes on absolute path to parent Ivy module." https://issues.apache.org/jira/browse/IVY-1364 I've verified that that fix also fixes this bug. Both these bugs have their root in XmlModuleDescriptorParser.checkParentModuleOnFilesystem not up to now accounting for an absolute path.

          People

          • Assignee:
            Nicolas Lalevée
            Reporter:
            Mitch Gitman
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development