[ 
https://jira.codehaus.org/browse/MNG-4713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=328549#comment-328549
 ] 

Gili commented on MNG-4713:
---------------------------

Brett,

It's been a while but based on memory...

# Anyone who depends on the current value returned by ${basedir} will 
inevitably get a broken build either on Windows or Unix. Breaking a build 
script that is already broken is not a problem in my opinion.
# Try the following:

{code}
<properties>
  <java.library.path>${basedir}/lib</java.library.path>
</properties>
{code}

Now try invoking "java -Djava.library.path=${java.library.path}" from Maven. 
The build will fail under Windows or Unix depending on what slash style you 
used in the property declaration versus what slash style the current platform 
uses. Jochen provided some good examples in MNG-3198 describing how mixing the 
two different slash styles leads to runtime failures.
                
> ${basedir} variable makes portable builds overly difficult
> ----------------------------------------------------------
>
>                 Key: MNG-4713
>                 URL: https://jira.codehaus.org/browse/MNG-4713
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Design, Patterns & Best Practices
>    Affects Versions: 2.2.1
>            Reporter: Gili
>             Fix For: Issues to be reviewed for 3.x
>
>
> Please reopen MNG-3198. I believe that Brett misunderstood what Jochen wrote. 
> There is no simple workaround with the current Maven implementation. Jochen 
> was saying that Maven should use unix-style slashes under Windows for the 
> sake of portability and let users convert to Windows-style slashes themselves 
> if they wish to use an external script.
> Simple use-case: try passing a $\{basedir\}-relative path into the 
> "java.library.path" property. It's impossible to do this portably under 
> Maven's existing implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to