Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-78

FilteringUtils escapeWindowsPath() doesn't work on Windows

    Details

    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      The method escapeWindowsPath() is replacing colon by backslash + colon.
      I.e.
      D:\temp
      is escaped as
      D\:
      temp

      But windows doesn't recognize that. If you try to open D\:
      temp on explorer, will not work.
      Even java.io.File is not able to handle that too. The attached test proves it.

      I'm not sure why this backslash was add to colon, but commenting line 44 of org.apache.maven.shared.filtering.FilteringUtils make the test work.

      1. filtering.patch
        0.9 kB
        Marvin Froeder
      2. FilteringUtilsTest.java
        0.8 kB
        Marvin Froeder

        Issue Links

          Activity

          Hide
          Jason van Zyl added a comment -

          The attached patch we've been using in Nexus for 3 months. Does anyone have a problem applying this?

          Show
          Jason van Zyl added a comment - The attached patch we've been using in Nexus for 3 months. Does anyone have a problem applying this?
          Hide
          Olivier Lamy added a comment -

          fixed in rev 749459

          Show
          Olivier Lamy added a comment - fixed in rev 749459
          Hide
          Anton Makeev added a comment -

          I reckon not only the windows paths should be escaped, but all the properties filtered.

          For example, if I have a property defined as <myValue>xxx\yyy:zzz<myValue> it will be read from the *.properties file incorrectly as well.

          Thanks,
          Anton Makeev

          Show
          Anton Makeev added a comment - I reckon not only the windows paths should be escaped, but all the properties filtered. For example, if I have a property defined as <myValue>xxx\yyy:zzz<myValue> it will be read from the *.properties file incorrectly as well. Thanks, Anton Makeev
          Hide
          Jayesh Lalwani added a comment -

          Where can I get maven-filtering-1.0-beta-4? Is there a SVN that I can checkout the code from?

          Show
          Jayesh Lalwani added a comment - Where can I get maven-filtering-1.0-beta-4? Is there a SVN that I can checkout the code from?
          Show
          Benjamin Bentmann added a comment - http://svn.apache.org/repos/asf/maven/shared/trunk/maven-filtering/

            People

            • Assignee:
              Olivier Lamy
              Reporter:
              Marvin Froeder
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: