HubSpot/copy-protos-maven-plugin

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

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

copy-protos-maven-plugin

What is it

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.

How do I use it

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.