Name: copy-protos-maven-plugin
Owner: HubSpot
Description: null
Created: 2018-02-06 17:52:31.0
Updated: 2018-02-06 18:07:46.0
Pushed: 2018-02-06 18:39:11.0
Homepage: null
Size: 11
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a Maven plugin that will extract proto definitions contained inside your dependencies into an output directory of your choosing. This is useful is you want one of your protos to import a proto from one of your dependencies.
Add the following snippet to your POM to run the plugin (defaults to generate-sources phase):
ld>
<plugins>
<plugin>
<groupId>com.hubspot.maven.plugins</groupId>
<artifactId>copy-protos-maven-plugin</artifactId>
<version>0.1</version>
<executions>
<execution>
<goals>
<goal>copy-protos</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
ild>
There is a base output directory which defaults to ${project.build.directory}/generated-resources/dependency-protobufs
. Each dependency's protos are then copied to subdirectories based on the coordinates. So for example the protos from com.google.protobuf:protobuf-java would be copied to: ${project.build.directory}/generated-resources/dependency-protobufs/com/google/protobuf/protobuf-java