From issues-return-86099-apmail-maven-issues-archive=maven.apache.org@maven.apache.org Sat Jul 13 05:24:33 2013 Return-Path: X-Original-To: apmail-maven-issues-archive@minotaur.apache.org Delivered-To: apmail-maven-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7DCC110A72 for ; Sat, 13 Jul 2013 05:24:33 +0000 (UTC) Received: (qmail 30997 invoked by uid 500); 13 Jul 2013 05:24:31 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 30715 invoked by uid 500); 13 Jul 2013 05:24:31 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 30699 invoked by uid 99); 13 Jul 2013 05:24:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jul 2013 05:24:29 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [199.193.192.100] (HELO codehaus01.managed.contegix.com) (199.193.192.100) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jul 2013 05:24:25 +0000 Received: from codehaus01 (localhost.localdomain [127.0.0.1]) by codehaus01.managed.contegix.com (Postfix) with ESMTP id 85AADB1059 for ; Sat, 13 Jul 2013 00:24:05 -0500 (CDT) Date: Sat, 13 Jul 2013 00:24:05 -0500 (CDT) From: "Gili (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] (MNG-4713) ${basedir} variable makes portable builds overly difficult MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 22cf62d5d84cf5bea94eb3b65e0ebd09 X-Virus-Checked: Checked by ClamAV on apache.org [ 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} ${basedir}/lib {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