Answer the question
In order to leave comments, you need to log in
maven: using a module as a plugin
There is a multi-module maven project with a complex hierarchical structure. One of the modules is used as a plugin in another module.
Doesn't want to compile, can't find this plugin.
Previous developers solved this through mvn install, which was run several times, but I don’t want to, I want to do it normally.
If such a design is impossible in principle, then how to do it right? While this module/plugin depends on some other modules in the same project...
ps
Maven 3.0.4
Answer the question
In order to leave comments, you need to log in
It's a matter of compilation. If the plugin passes "mvn install" first, then the plugin will find it
The idea is the following. mvn install will submit your artifacts to the local repository. Until the right one is there, then, accordingly, it will not be found. Therefore, when you call mvn package, the installation of modules in the local repository does not occur.
In general, I would eschew multi-module projects. Most likely, you can get by with separate artifacts and write them as dependencies. To do this, though, you also need to use the command repository of artifacts.
Naturally, Maven can work with modules that depend on each other, but it is important that all modules and their dependencies are correctly written
<groupId>, <artifactId>, <version>, <packaging>/<type>
Scanning for projects...
Reactor build order:
module-a
module-b
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question