Description
Since Maven 2.0.9 – If a plugin uses a forked lifecycle, then the project properties are resolved by maven before the lifecycle is forked.
This means that the forked lifecycle has the non-forked lifecycle's values.
This was not the case in maven prior to version 2.0.9, where properties were resolved at a much later time.
For example - the attached sample project uses the Clover plugin with the xdoclet plugin. When
mvn clean install
is run under Maven-2.0.8 you can see the following output:
[INFO] [xdoclet:xdoclet {execution: default}]
[INFO] Initializing DocletTasks!!!
[INFO] Executing tasks
[echo] Build Dir: ${project.build.directory}/test.clover
[INFO] Executed tasks
whilst Maven 2.0.9 outputs:
[INFO] [xdoclet:xdoclet {execution: default}]
[INFO] Initializing DocletTasks!!!
[INFO] Executing tasks
[mkdir] Created dir: /Users/niick/work/mvnclvr/src/it/mng/xdoclet/target
[touch] Creating /Users/niick/work/mvnclvr/src/it/mng/xdoclet/target/test.clover
[echo] Build Dir: /Users/niick/work/mvnclvr/src/it/mng/xdoclet/target/test.clover
[INFO] Executed tasks
[INFO] [resources:resources]
The fact the ${project.build.directory} property has been expanded already under 2.0.9, means that the forked lifecycle has the same value for that property.
This new behavior will break any plugin which uses a forked lifecycle.