IIUC you should be able to do that using Project#getReferencedProjects(),
you may have to first call Project#getExecutionProject().
Have a look at
https://github.com/tbroyer/gwt-maven-plugin/blob/master/src/main/java/net/ltgt/gwt/maven/AbstractDevModeMojo.java
and
see if it somehow fits your use-case (here, I get all dependency artifacts
to build a classpath for a forked jvm, and possibly replace some of them
with the corresponding reactor project's source roots)

On Fri, Apr 24, 2020 at 2:47 PM Christian Domsch <[email protected]> wrote:

> Hi,
>
> I would like to be able to get access to the reactor module tree. I have a
> specific plugin that is executed for each reactor module and it needs to
> check, if for a predefined set of modules in the reactor (in our case war
> archives that contain a subset of all modules) see if the current module is
> actually contained in that war (directly or via transitive dependencies).
>
> What I tried so far, but isn't working, is using the aether dependency
> resolution mechanism. The reason why it isn't working is fairly obvious:
> checking the transitive dependencies of these war modules, aether tries to
> download all artifacts first and fails because they haven't been build by
> the reactor, yet, and thus are unknown. This makes a lot of sense, but also
> means this way won't help me.
>
> Now, the reactor itself has to be able to calculate those dependencies, as
> it will calculate a certain order of building the modules, depending on how
> those modules depend on each other. This (what I will call) reactor module
> tree is exactly the information I need.
>
> Is there a way to access this information from a plugin? ${reactorProjects}
> does not tell me that. Or am I missing sth very obvious?
>
> Thx,
>
> Christian
>


-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/ <http://xn--nna.ma.xn--bwa-xxb.je/>

Reply via email to