https://pantsbuild.org/ logo
#general
Title
# general
s

strong-caravan-64652

06/27/2019, 10:07 PM
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

witty-crayon-22786

06/28/2019, 5:20 PM
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

strong-caravan-64652

06/28/2019, 7:04 PM
Thanks @witty-crayon-22786!
6 Views