I'm having a problem with a multi-module project where one of the modules is an annotation-based maven-plugin: https://github.com/fommil/netlib-java/
Basically, mvn compile
fails the first time and then succeeds when I do a second mvn compile
.
It also works OK from clean if I do
mvn -pl generator compile
mvn compile
I'd like the build to succeed in one go so that I can do a build and release of all modules.
I had a quick look at your project and found, that the "generator" plugin is part of the multimodule project and it is used (with the same version) within this project. This is not a legal use! You have to provide all required plugins from outside the reactor!
The reason for this is, that maven tries to fill the reactor and determine all required plugins beforehand. Then it starts the build. Maven cannot perform this, if the generator plugin is part of the project.
Stephen Connolly wrote about this in a blog post: Maven and the "Install" Hack.
hth,
- martin