Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lite code generation #64

Closed
hpehl opened this issue Jul 9, 2019 · 3 comments · Fixed by #70
Closed

Use lite code generation #64

hpehl opened this issue Jul 9, 2019 · 3 comments · Fixed by #70

Comments

@hpehl
Copy link

hpehl commented Jul 9, 2019

I'm looking for a way to use the lite variant when generating the Java source code. According to the documentation one has to use something like

protoc --java_out=lite:${OUTPUT_DIR} path/to/your/proto/file

I'm wondering whether and how this can be used by the protobuf-maven-plugin. Using

<plugin>
    <groupId>org.xolstice.maven.plugins</groupId>
    <artifactId>protobuf-maven-plugin</artifactId>
    <configuration>
        ...
        <outputDirectory>
            lite:${project.build.directory}/generated-sources/protobuf/java
        </outputDirectory>
    </configuration>
</plugin>

does not work.

@sergei-ivanov
Copy link
Member

Looks like I need to port javaScriptOptions behaviour to compile mojo. Or make it a generic behaviour for all mojos. This way of configuring the output parameters was only supported by a couple of protoc output targets historically, but now seems to be more commonplace.

@stuffandthings
Copy link

stuffandthings commented Oct 7, 2019

@hpehl were you able to find a workaround? Finding myself wanting to generate lite variant code with maven as well.

@hpehl
Copy link
Author

hpehl commented Oct 10, 2019

@stuffandthings Unfortunately no. I'm stuck right now.

sergei-ivanov pushed a commit that referenced this issue Jan 17, 2020
Fixes #64
Like for the JavaScript compiler, allow to pass additional options to the Java compiler.
Especially useful for generating lite code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants