|
|
|
Wildcarded <modules> would certainly help. As commented in issue MNG-1915 I am working on making a maven2 plug-in for JPF. This is the reason I would like to specify a number of directories and have all subdirectories containing jpf plug-ins included in the reactor.
I would like to have more fine grained control of which of this subdirectories should be included. One example would be to only include directories containing pom.xml, plugin.xml and plugin-fragment.xml files. This is however not essential, so wildcarded <modules> would probably do the trick. 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 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. 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, I am actually speaking about two different kinds of plug-ins one is the maven plug-in, the other kind of plug-in is the Java Plug-in Framework (JPF) plug-in. Your are right in writing that JPF plug-ins is the same as a maven module. A bit confusing use of terms there.
What I wanted to do was to have one master module and several sub-modules. First the sub-modules would be built, the maven life-cycle would run until the package phase. In the integration-test phase all the sub-modules should be moved into the target directory of the master module. The essence is that a JPF program need a number of sub-modules to be able to run. It need a bootstrap module and a set of core JPF plug-ins. Is there a way to make the master module run the build process for every sub-module until the package phase and then take over the control? |
||||||||||||||||||||||||||||||||||||||||||||
This is correct. We should be discussing the problem, not the solution. I don't think programmatic addition of modules is the right answer.
"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."
So what you'd like to have is wildcarded <modules> ?