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

Javascript output is not supported #4

Closed JeromeA closed 5 years ago

JeromeA commented 8 years ago

--js_out option was added to Google protoc 5 months ago, it would be nice to be able to generate javascript from a proto definition using this plugin.

sergei-ivanov commented 8 years ago

Hello @JeromeA,

At the moment, support for each new output type results in a creation of two new goals, and there are already too many of them. For the time being, you can use compile-custom goal, as described in #1, for example:

    <plugin>
        <groupId>org.xolstice.maven.plugins</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <version>0.5.0</version>
        <executions>
          <execution>
            <id>protobuf-compile-js</id>
            <goals>
                <goal>compile-custom</goal>
            </goals>
            <configuration>
                <pluginId>js</pluginId>
            </configuration>
          </execution>
        </executions>
    </plugin>

In the longer term, I need to find enough time to rewrite the entire plugin configuration, so that it's reduced to only two goals with multiple pluggable output configurations.

Please add votes (reactions to the headline comment) to help me gauge the demand for this feature.

Kind regards, Sergei