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

Allow Providing Parameters to Built in Plugin #61

Open
bfmyr4 opened this issue Jun 5, 2019 · 2 comments
Open

Allow Providing Parameters to Built in Plugin #61

bfmyr4 opened this issue Jun 5, 2019 · 2 comments
Assignees
Milestone

Comments

@bfmyr4
Copy link

bfmyr4 commented Jun 5, 2019

I would like to be able to provide a command line parameter to the build-in csharp plugin (--csharp_opt=base_namespace=Com). Allow <plugInParameter> tag to be able to pass an argument to protoc.

Example:
bfmyr4 @bfmyr4 May 28 09:31
I must be missing something. I just want to use the built in compile-csharp goal. Something like this doesn't seem to work. Example:

<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<executions>
<execution>
<id>java</id>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
<execution>
<id>csharp</id>
<goals>
<goal>compile-csharp</goal>
</goals>
<configuration>
<pluginParameter>--csharp_opt=base_namespace=Com</pluginParameter>
<protocArtifact>com.google.protobuf:protoc:3.7.1:exe:${os.detected.classifier}</protocArtifact>
<attachProtoSources>false</attachProtoSources>
<useArgumentFile>true</useArgumentFile>
</configuration>
</execution>
</executions>
<configuration>
<protocArtifact>com.google.protobuf:protoc:3.7.1:exe:${os.detected.classifier}</protocArtifact>
<attachProtoSources>false</attachProtoSources>
<useArgumentFile>true</useArgumentFile>
</configuration>
</plugin>
@sergei-ivanov sergei-ivanov self-assigned this Jun 9, 2019
@sergei-ivanov sergei-ivanov added this to the 0.7 milestone Jun 9, 2019
@sergei-ivanov
Copy link
Member

Reference documentation:
https://developers.google.com/protocol-buffers/docs/reference/csharp-generated#compiler_options

Looks like there are at least two different ways of supplying options to built-in protoc plugins, and this one has never been supported in maven plugin.

@sebastienvermeille
Copy link

Same problem here I try to use another plugin which would require --doc_opt=markdown,docs.md

@bfmyr4 @sergei-ivanov did you found a workaround in the mid time ?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants