Hi,
I'am new to Maven and I have a task to do which I don't really know if it
fits "The Maven style" of doing things and therefore I look for some advice.
My requirements are as follows:
* I have a project that contains several subprojects/modules. The project
has its pom that lists modules so that all modules can be built together
(the packaging of the main project is "pom", at least for now).
* Each module has its own dependencies and can possibly be built
independently of other modules. Each module has its own pom which points to
a parent project (submodules have custom packaging but I don't think it's
relevant).
* I want to write a plugin (Java Mojo) that could be run on the main project
and that would have access to all dependencies of all its modules (I need to
generate some resources for the parent project based on the list of all
dependencies of all modules). The goal that I'am going to write should/can
be a standalone goal (not a part of any building phase).

When I run my custom goal on the main project it than gets executed on every
module. I can use this iterating behaviour to collect all of the
dependencies from modules, but somehow it looks like a hack. What I really
want to achieve is to just run my goal once for the main project and being
able to access all the modules and their dependencies from there. So my
question is how can this be achieved in the most simple and elegant way?

Regards,
Tomasz

-- 
View this message in context: 
http://maven.40175.n5.nabble.com/How-to-collect-module-dependencies-in-a-Java-Mojo-in-a-parent-project-tp3381251p3381251.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to