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

XmlModuleDescriptorParser seems to lack some trim() calls

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0
    • Fix Version/s: None
    • Component/s: Core
    • Labels:

      Description

      The XmlModuleDescriptorParser or whatever seems to miss some trim() calls. The "conf" attribute of the "dependency" tag is heavily spaces-dependent. I will attach a build.xml and an ivy.xml that can be used to test the issue. Here the different cases I tested:

      expected result if confmappingoverride="true":

      • sources mapped to sources
      • compile mapped to master
      • runtime mapped to default

      lib/:
      compile ivy runtime sources

      lib/compile:
      slf4j-log4j12.jar

      lib/ivy:
      ivy-2.2.0.jar

      lib/runtime:
      log4j.jar slf4j-api.jar slf4j-log4j12.jar

      lib/sources:
      slf4j-log4j12-sources.jar

      actual result:

      conf="compile;sources" -> like expected
      conf=" compile;sources" -> like expected
      conf="compile ;sources" -> like expected
      conf="compile; sources" -> sources mapped to default
      conf="sources; compile" -> like expected
      conf="compile ; sources" -> sources mapped to default
      conf="compile,sources" -> runtime mapped to master
      conf="compile ,sources" -> like expected
      conf="compile , sources" -> sources mapped to default
      conf="compile, sources" -> sources mapped to default; runtime mapped to master

      expected result if confmappingoverride="false":

      • sources mapped to sources
      • compile mapped to master
      • runtime mapped to master

      lib/:
      compile ivy runtime sources

      lib/compile:
      slf4j-log4j12.jar

      lib/ivy:
      ivy-2.2.0.jar

      lib/runtime:
      slf4j-log4j12.jar

      lib/sources:
      slf4j-log4j12-sources.jar

      actual result:

      conf="compile;sources" -> like expected
      conf=" compile;sources" -> runtime mapped to default
      conf="compile ;sources" -> runtime mapped to default
      conf="compile; sources" -> sources mapped to default
      conf="sources; compile" -> runtime mapped to default
      conf="compile ; sources" -> sources mapped to default; runtime mapped to default
      conf="compile,sources" -> like expected
      conf="compile ,sources" -> runtime mapped to default
      conf="compile , sources" -> sources mapped to default; runtime mapped to default
      conf="compile, sources" -> sources mapped to default

        Attachments

        1. test.tbz2
          1 kB
          Björn Kautler

          Issue Links

            Activity

              People

              • Assignee:
                twogee Gintas Grigelionis
                Reporter:
                vampire Björn Kautler
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: