Hey all! How can I exclude resources from a packag...
# general
s
Hey all! How can I exclude resources from a package? It doesn't look like the
org.apache.commons.commons-lang3
is actually a dependency of
net.logstash.logback-logstash-logback-encoder
, but it's trying to include a resource that was in META-INF.
Copy code
excludes = [
  exclude(org="org.apache.commons" name="commons-lang3")
]
does nothing.
Copy code
===== For target JvmBinary(BuildFileAddress(src/jvm/com/thesigma/server/restapi/bin/BUILD, bin)):
                   Duplicate classes and/or resources detected in artifacts: ('net.logstash.logback-logstash-logback-encoder-6.1.jar', 'org.apache.commons-commons-lang3-3.5.jar')
                        META-INF/maven/org.apache.commons/commons-lang3/pom.xml
                        META-INF/maven/org.apache.commons/commons-lang3/pom.properties
w
everything pre-binary-building depends on filtering out entire artifacts
if you want to drop a particular resource out of a dep at binary build time (or to configure them to be concatenated or something), take a look at https://www.pantsbuild.org/jvm_projects.html#omitting-or-shading-the-contents-of-a-binary
s
Thanks @witty-crayon-22786!