[
https://jira.codehaus.org/browse/MNG-5411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Scholte closed MNG-5411.
-------------------------------
Resolution: Not A Bug
Assignee: Robert Scholte
This is by design, see also http://maven.apache.org/pom.html#Activation
> Missing file activation only works with hard coded vales
> --------------------------------------------------------
>
> Key: MNG-5411
> URL: https://jira.codehaus.org/browse/MNG-5411
> Project: Maven 2 & 3
> Issue Type: Bug
> Components: POM
> Affects Versions: 3.0.4
> Environment: Fedora 17 x86_64, Java 1.7.0_09-icedtea
> Reporter: Bill Riemers
> Assignee: Robert Scholte
> Priority: Minor
>
> {code:xml}
> <activation><file><missing>...</missing></file></activation>
> {code}
> Only works when the file name is hard coded between the missing tags to
> activate a profile. If instead the file name is listed as a property (or
> properties) the profile is always active.
> e.g.
> {code:xml}
> ...
> <properties>
> <exampleFile>example.txt</exampleFile>
> <exampleDirectory>${project.build.directory}/example.txt</sourceDirectory>
> </properties>
> ...
> <profiles>
> <profile>
> <activation>
> <file><missing>${exampleDirectory}/${exampleFile}</missing></file>
> </activation>
> ...
> </profile>
> ...
> </profiles>
> ...
> {code}
> The profile here will be active regardless if the wsdlFile exists. However,
> if instead one hard codes the value like so:
> {code:xml} <file><missing>target/example.txt</missing></file> {code}
> then the profile is only active when example.txt does not exist.
> I'm guessing this is a chicken and egg problem. The properties section is
> probably not evaluated until after deciding what profiles should be active.
> In which case, the code itself is working as designed, it is just either that
> design needs to be documented or updated to work the way one would expect.
--
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