maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <>
Subject [jira] (MSHARED-121) FilteringUtils.escapeWindowsPath doesn't handle paths that leave out the drive letter.
Date Fri, 14 Feb 2014 19:43:57 GMT


Robert Scholte commented on MSHARED-121:

Auto windows escaping really depends on the final reader of that file. I've seen reader where
Windows files must be escaped, but also where they should not. 

# You are reading the ".properties" entry.
! The exclamation mark can also mark text as comments.
# The key and element characters #, !, =, and : are written with
# a preceding backslash to ensure that they are properly loaded.
website = http\://
language = English
# The backslash below tells the application to continue reading
# the value onto the next line.
message = Welcome to \
# Add spaces to the key
key\ with\ spaces = This is the value that could be looked up with the key "key with spaces".
# Unicode
tab : \u0009

Here is just an example of other values where certain characters should be escaped. Not the
input value, but the output file controls the way of escaping.
When talking about XML it even gets more complicated, since escaping isn't done with a prefix
but with a replacement.

So I think we need to introduce an improved {{DelimiterSpecification}}, something for a 2.0
version of this component.

> FilteringUtils.escapeWindowsPath doesn't handle paths that leave out the drive letter.
> --------------------------------------------------------------------------------------
>                 Key: MSHARED-121
>                 URL:
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-filtering
>    Affects Versions: maven-filtering-1.0-beta-3
>            Reporter: John Casey
>         Attachments: 0001-MSHARED-121-Don-t-require-a-drive-letter-to-escape-a.patch,
> FilteringUtils.escapeWindowsPath requires a drive letter to be present in the path, or
at least the string {noformat}":\\"{noformat} to be present in order to trigger escaping the
value as a windows path.
> In cases where the path is an absolute reference to a file on the current drive (no drive
letter is included), or when the path starts with an unresolved expression (in cases where
n+1 level interpolation will eventually resolve the expression), escaping doesn't happen at

This message was sent by Atlassian JIRA

View raw message