title: How to generate jar file from srcjar artifact?
body: <p>I have some <code>proto</code> files and I am using <code>bazel</code> to build them. I am using <a href="https://rules-proto-grpc.com/en/latest/lang/java.html#id15" rel="nofollow noreferrer">proto-rules-grpc</a> to generate the <code>BUILD</code> file for <code>bazel</code>. Then I'm running <code>bazel build</code> command. But the final artefact is in <code>.srcjar</code>.</p>
  <p>This also what the <a href="https://rules-proto-grpc.com/en/latest/lang/java.html#java-grpc-compile" rel="nofollow noreferrer">rule</a> says and I quote:</p>
  <blockquote>
  <p>Generates a Java protobuf and gRPC srcjar file</p>
  </blockquote>
  <p>But I want the final artefact in <code>.jar</code> format. Whereas <code>.srcjar</code> only contains the <code>.java</code> file.</p>
  <p>The manual process I can think of is to extract the raw java file from the <code>.srcjar</code> artefact and then use them to create the <code>.jar</code> file. But this is a bit annoying to do all this manually.</p>
  <p>Is there any way to do it without involving the manual process?</p>