Skip to content

build: remove shaded overlaps - #1605

Merged
c-dilks merged 1 commit into
developmentfrom
shade-overlaps
Dec 2, 2026
Merged

c-dilks merged 1 commit into
developmentfrom
shade-overlaps

Conversation

@c-dilks

@c-dilks c-dilks commented Dec 2, 2026

Copy link
Copy Markdown
Member

Fixes build warnings during shading the coat-libs JAR:

[WARNING] commons-lang3-3.20.0.jar, commons-text-1.15.0.jar, json-20260814.jar, kotlin-stdlib-2.4.20.jar, snakeyaml-2.7.jar, sqlite-jdbc-3.40.0.0.jar define 1 overlapping classes:
[WARNING]   - META-INF.versions.9.module-info
[WARNING] javafx-base-23.0.2-linux.jar, javafx-controls-23.0.2-linux.jar, javafx-fxml-23.0.2-linux.jar, javafx-graphics-23.0.2-linux.jar define 1 overlapping resource:
[WARNING]   - META-INF/substrate/config/reflectionconfig.json
[WARNING] javafx-controls-23.0.2-linux.jar, javafx-graphics-23.0.2-linux.jar define 4 overlapping resources:
[WARNING]   - META-INF/substrate/config/reflectionconfig-aarch64-android.json
[WARNING]   - META-INF/substrate/config/reflectionconfig-arm64-ios.json
[WARNING]   - META-INF/substrate/config/reflectionconfig-x86_64-ios.json
[WARNING]   - META-INF/substrate/config/resourcebundles
[WARNING] commons-exec-1.3.jar, commons-lang3-3.20.0.jar, commons-math3-3.6.1.jar, commons-text-1.15.0.jar define 1 overlapping resource:
[WARNING]   - META-INF/NOTICE.txt
[WARNING] VectorGraphics2D-0.13.jar, annotations-13.0.jar, ccdbrcdb-2.1.jar, clara-io-14.2.4-SNAPSHOT.jar, clas-analysis-14.2.4-SNAPSHOT.jar, clas-decay-tools-14.2.4-SNAPSHOT.jar, clas-detector-14.2.4-SNAPSHOT.jar, clas-geometry-14.2.4-SNAPSHOT.jar, clas-io-14.2.4-SNAPSHOT.jar, clas-jcsg-14.2.4-SNAPSHOT.jar, clas-logging-14.2.4-SNAPSHOT.jar, clas-math-14.2.4-SNAPSHOT.jar, clas-physics-14.2.4-SNAPSHOT.jar, clas-reco-14.2.4-SNAPSHOT.jar, clas-tracking-14.2.4-SNAPSHOT.jar, clas-utils-14.2.4-SNAPSHOT.jar, clas12detector-vtx-14.2.4-SNAPSHOT.jar, coat-libs-14.2.4-SNAPSHOT.jar, commons-exec-1.3.jar, commons-lang3-3.20.0.jar, commons-math3-3.6.1.jar, commons-text-1.15.0.jar, ejml-cdense-0.40.jar, ejml-core-0.40.jar, ejml-ddense-0.40.jar, ejml-dsparse-0.40.jar, ejml-fdense-0.40.jar, ejml-fsparse-0.40.jar, ejml-simple-0.40.jar, ejml-zdense-0.40.jar, et-14.99.jar, exp4j-0.4.8.jar, f2jutil-1.0.jar, freehep-jminuit-1.0.2.jar, freemarker-2.3.26-incubating.jar, groot-6.0.0.jar, jacorb-omgapi-3.9.jar, jama-1.0.3.jar, javafx-base-23.0.2-linux.jar, javafx-base-23.0.2.jar, javafx-controls-23.0.2-linux.jar, javafx-controls-23.0.2.jar, javafx-fxml-23.0.2-linux.jar, javafx-graphics-23.0.2-linux.jar, javafx-graphics-23.0.2.jar, javax.annotation-api-1.3.2.jar, jeromq-0.5.4.jar, jevio-5.99.0-jar-with-dependencies.jar, jline-3.1.3.jar, jnacl-1.0.0.jar, jnp-hipo4-4.5.jar, jopt-simple-5.0.4.jar, json-20260814.jar, jsr305-3.0.2.jar, kotlin-stdlib-2.4.20.jar, lz4-java-1.8.0.jar, magfield-14.2.4-SNAPSHOT.jar, miglayout-core-4.2.jar, miglayout-swing-4.2.jar, mysql-connector-j-9.7.0.jar, numRec-1.0.jar, org.jfree.pdf-2.0.jar, org.jfree.svg-4.2.jar, protobuf-java-4.28.2.jar, snakeyaml-2.7.jar, snr-14.2.4-SNAPSHOT.jar, splot-14.2.4-SNAPSHOT.jar, sqlite-jdbc-3.40.0.0.jar, swim-tools-14.2.4-SNAPSHOT.jar, swimmer-14.2.4-SNAPSHOT.jar, vecmath-1.3.1.jar, xmsg-2.5.jar define 1 overlapping resource:
[WARNING]   - META-INF/MANIFEST.MF
[WARNING] mysql-connector-j-9.7.0.jar, sqlite-jdbc-3.40.0.0.jar define 1 overlapping resource:
[WARNING]   - META-INF/services/java.sql.Driver
[WARNING] commons-exec-1.3.jar, commons-lang3-3.20.0.jar, commons-math3-3.6.1.jar, commons-text-1.15.0.jar, javax.annotation-api-1.3.2.jar define 1 overlapping resource:
[WARNING]   - META-INF/LICENSE.txt
[WARNING] jevio-5.99.0-jar-with-dependencies.jar, lz4-java-1.8.0.jar define 84 overlapping classes and resources:
[WARNING]   - net.jpountz.lz4.LZ4BlockInputStream
[WARNING]   - net.jpountz.lz4.LZ4BlockOutputStream
[WARNING]   - net.jpountz.lz4.LZ4ByteBufferUtils
[WARNING]   - net.jpountz.lz4.LZ4ByteBufferUtils$Match
[WARNING]   - net.jpountz.lz4.LZ4Compressor
[WARNING]   - net.jpountz.lz4.LZ4Constants
[WARNING]   - net.jpountz.lz4.LZ4Decompressor
[WARNING]   - net.jpountz.lz4.LZ4Exception
[WARNING]   - net.jpountz.lz4.LZ4Factory
[WARNING]   - net.jpountz.lz4.LZ4FastDecompressor
[WARNING]   - 74 more...
[WARNING] maven-shade-plugin has detected that some files are
[WARNING] present in two or more JARs. When this happens, only one
[WARNING] single version of the file is copied to the uber jar.
[WARNING] Usually this is not harmful and you can skip these warnings,
[WARNING] otherwise try to manually exclude artifacts based on
[WARNING] mvn dependency:tree -Ddetail=true and the above output.
[WARNING] See https://maven.apache.org/plugins/maven-shade-plugin/

