This is because the part of clover that runs is forked, and the project is cloned then reset when it returns. This is by design, so forked lifecycles don't polllute the original. The final clover goal that cause the fork has access to ${executedProject}, and can pump settings back into the main project if desired at that point:
project.getBuild().setSourceDirectory( executedProject.getBuild().getSourceDirectory() ); If you wanted the blow to work, you'd need to include it in the lifecycle.xml inside the plugin. - Brett Vincent Massol wrote: > Hi, > > In the Clover plugin I modify the project.build.sourceDirectory value (in > the generate-sources phase). This is because I want any subsequent plugin to > use the directory where clover has generated the clovered source files. > > For example, I would expect the following to print the new sourceDirectory > value: > > <plugin> > <artifactId>maven-antrun-plugin</artifactId> > <executions> > <execution> > <phase>process-classes</phase> > <configuration> > <tasks> > <echo message="${project.build.sourceDirectory}"/> > </tasks> > </configuration> > <goals> > <goal>run</goal> > </goals> > </execution> > </executions> > </plugin> > > But it prints the original value (src/main/java). > > Does the problem occur because of the <execution>? Doesn't executions > inherit their default configurations from the executing lifecycle? > > Or it the problem elsewhere? > > Thanks > -Vincent > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]