You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ApocB <ap...@hotmail.com> on 2009/07/04 20:30:44 UTC

Problem Controlling Mojo Execution in Different Phases

Hello,

I've been trying to reduce the time of my builds, and started investigating
the log to see when mojos are being executed. What I'm finding is that the
mojos are being executed repeatedly, in several phases whether it makes
sense to run in that phase or not... i.e. (just showing [INFO] stmts for
mojo execution):

[clean:clean]
[pmd:pmd]
[pmd:check {execution:default}]
[pmd:cpd]
[pmd:cpd-check {execution:default}]
[checkstyle:checkstyle]
[checkstyle:check {execution:default}]
[buildnumber:create {execution:default}]
[site:attach-descriptor]

[install:install]
[pmd:pmd]
[pmd:check {execution:default}]
[pmd:cpd]
[pmd:cpd-check {execution:default}]
[checkstyle:checkstyle]
[checkstyle:check {execution:default}]
[buildnumber:create {execution:default}]
[site:attach-descriptor]

[site:site]

[site:deploy]

Notice, PMD, PMD-CPD, Checkstyle, and BuildNumber mojos are being executed
in both the clean, and install phases. There's no good reason these mojos
should be executing in the clean phase. This is just a partial excerpt, but
an example of what's going on. It gets worse as surefire:test, and
resources:resources are being executed multiple times in a child module.
I've had some success in explicitly specifying the executions for PMD, and
Checkstyle (managed to get them to run only once in install phase.) But when
I try to have the same control over site:attach-descriptor, it ignores my
execution config and continues to run in multiple phases...

I realize that multiple executions may not be bad in some situations (i.e.
resources:resources realizes the work was already done), but I just hate
redundant processes running, especially in mojo's that can't recognize it's
already been run, such as surefire. I think if this was solved, the build
time for my project could be cut at least in half...

Any help is appreciated!

Thanks!
~t
-- 
View this message in context: http://www.nabble.com/Problem-Controlling-Mojo-Execution-in-Different-Phases-tp24336920p24336920.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org