> -----Original Message-----
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: vendredi 13 janvier 2006 00:00
> To: Maven Developers List
> Subject: Re: [m2] Modifying project.build.sourceDirectory and executions
> 
> 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() );

Yes the Clover plugin does fork a lifecycle when the test phase is reached.
However the new source directory is for the forked lifecycle. I don't want
nor need it to be modified in the original lifecycle (the executedProject
one).

The AntRun plugin is executed after the clover:instrument (which modifies
the source directory):

C:\dev\maven\trunks\plugins\maven-clover-plugin\src\it\maven-clover-plugin-s
ample-class-post-processing>mvn clean site
[...]
[INFO] Preparing clover:clover
[INFO] [clover:instrument]
Clover Version 1.3.11, built on November 02 2005
[...]
Instrumented 1 source files.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
Compiling 1 source file to
C:\dev\maven\trunks\plugins\maven-clover-plugin\src\it\maven-clover-plugin-s
ample-class-post-processing
\target\clover\classes
[INFO] [antrun:run {execution: default}]
[INFO] Executing tasks
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: Source directory value was [src/main/java] instead of
[target/clover/src]

Could this be related to MNG-1927? I've seen Jason has committed something
in the AntRun plugin (see attached file).
 
> If you wanted the blow to work, you'd need to include it in the
> lifecycle.xml inside the plugin.

I don't understand this. In clover:instrument I also modify other pom stuff
like the output directory and the classes output directory, etc and
subsequent executing plugin do use the newly modified value. I'd like to do
the same for the source directory.

Thanks
-Vincent

> 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]
--- Begin Message ---
Author: jvanzyl
Date: Tue Jan 10 10:48:20 2006
New Revision: 367726

URL: http://svn.apache.org/viewcvs?rev=367726&view=rev
Log:
o just adding an echo for ${project.build.directory} in part of trying to fix 
mng-1927, which
  appears to fixed in all places except inside the antrun configuration.


Modified:
    maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml

Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml?rev=367726&r1=367725&r2=367726&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml Tue Jan 10 
10:48:20 2006
@@ -30,7 +30,7 @@
 
                 <echo message="basedir:${basedir}" />
                 <echo 
message="sourceDirectory:${project.build.sourceDirectory}" />
-
+                <echo 
message="pom.build.directory=${project.build.directory}"/>
                 <taskdef name="test" classname="TestTask">
                   <classpath refid="maven.compile.classpath"/>
                 </taskdef>



--- End Message ---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to