I've got a setup running now that checks for changes in build paths and
properties after a mojo runs, and transitions back to dynamic mode iff
there are changes...otherwise, it leaves it in concrete mode for the
next mojo execution. This works fairly well: Running the following command:
mvn -Prelease,reporting clean install site
produces results that are ~3Mb and ~25s apart from the 2.0.9 execution
of the same build. Considering the total for 2.0.9 is north of 13m, 25
seconds is a pretty close margin. I've tried to run this against CXF
trunk, and while I got encouraging results I'm not sure I'm running the
right build. Dan said the build should run in about 32s using 2.0.9, but
on my machine this is well north of 1m.
The way things are laid out now, we could easily introduce a new method
in the project instance that would mark that project as being "dirty"
and in need of transition back to dynamic mode prior to the next mojo
execution. I think this is really a nice way to approach things (short
of a comprehensive new API to allow plugins to interface with the core
cleanly, of course), partly since it allows a mojo to make a decision
about whether to set that dirty flag (such as detecting whether it has
anything to do in the current build) instead of doing so blindly.
-john
Brian E. Fox wrote:
As for detecting
project-state changes in the plugin itself (or the POM, as Brian asked
about) we'd have to scan the entire logic of the mojo (and classes it
used) to see whether any of it modified the project/model graph...which
is obviously waaaay too heavy to do at runtime.
Actually what I meant is a hackish scanning of a parameter in the mojo
config in the pom, something like:
<configuration>
<affectsBuild>true</affectsBuild>
</configuration>
Basically a field unused by the plugins that we could see in the pom.
Obviously not the greatest but it could work.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
John Casey
Developer, PMC Member - Apache Maven (http://maven.apache.org)
Blog: http://www.ejlife.net/blogs/buildchimp/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]