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

polite-vase-75369

12/18/2018, 7:50 PM
weird question about shading, how would i accomplish something like this for my big jar i create? https://stackoverflow.com/questions/9069138/apache-cxf-client-loads-fine-in-eclipse-but-standalone-jar-throws-nullpointerexc/9069435#9069435
a

aloof-angle-91616

12/18/2018, 7:52 PM
accomplishing which part specifically? sorry if obvious
p

polite-vase-75369

12/18/2018, 7:54 PM
i guess this part
Copy code
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"><projectName>Apache CXF</projectName></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"><resource>META-INF/spring.handlers</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"><resource>META-INF/services/com.sun.tools.xjc.Plugin</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"><resource>META-INF/spring.schemas</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"><resource>META-INF/cxf/cxf.extension</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer"><resource>META-INF/extensions.xml</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer"><resource>META-INF/cxf/extensions.xml</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"><resource>META-INF/cxf/bus-extensions.txt</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer"><resource>META-INF/cxf/bus-extensions.xml</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer"><resource>META-INF/wsdl.plugin.xml</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer"><resource>META-INF/tools.service.validator.xml</resource></transformer><transformer implementation="org.apache.cxf.maven.PluginTransformer"><resource>META-INF/tools-plugin.xml</resource></transformer><transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer"><resource>META-INF/cxf/java2wsbeans.xml</resource></transformer><transformer implementation="org.apache.cxf.maven.CXFAllTransformer"/>
i think i am depending on a jar that depends on two jars that have conflicts (in a specific file?)
im having problems when i build a fat jar, but when i use the repl it is fine
is there a way to do these appending transformers in pants?
f

fancy-queen-20734

12/18/2018, 9:13 PM
I don’t think there is right now
or at least it’s not built in
f

fancy-queen-20734

12/18/2018, 9:16 PM
ooooh nice
p

polite-vase-75369

12/18/2018, 9:16 PM
tho kind of shooting in the dark here
damn fat jars
f

fancy-queen-20734

12/18/2018, 9:18 PM
that looks right ish, but it’ll just moosh the xml together as though they were plain text files
p

polite-vase-75369

12/18/2018, 9:19 PM
lets hope it isnt an xml file
worked somehow .....
👌 1
a

aloof-angle-91616

12/18/2018, 10:41 PM
i don't know what precisely is consuming the output here but it might be trying to accomodate solutions like these by parsing broken tags
p

polite-vase-75369

12/18/2018, 10:47 PM
two jars have the same META-INF/something.conf files
👍 1
so concat works fine since it is plain text
👍 1
f

fancy-queen-20734

12/18/2018, 10:59 PM
👍
a

aloof-angle-91616

12/18/2018, 11:00 PM
thanks for digging!
7 Views