You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2011/04/20 10:40:37 UTC
DO NOT REPLY [Bug 51086] New: package mapper doesn't support the
handledirsep attribute properly
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
Summary: package mapper doesn't support the handledirsep
attribute properly
Product: Ant
Version: 1.8.2
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: notifications@ant.apache.org
ReportedBy: maarten_coene@yahoo.com
The package mapper doesn't work well on windows in combination with
handledirsep=true. The reason is that the package mapper replaces all
File.separatorChar characters with '.', but when the handledirsep property was
set to true, all directory separators are replace by '/' which is different
than the File.separatorChar on Windows.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51086] [PATCH] package mapper doesn't support the
handledirsep attribute properly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
Anthony Wat <ac...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|package mapper doesn't |[PATCH] package mapper
|support the handledirsep |doesn't support the
|attribute properly |handledirsep attribute
| |properly
--- Comment #4 from Anthony Wat <ac...@gmail.com> 2011-04-27 22:29:13 EDT ---
Thanks for the extra example. In the regular glob mapper, both the
casesensitive and handledirsep attributes are only used for matching patterns.
The matched patterns are not changed and copy as-is. But I can understand your
point of view that handledirsep implies also the replacement of all file
separators to '.' I think that it makes sense that both '/' and '\' are
replcaed if handledirsep is set to true for a package mapper. With that said, I
have attached a patch and will let a committer decide if this is the desired
behaviour.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51086] package mapper doesn't support the
handledirsep attribute properly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
Anthony Wat <ac...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version| |All
--- Comment #1 from Anthony Wat <ac...@gmail.com> 2011-04-23 21:39:10 EDT ---
(In reply to comment #0)
> The package mapper doesn't work well on windows in combination with
> handledirsep=true. The reason is that the package mapper replaces all
> File.separatorChar characters with '.', but when the handledirsep property was
> set to true, all directory separators are replace by '/' which is different
> than the File.separatorChar on Windows.
Do you have an actual test case for this problem?
As I understand, handledirsep is only relevant for the purpose of matching the
from pattern - it does not change the slashes in the part that matches the *.
For example:
from = org/apache/tools/ant/*Test.java
to = TEST-*Test.xml
handledirsep = true
The path name org\apache\tools\ant\util\PackageMapperTest.java will still be
converted to util.PackageMapperTest.xml. So as long as the original path has
all '\' and not a mix of '\' and '/', the package mapper will still be able to
map the dir seps to '.', which seems to be the expected result.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51086] [PATCH] package mapper doesn't support the
handledirsep attribute properly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
Anthony Wat <ac...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |acwwat@gmail.com
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51086] [PATCH] package mapper doesn't support the
handledirsep attribute properly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.8.3
--- Comment #5 from Stefan Bodewig <bo...@apache.org> 2011-11-17 13:28:08 UTC ---
fixed with svn revision 1203181
Thanks!
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51086] [PATCH] package mapper doesn't support the
handledirsep attribute properly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
Anthony Wat <ac...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #26940|Patch to handle replacement |Patch to handle replacement
description|of both '/' and '\' when |of both '/' and '\' when
|handledirsep=true |handledirsep=true in
| |package mapper
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51086] package mapper doesn't support the
handledirsep attribute properly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
--- Comment #2 from Maarten Coene <ma...@yahoo.com> 2011-04-25 02:04:24 EDT ---
Here is a simple example that doesn't work on windows:
<pathconvert>
<string>foo/bar</string>
<packagemapper from="*" to="*" handledirsep="true"/>
</pathconvert>
The expected outcome should be 'foo.bar', but on windows this is 'foo/bar'
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51086] package mapper doesn't support the
handledirsep attribute properly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
--- Comment #3 from Anthony Wat <ac...@gmail.com> 2011-04-27 22:25:33 EDT ---
Created an attachment (id=26940)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=26940)
Patch to handle replacement of both '/' and '\' when handledirsep=true
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51086] [PATCH] package mapper doesn't support the
handledirsep attribute properly
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51086
Anthony Wat <ac...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #26940|0 |1
is patch| |
Attachment #26940|application/x-zip-compresse |text/plain
mime type|d |
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.