Here's a diff of the jar tf:
2026-12-02-101049_1460x989_scrot

Finally, as a bonus, I fixed a small bug where the dependency tree for the shaded JAR was not being generated; here it is!

org.jlab.coat:coat-libs:jar:14.2.4-SNAPSHOT
+- org.jlab.coda:jevio:jar:jar-with-dependencies:5.99.0:compile
+- org.jlab.coda:et:jar:14.99:compile
+- org.jlab.clas:clas-io:jar:14.2.4-SNAPSHOT:compile
|  +- org.jlab.coda:xmsg:jar:2.5:compile
|  |  +- org.zeromq:jeromq:jar:0.5.4:compile
|  |  |  \- eu.neilalexander:jnacl:jar:1.0.0:compile
|  |  +- com.google.protobuf:protobuf-java:jar:4.28.2:compile
|  |  \- net.sf.jopt-simple:jopt-simple:jar:5.0.4:runtime
|  +- org.json:json:jar:20260814:compile
|  +- org.yaml:snakeyaml:jar:2.7:compile
|  \- org.jlab.jnp:jnp-hipo4:jar:4.5:compile
|     +- net.objecthunter:exp4j:jar:0.4.8:compile
|     \- org.lz4:lz4-java:jar:1.8.0:compile
+- org.jlab.clas:clara-io:jar:14.2.4-SNAPSHOT:compile
|  +- org.jlab.coda:jclara:jar:6.2:compile
|  |  +- org.jline:jline:jar:3.1.3:compile
|  |  +- org.apache.commons:commons-exec:jar:1.3:runtime
|  |  +- org.freemarker:freemarker:jar:2.3.26-incubating:runtime
|  |  +- javax.annotation:javax.annotation-api:jar:1.3.2:runtime
|  |  \- com.google.code.findbugs:jsr305:jar:3.0.2:runtime
|  \- org.apache.commons:commons-text:jar:1.15.0:compile
|     \- org.apache.commons:commons-lang3:jar:3.20.0:compile
+- org.jlab.clas:clas-logging:jar:14.2.4-SNAPSHOT:compile
+- org.jlab.clas:clas-reco:jar:14.2.4-SNAPSHOT:compile
|  +- cnuphys:magfield:jar:14.2.4-SNAPSHOT:compile
|  \- cnuphys:swimmer:jar:14.2.4-SNAPSHOT:compile
|     \- cnuphys:splot:jar:14.2.4-SNAPSHOT:compile
|        +- com.nr:numRec:jar:1.0:compile
|        \- org.netlib:f2jutil:jar:1.0:compile
+- org.jlab.clas:clas-utils:jar:14.2.4-SNAPSHOT:compile
+- org.jlab.clas:clas-jcsg:jar:14.2.4-SNAPSHOT:compile
|  +- org.openjfx:javafx-fxml:jar:linux:23.0.2:compile
|  |  \- org.openjfx:javafx-controls:jar:23.0.2:compile
|  |     +- org.openjfx:javafx-controls:jar:linux:23.0.2:compile
|  |     \- org.openjfx:javafx-graphics:jar:23.0.2:compile
|  +- org.openjfx:javafx-graphics:jar:linux:23.0.2:compile
|  |  \- org.openjfx:javafx-base:jar:23.0.2:compile
|  +- org.openjfx:javafx-base:jar:linux:23.0.2:compile
|  \- java3d:vecmath:jar:1.3.1:compile
+- org.jlab.clas:clas-detector:jar:14.2.4-SNAPSHOT:compile
|  +- org.jlab:groot:jar:6.0.0:compile
|  |  +- org.freehep:freehep-jminuit:jar:1.0.2:compile
|  |  +- org.jfree:org.jfree.pdf:jar:2.0:compile
|  |  +- org.jfree:org.jfree.svg:jar:4.2:compile
|  |  +- com.miglayout:miglayout-swing:jar:4.2:compile
|  |  |  \- com.miglayout:miglayout-core:jar:4.2:compile
|  |  \- de.erichseifert.vectorgraphics2d:VectorGraphics2D:jar:0.13:compile
|  \- org.jlab.ccdbrcdb:ccdbrcdb:jar:2.1:compile
|     +- org.jetbrains.kotlin:kotlin-stdlib:jar:2.4.20:compile
|     |  \- org.jetbrains:annotations:jar:13.0:compile
|     +- com.mysql:mysql-connector-j:jar:9.7.0:compile
|     +- org.xerial:sqlite-jdbc:jar:3.40.0.0:compile
|     \- org.jacorb:jacorb-omgapi:jar:3.9:compile
+- org.jlab.clas:clas-analysis:jar:14.2.4-SNAPSHOT:compile
|  \- org.apache.commons:commons-math3:jar:3.6.1:compile
+- org.jlab.clas:clas-geometry:jar:14.2.4-SNAPSHOT:compile
+- org.jlab.clas:clas-math:jar:14.2.4-SNAPSHOT:compile
+- org.jlab.clas:clas-physics:jar:14.2.4-SNAPSHOT:compile
+- org.jlab.clas:swim-tools:jar:14.2.4-SNAPSHOT:compile
+- org.jlab.clas:clas-tracking:jar:14.2.4-SNAPSHOT:compile
|  +- org.ejml:ejml-simple:jar:0.40:compile
|  |  +- org.ejml:ejml-core:jar:0.40:compile
|  |  +- org.ejml:ejml-fdense:jar:0.40:compile
|  |  +- org.ejml:ejml-ddense:jar:0.40:compile
|  |  +- org.ejml:ejml-cdense:jar:0.40:compile
|  |  +- org.ejml:ejml-zdense:jar:0.40:compile
|  |  +- org.ejml:ejml-dsparse:jar:0.40:compile
|  |  \- org.ejml:ejml-fsparse:jar:0.40:compile
|  \- gov.nist.math:jama:jar:1.0.3:compile
+- org.jlab.clas:clas-decay-tools:jar:14.2.4-SNAPSHOT:compile
|  \- org.jlab.clas12.detector:clas12detector-vtx:jar:14.2.4-SNAPSHOT:compile
\- cnuphys:snr:jar:14.2.4-SNAPSHOT:compile

@c-dilks c-dilks added the maven label Dec 2, 2026
@c-dilks
c-dilks enabled auto-merge (squash) December 2, 2026 15:32
@c-dilks
c-dilks merged commit bc7de28 into development Dec 2, 2026
27 checks passed
@c-dilks
c-dilks deleted the shade-overlaps branch December 2, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants