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'm placing this as an answer because it won't fit on the comments area)
Well I downloaded the 11fe0f5 revision from Github and tried mvn clean install on the parent/root folder to see what would happen and I got this error:
Which led me to question if the interface goal really existed in the generator plugin and if it's goal descriptor was being generated.. So looking at the generator module pom.xml I couldn't find any maven-plugin configuration in order to generate a plugin module, so I changed your maven-plugin-plugin configurations to:
and that added the interface goal to the generator plugin and I'm now able to install from the root folder just fine.
mvn clean install partial output:
What maven commands/goals are you using to get the error in your question? Have you tried removing your whole repository? (maybe you've got a messed up version of generator installed there)
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