You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Ivan ?ipka (JIRA)" <ji...@codehaus.org> on 2013/09/19 22:16:52 UTC
[jira] (MNG-5516) ${project.basedir} in profile activation exists
clause strange behavior
Ivan ?ipka created MNG-5516:
-------------------------------
Summary: ${project.basedir} in profile activation exists clause strange behavior
Key: MNG-5516
URL: https://jira.codehaus.org/browse/MNG-5516
Project: Maven 2 & 3
Issue Type: Bug
Components: Profiles
Affects Versions: 3.1.0, 3.0.5
Environment: uname -a
Linux localhost 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
mvn -version
Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 04:15:32+0200)
Maven home: /usr/local/apache-maven/apache-maven-3.1.0
Java version: 1.6.0_37, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/jdk1.6.0_37/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-23-generic", arch: "amd64", family: "unix"
Reporter: Ivan ?ipka
Priority: Minor
Attachments: project.tar.gz
directory structure:
pom.xml
dir
relevant pom part:
<profiles>
<profile>
<id>P1</id>
<activation>
<file>
<exists>${project.basedir}/dir/</exists>
</file>
</activation>
</profile>
<profile>
<id>P2</id>
<activation>
<file>
<exists>${basedir}/dir/</exists>
</file>
</activation>
</profile>
</profiles>
mvn help:profiles-all
Profile Id: P2 (Active: true , Source: pom)
Profile Id: P1 (Active: false , Source: pom)
Since dir exists this leads to conclusion that ${project.basedir} in P1 does not resolve properly.
mvn help:effective-pom relevant part:
<profiles>
<profile>
<id>P1</id>
<activation>
<file>
<exists>/home/isipka/NetBeansProjects/test-maven/simple/dir/</exists>
</file>
</activation>
</profile>
<profile>
<id>P2</id>
<activation>
<file>
<exists>/home/isipka/NetBeansProjects/test-maven/simple/dir/</exists>
</file>
</activation>
</profile>
</profiles>
both ${project.basedir} in P1 and ${basedir} in P2 have resolved properly.
AFAIK this is a bug. If not, or you need additional info please contact me. I have tested this on 3.0.5 the behavior is the same.
--
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