Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Problem
-
3.0.5, 3.1.0
-
None
-
None
-
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"
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"
Description
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. I have found out about it here http://stackoverflow.com/q/18868772/679982