[ 
http://jira.codehaus.org/browse/MNG-1916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_100390
 ] 

Kenney Westerhof commented on MNG-1916:
---------------------------------------

Are you talking about just adding modules (maven 2 projects) to the reactor, or 
are you talking about maven2 plugins?
For now I'll assume that 'plug-ins included in the reactor' means 'modules 
included in the reactor'.

So, what's the problem with adding module sections for your modules manually?

Can't profile's be used, activating on the existence of a file, and adding a 
module there? You'd have to specify 1 profile per module though.

solution 3: write a replacement component for the core and put it in 
$M2_HOME/extensions, that'll do a workspace scan for your files and add the 
modules
to the proper pom, or just add them to the reactor.

solution 4: write a plugin, and create a pom that uses that plugin. The plugin 
will fork a new maven build with whatever set of projects you like.
Take a look at the maven-it-plugin in the sandbox, it basically does the same 
thing: it runs src/it/*/pom.xml.

I think having <modules>*/</modules> will cause too much problems. Right now, 
m2 will quit if you specify a module dir that doesn't have a pom.xml,
so that behaviour must change. Further, i think you only want to add 
directories as modules that contain a certain file. That would require an 
extensive
change to the pom. Even extensions won't work here, since you cannot alter the 
reactor once it's running.

> Making it possible for plug-in to add modules to the reactor programatically
> ----------------------------------------------------------------------------
>
>                 Key: MNG-1916
>                 URL: http://jira.codehaus.org/browse/MNG-1916
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Plugin API, Reactor and workspace
>            Reporter: Nils Fredrik Gjerull
>             Fix For: 2.1.x
>
>
> I would like to be able to specify a number of directories as plug-in 
> directories, automatically discover every plug-in in those directories and 
> include them in the reactor. As I understands it the reactor with it's 
> modules ({{org.apache.maven.execution.ReactorManager}}) is created in 
> {{org.apache.maven.DefaultMaven}}. If I understands this correctly maven 
> plug-ins can't add projects to the reactor programatically.
> My proposition to solve this is to add a phase which will be executed after 
> the pom.xml is parsed, but before the information stored in 
> Model/MavenProject is used, and most importantly before the {{ReactorManager 
> is created}}. Then you can add information to the MavenProject 
> programatically, increasing the flexibility for plug-ins.
> I am not fluent in the maven2 code base, but it seems to me that this require 
> quite a lot of changes to the code. As I understands it the life cycle starts 
> after the {{ReactorManager}} is made, and therefore after the information in 
> Model have started to be used.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to