You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Maven artifact containing .proto files only (without pre-compiled classes). I want to generate classes from this protos in my project (project itself doesn't have own .proto files). So, I use <compileMavenTypes>direct</compileMavenTypes> and <includeStdTypes>true</includeStdTypes> (protos from the artifact includes some standard Google's protos). Everything is great but plugin generates classes for all dependencies including protobuf-java (which already contains pre-compiled classes) and this leads to class duplication.
Probably, this is not a big issue (since classes are the same), but I wonder if there is any way to exclude some protos from code generation?
The text was updated successfully, but these errors were encountered:
Probably, this is not a big issue (since classes are the same)
It is a problem, because they're not the same. The StringValue.class in protobuf-java.jar contains the StringValue.of(String) method that is not present if one simply passes StringValue.proto to protoc!
I have a Maven artifact containing
.proto
files only (without pre-compiled classes). I want to generate classes from this protos in my project (project itself doesn't have own.proto
files). So, I use<compileMavenTypes>direct</compileMavenTypes>
and<includeStdTypes>true</includeStdTypes>
(protos from the artifact includes some standard Google's protos). Everything is great but plugin generates classes for all dependencies including protobuf-java (which already contains pre-compiled classes) and this leads to class duplication.Probably, this is not a big issue (since classes are the same), but I wonder if there is any way to exclude some protos from code generation?
The text was updated successfully, but these errors were encountered: