Closed btiernay closed 5 years ago
This becomes a chicken and egg problem. You need to compile the plugin to generate sources for the current module. Can please you provide an example, so that I could understand your case better? The only situation when it will potentially work is when the plugin is in the main sources, and generation is done for the test sources. But even then I am not convinced why a refactoring into separate modules would not be a better/cleaner option.
Ah, yes you might be right here. Could it be possible to pick it up from the class path If it exists in a sibling module that it depends on, without having to specify the maven coordinates?
Have you tried configuring it with maven coordinates? For example, like here: https://github.com/xolstice/protobuf-maven-plugin/blob/master/src/it/TEST-16/pom.xml
You can use ${project.groupId}
and ${project.version}
for groupId and version respectively. It may "just work" in multi-module environment, unless Maven really expects to resolve to a jar file, or unless classpath generation cannot handle directories.
It would be very convenient to allow for attaching a plugin whose source comes from the current module. This could serve as a local way to enhance the code, when not generally reusable across modules. Currently this is not possible as maven coordinates are required.