I've asked this before, but nobody answered, so I'...
# general
f
I've asked this before, but nobody answered, so I'll give it another try. How can I package my compiled Java/Scala library code as a jar? I only see the
deploy_jar
target, but that will include all the dependencies in the jar, which isn't what I want.
f
Pants would need rules written to produce a plain jar like that.
(including addition of a target type to represent such an output)
h
@famous-author-71879 would this JAR contain just a single compiled java_library, or also all of its transitive first party deps (but no third-party deps)?
f
No deps
The idea would be to do what Maven or sbt do: generate a .pom file that contains all the dependencies. Then the library user's build tool can fetch all the other dependencies, whether they're first- or third-party
But actually I'm not even sure this is a deal-breaker for us. We might not even need that, I was just so surprised to see that it's not there.
This is something that comes built in with sbt, whereas for a fat jar you need something like sbt-assembly. It seems like with pants it's the other way around, you get fat jars built in but no regular jars.
f
We might not even need that, I was just so surprised to see that it's not there.
I perceive that you may be implicitly assuming that there has been regular development attention made to the JVM backends including a consistent roadmap for what to implement. That is not the case unfortunately. While there briefly was a commercial sponsor for some JVM work more than a year ago (through Toolchain), that sponsorship was non-recurring and there has not really been any consistent development effort made to the JVM code since.
h
This is true. The roadmap is whatever interested parties want it to be. So far no one has asked for this, but it makes sense. In fact I think it would be straightforward to implement.
f
For now we don't know if we're going to be using Pants, and even if we do, I have to clarify with my team if this is even a strict requirement or if we can do without that
So don't start working on this for me just yet 😂
h
Well, I was more hinting towards you implementing it if you need it... 🙂
We're happy to guide
Or there are folks in the community who can do contract work
But to start with, just a github feature request issue would be super helpful, to track this
f
If we need this, we may well decide to implement it ourselves