-
Notifications
You must be signed in to change notification settings - Fork 274
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
If a Java dependency jar contains proto files, should extract them and add the extracted dir to --proto_path #15
Comments
Hello, we are currently using this framework in our project and encountered this issue. |
To clarify, this applies to Java dependencies, i.e., |
There is an issue: if the depended protos and the dependent protos are compiled with different settings of option
Anyway, Option 2 sounds better than nothing. |
According to @pherl, |
- If a project compiles proto files, they are packaged as resources in the compiled jar along with the class files. protobuf-java artifacts have already been including proto definitions for built-in types such as Any. This is only done for Java. There is a TODO for Android. - proto files from dependencies are extracted into a temporary directory, which is added to the --proto_path argument of the protoc command line, so that they can be imported in the proto files of this project, but won't be compiled again. Resolves #15
@mikhailmikhaylov @mmmdreg can you guys give version |
FYI 0.6.1 includes this feature and has been released on Maven Central. |
Is this feature available for protobuf-lite? |
No. protobuf-lite doesn't provide those well-known protos. |
The Protobuf release jars contain proto files for well-known types. The user may import these types in their own proto files, thus the well-known type proto files should be under a directory included in
--proto_path
.maven-protoc-plugin is already doing so.
The text was updated successfully, but these errors were encountered: