如何从srcjar伪像生成jar文件?
我有一些proto
文件,我正在使用bazel
来构建它们。我正在使用 proto-rules-grpc 构建
bazel
的文件。然后,我正在运行bazel build
命令。但是最终的伪像是.srcjar
。
这也是规则我引用:
生成Java Protobuf和grpc srcjar文件
但我希望最终人工制品中的最终伪像.jar 格式。而.srcjar
仅包含.java
文件。
我能想到的手动过程是从.srcjar
tratefact提取RAW JAVA文件,然后使用它们创建.jar
文件。但这有点烦人,手动完成所有操作。
有没有任何方法可以在不涉及手动过程的情况下进行操作?
I have some proto
files and I am using bazel
to build them. I am using proto-rules-grpc to generate the BUILD
file for bazel
. Then I'm running bazel build
command. But the final artefact is in .srcjar
.
This also what the rule says and I quote:
Generates a Java protobuf and gRPC srcjar file
But I want the final artefact in .jar
format. Whereas .srcjar
only contains the .java
file.
The manual process I can think of is to extract the raw java file from the .srcjar
artefact and then use them to create the .jar
file. But this is a bit annoying to do all this manually.
Is there any way to do it without involving the manual process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
Java_grpc_library
。java_grpc_compile
产生.srcjar
。java_grpc_library
产生.jar
。Use
java_grpc_library
.java_grpc_compile
produces a.srcjar
.java_grpc_library
produces a.jar
.