xolstice / protobuf-maven-plugin

Maven Plugin that executes the Protocol Buffers (protoc) compiler
https://www.xolstice.org/protobuf-maven-plugin/
Other
232 stars 76 forks source link

any plan to support java-written plugin in compile-custom goal? #62

Open jizhilong opened 5 years ago

jizhilong commented 5 years ago

Is your feature request related to a problem? Please describe. I'd like to generate code with a java-written plugin, and don't want these generated codes to be bundled with the main protoc generated java codes.

Describe the solution you'd like copy the feature of protocPlugin from compile goal to compile-custom goal would be sufficient.

Describe alternatives you've considered use compile goal for invoking the java-written plugin, but exclude the generated main java classes from the final jar.

Additional context none.

jizhilong commented 5 years ago

copy the feature of protocPlugin from compile goal to compile-custom goal would be sufficient.

If this solution makes sense, I'd be happy to suggest a PR.

ST-DDT commented 5 years ago

I would like to use this feature to generate some tests from the main protos, but still store them in the generated test sources folder, currently this is not possible because the java plugins can only be run alongside the main protoc executable, which will generate the proto message classes multiple times.

Lander commented 4 years ago

Voting for this feature! I would like to use custom java plugin to generate non-java output without generating java files along the way. Would be great to have such an option.