xolstice / protobuf-maven-plugin

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

support for filtering proto file list in configuration #27

Closed haitaoyao closed 7 years ago

haitaoyao commented 7 years ago

Hi, I'd like to know whether I can submit a PR to support specifying filters for proto file dirs.

In our company, we put all the proto files into 1 big git repo, but every project just need part of it. Without support for specifying file list or regxp to filter files, we have to generate all the proto java files, which are mostly not needed, or just copy the proto files into one project, which is error prone.

If the plugin support filtering proto files, I can use git submodule to add the proto project into my java project and just filter the proto files need.

Thanks.

sergei-ivanov commented 7 years ago

Hello Haitao,

Have you tried using includes and excludes? https://www.xolstice.org/protobuf-maven-plugin/compile-mojo.html#includes https://www.xolstice.org/protobuf-maven-plugin/compile-mojo.html#excludes

Kind regards, Sergei

haitaoyao commented 7 years ago

Hi, it works. Thank you very much.