You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Dennis Lundberg <de...@apache.org> on 2008/10/02 00:55:38 UTC

Re: Profile activation by missing file doesn't works

Felix Knecht wrote:
> Hi all
> 
> The foofoo profile is always activated, no matter if a file 'timestamp' exists in the same directory like the pom.xml or
> not. It looks to me as the ${basedir} is not correctly resolved. Is this a known problem?

http://jira.codehaus.org/browse/MNG-3524

> 
> Thanks
> Felix
> 
> felix@pcfelix ~/tmp $ cat pom.xml
> <project
>   xmlns="http://maven.apache.org/POM/4.0.0"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>
> 
>   <groupId>bar</groupId>
>   <artifactId>foo</artifactId>
>   <version>1.0.0</version>
>   <name>foobar</name>
>   <packaging>jar</packaging>
> 
>   <profiles>
>     <profile>
>       <id>foofoo</id>
>       <activation>
>         <file>
>           <missing>${basedir}/timestamp</missing>
>         </file>
>       </activation>
>     </profile>
>   </profiles>
> </project>
> 
> felix@pcfelix ~/tmp $ touch timestamp
> felix@pcfelix ~/tmp $ mvn help:active-profiles
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'help'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building foobar
> [INFO]    task-segment: [help:active-profiles] (aggregator-style)
> [INFO] ------------------------------------------------------------------------
> [INFO] [help:active-profiles]
> [INFO]
> Active Profiles for Project 'bar:foo:jar:1.0.0':
> 
> The following profiles are active:
> 
>  - foofoo (source: pom)
> 
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Fri Sep 26 15:22:51 CEST 2008
> [INFO] Final Memory: 19M/64M
> [INFO] ------------------------------------------------------------------------
> felix@pcfelix ~/tmp $ rm timestamp
> felix@pcfelix ~/tmp $ mvn help:active-profiles
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'help'.
> [INFO] ------------------------------------------------------------------------
> [INFO] Building foobar
> [INFO]    task-segment: [help:active-profiles] (aggregator-style)
> [INFO] ------------------------------------------------------------------------
> [INFO] [help:active-profiles]
> [INFO]
> Active Profiles for Project 'bar:foo:jar:1.0.0':
> 
> The following profiles are active:
> 
>  - foofoo (source: pom)
> 
> 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1 second
> [INFO] Finished at: Fri Sep 26 15:22:58 CEST 2008
> [INFO] Final Memory: 19M/64M
> [INFO] ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org