Closed gavinsherry closed 7 years ago
Can you please explain your use case in a little more detail? If I understand it correctly, declaring multiple executions of the plugin might help you achieve your goal. Alternatively, you may choose to break the project down into a number of modules (note that protobuf imports work well across multiple modules).
Hi @sergei-ivanov. Thanks for your response.
I am including protobufs via a git submodule. I also have local protobufs. My goal is to have the plugin compile all of the protobufs without creating multiple modules.
Hi Gavin,
Again, a little more information would be beneficial. If it is a public project, a link would be great.
Are your local protobufs dependent on the ones from the submodule?
What are you trying to do is not really the Maven way (more like a Gradle way), but I still think you can achieve your goal using the existing means. For example, one execution to compile the protos in the submodule into a separate output directory, another execution with submodule proto directory added to additionalProtoPaths
to compile the local protobufs.
Sergei
Hi again,
Unfortunately this is not a public project.
I suspected that this was not really a Maven way of doing things :). Unfortunately I'm somewhat stuck with it for the moment.
The approach you outlined should work, particularly with the help of additionalProtoPaths
since there is a dependency from the local protobufs on the submodule protobufs.
Thanks for your help! I'm closing this issue now.
I would like to include multiple source root directories as targets for the plugin. Reviewing the documentation and source code this is not currently possible. Is it a feature you'd consider adding?
-Gavin