[ https://jira.codehaus.org/browse/MNG-5516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MNG-5516. ------------------------------- Resolution: Not A Bug Assignee: Robert Scholte This is by design, see http://maven.apache.org/pom.html#Activation > ${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.0.5, 3.1.0 > 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 > Assignee: Robert Scholte > Priority: Minor > Attachments: project.tar.gz > > > directory structure: > {noformat} > pom.xml > dir > {noformat} > relevant pom part: > {code:xml} > <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> > {code} > {noformat} > mvn help:profiles-all > Profile Id: P2 (Active: true , Source: pom) > Profile Id: P1 (Active: false , Source: pom) > {noformat} > Since dir exists this leads to conclusion that $\{project.basedir} in P1 does > not resolve properly. > {noformat} > mvn help:effective-pom relevant part: > {noformat} > {code:xml} > <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> > {code} > 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 -- 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