[ http://jira.codehaus.org/browse/MNG-4464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=201382#action_201382 ]
Anders Kr. Andersen commented on MNG-4464: ------------------------------------------ In my eyes writing <relativePath>..\pom.xml</relativePath> means <<dot>> <<dot>> <<escapeP>> <<letter o>> <<letter m>> etc. And it makes no sense. a correct way must be to write <relativePath>../pom.xml</relativePath> I have written <relativePath>../pom.xml</relativePath> several places, and it seems to work. So yes backslash is an error. And should procduce a warning. The question is just how do we know that escape is used wrong? A sentence like <relativePath>\<SYSTEM\$HOME\>pom.xml</relativePath> could make sense on Open VMS. My conclusion is that this is just something that developers should know. A simulary situation is to write <relativePath>${myParameter}/pom.xml</relativePath> and not having set a value to property myParameter. In this case maven tells that it cannot find file ${myParameter}/pom.xml. Maybe maven's pom checkker tool could be told to check for these things? > Improve handling of relative paths with backslashes > --------------------------------------------------- > > Key: MNG-4464 > URL: http://jira.codehaus.org/browse/MNG-4464 > Project: Maven 2 > Issue Type: Improvement > Components: POM > Affects Versions: 2.2.1, 3.0-alpha-4 > Environment: Unix, Mac > Reporter: Benjamin Bentmann > Priority: Minor > > Consider this snippet: > {code:xml} > <parent> > <relativePath>..\pom.xml</relativePath> > </parent> > {code} > Note in particular the backslash used in the path. While this path will be > properly resolved on a Windows box, it will fail to resolve the local parent > on a Unix/Mac box (as the backslash is not a separator but escape character > here). This applies to other paths in the POM as well. > For platform-independent behavior, we should either encourage the user to use > forward slashes (by means of validation warnings/errors) or have Maven > convert the paths internally. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira