On 10/12/2011, at 9:44 AM, Benson Margulies wrote:

> On the substance of the original problem:
> 
> user runs 'mvn site:site'
> 
> site:site finds javadoc and checkstyle, trigger a forked lifecycle to
> generate sources.
> 
> In this particular case, 'generate-sources' in module 'b' depends on
> running out through 'process-classes' in module 'a'.  b has a
> compile-scope dependency on agroup:aartifact:aversion:wsdl.

The Javadoc plugin specifies this:

 @execute phase="generate-sources"

So there isn't a way to convince it to do something else in the forked 
lifecycle.

> 
> Is the lifecycle calculator supposed to figure this out? It has no way
> to tell which execution in 'a' produces
> agroup:aartifact:aversion:wsdl, so it has no way to tell that
> 'process-classes' is going to be required.

This is the more fundamental question that would need to be addressed - there's 
no way to express that in Maven right now.

> 
> However, adding 'process-classes' to the top-level command line
> doesn't help, apparently because it doesn't travel from the initial
> execution plan to the forked execution plan.
> 
> Once you have the fix I made today, you can get around this by running
> 'mvn install' to stuff the wsdl artifact into the local repo before
> running site:site.
> 
> But if the intent is to avoid this requirement, how is it supposed to work?

Perhaps an alternative would be to additionally bind that generation to the 
pre-site phase in 'a' as well. Not sure if that'll make it available, but worth 
a try. That would require running "mvn site" instead of "mvn site:site" (which 
is standard anyway).

Otherwise, I think you're faced with documenting "mvn install" without doing 
major lifecycle surgery.

- Brett

--
Brett Porter
br...@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to