if I want to just bundle `java/resources` into a j...
# community-support
c
if I want to just bundle
java/resources
into a jar, should I still use
java-library
plugin?
v
"just" opposed to ...?
c
having other things in the jar
this jar has nothing other than java/resources
what else does just mean?
e
java-library
will set things up so that dependent projects that can consume unpacked resources don't have to go through the
jar
, so there's still value even if there's no Java code
👍 1
v
this jar has nothing other than java/resources
Do you really mean Java, as in the source files, or do you mean the compile class files? If you mean the former, there is probably no need for
java
or
java-library
plugin. If the latter then my question stands, opposed to what? The main purpose of those plugins is to compile sources to classes and pack the classes and resources into a jar. So what I don't understand is, why you should not use the plugin. That's why I ask the "opposed to". In which use-case would you use the plugin without any doubt?
c
I mean that the only thing in the subproject is in java/resources
there are no classes
v
Ah, so "java/resources" as in "src/main/resources", I see. Then what ephemient said. :-) the two things the
java-library
plugin adds are, that you can declare api dependencies and that it adds secondary variants so that projects in the same build can use the pure directories without the need to build a jar.