Bug: profile activation not detected in a parent pom.xml

2010-09-17 Thread Xavier D.
I have discovered a bug in mvn 2.2.1 in relation to inheritance of profiles.

It affects profile inheritance within MavenProject and the
maven-help-plugin.

1. The help mojo issue: This appears to be a bug that has been re-introduced
into mvn 2.2.1:   http://jira.codehaus.org/browse/MPH-16
There is a test file attached to the jira, helptest.zip.   The original
recursive tree walk appears to have been removed for some reason, or made to
depend on mavenProject.getActiveProfiles(). Testing was performed using
command line:  mvn help:active-profiles

2. This relates to profile information containing repository and build
plugins in a parent pom (anywhere in the hierarchy tree).
A mvn deploy failed as no distribution repository details were loaded.

Reference docs on profiles: http://maven.apache.org/settings.html#Profilesand
http://docs.codehaus.org/display/MAVEN/Build+Profiles

Would anyone know of a fix or workaround for (2) please?   Moving the
profile and its build plugins to settings.xml or profiles.xml does not help
as the schema does not support the  element beneath .  The
profile's  plugins are a system wide feature for me.
Effectively, in my production profile a series of plugins run to integrate
details to a wider system, which are not to be executed in my staging and
development profiles.


mvn 2.2.1: How to modify modules to build inside a custom plugin (apis to use)

2010-09-16 Thread Xavier D.
Apologies if this is not the correct mailing list - I thought the developers
would be better suited to answering API questions.

I am implementing a mojo plugin that has a selection of modules to build
that were specified in a pom.xml.

How do I invoke a reactor to execute my List of modules filtered from the
original mavenProject.getModules() list ?

So far I have:
MavenExecutionRequest request = mavenSession.getRequest();
EventDispatcher dispatcher = session.getEventDispatcher()
String event = MavenEvents.REACTOR_EXECUTION;
dispatcher.dispatchStart( event, request.getBaseDirectory() );
// lifeCycleExecutor to execute?  // logging?

Or should I invoke the system command line version to execute "mvn deploy"
and assume logging will be chained correctly to the plugin's session?

Thanks in advance.


Re: WELCOME to dev@maven.apache.org

2010-09-14 Thread Xavier D.
Apologies if this is not the correct mailing list - thought the developers
would be better suited to answering API questions.

I am implementing a mojo plugin that has a selection of modules to build
that were specified in a pom.xml.

How do I invoke a reactor to execute my List of modules filtered from the
original mavenProject.getModules() list ?

So far I have:
MavenExecutionRequest request = mavenSession.getRequest();
EventDispatcher dispatcher = session.getEventDispatcher()
String event = MavenEvents.REACTOR_EXECUTION;
dispatcher.dispatchStart( event, request.getBaseDirectory() );
// lifeCycleExecutor to execute?  // logging?

Or should I invoke the system command line version to execute "mvn deploy"
and assume logging will be chained correctly to the plugin's session?