Consume jnp-hipo4 4.5 from the hipo-java package registry - #1360
Consume jnp-hipo4 4.5 from the hipo-java package registry#1360mathieuouillon wants to merge 4 commits into
Conversation
c-dilks
left a comment
There was a problem hiding this comment.
This looks great, thank you so much for doing this!
|
I tested both halves of the concern, clearing the local The entry is load-bearing. Drop it and the build fails outright: after walking clas12maven → jnp-maven → central. So 4.5 exists nowhere but Order really does decide, and silently. I put a deliberately fake
When the impostor won, Maven emitted nothing at all: no warning, no |
jnp-hipo4 is now built and released from its own repository, code.jlab.org/hallb/clas12/hipo-java, instead of being cut from the monolithic jnp tree. Points the dependency at 4.5 from that project's package registry, which is public and needs no credentials. Two things this changes beyond the coordinate. The old clasweb artifact was a fat jar bundling exp4j, lz4 and xxhash, so the exp4j 0.4.8 pinned here to resolve the jnp-hipo/jnp-hipo4 conflict was being shadowed by a bundled copy; 4.5 publishes a plain jar and declares exp4j and lz4-java as ordinary dependencies, so that pin governs again. It also drops the classes the fat jar duplicated with jnp-hipo (matrix, ascii, readers, MigLayout) -- all still supplied by jnp-hipo, which this project already depends on, and the ones this project actually imports come from there. Verified against an unmodified development baseline: 49 modules build, 1620 source files compile, and the test suite is identical -- 14 run, 0 failures, and the same single DCReconstructionTest error, which is the absent TORUS field map and reproduces without this change. maven-enforcer's DependencyConvergence passes.
Maven queries repositories in declaration order and takes the first that answers with the coordinate, so whichever comes first *decides* what `org.jlab.jnp:jnp-hipo4` resolves to. The clasweb repositories still carry the old fat-jar `jnp-hipo4`; with them ahead of this entry, either one serving a 4.5 would shadow the artifact this project means to consume, and nothing would report it. Verified rather than assumed. The effective POM now orders them clas12-hipo-java, clas12maven, jnp-maven, central. With the local cache entry removed, `jnp-hipo4:4.5` is downloaded from clas12-hipo-java. The trade-off is real and is written into the comment: code.jlab.org is asked first for every artifact and misses on all but `jnp-hipo4`. Resolving `org.json:json` walks clas12-hipo-java, clas12maven, jnp-maven, then central, which serves it. Note the miss is silent at default verbosity — Maven logs no 404, it just tries the next repository — so the cost is latency and a stall when that host is unwell, not visible errors. It goes away if a real repository manager ever proxies these.
a69f79f to
f92fe43
Compare
Removed lengthy comments about repository configuration and updated the repository entry for `clas12-hipo-java`.
Removed unnecessary comment syntax from pom.xml.
jnp-hipo4is now built and released from its own repository,code.jlab.org/hallb/clas12/hipo-java,
rather than being cut from the monolithic
jnptree. This points the dependencyat 4.5 from that project's package registry.
The registry is public, so this needs no credentials or
settings.xml.Two things this changes beyond the coordinate
exp4j is governed by our pin again. The old clasweb artifact was a fat jar
bundling
exp4j,lz4andxxhash. Thenet.objecthunter:exp4j:0.4.8pinned inthe root pom — specifically to resolve the
jnp-hipo/jnp-hipo4conflict, perdocs/dependency_conflicts.md— was therefore being shadowed by a copy inside thejar. 4.5 publishes a plain jar and declares its dependencies normally:
maven-enforcer'sDependencyConvergencepasses.Fewer duplicate classes on the classpath. The fat jar also carried
org.jlab.jnp.{matrix,ascii,readers}and MigLayout, all of whichjnp-hipoalready provides — so they were present twice and classpath order decided the
winner. 4.5 drops them. Every one this project actually imports (17
org.jlab.jnp.matrix, 17org.jlab.jnp.utils.*) resolves fromjnp-hipo, whichwe already depend on.
net.miginfocom,org.jlab.jnp.asciiandorg.jlab.jnp.readershave zero imports here.No
org.jlab.jnp.hipo4class is missing in 4.5 — the API surface is complete.Verification
Compared against an unmodified
developmentbaseline, same commands:4.3-SNAPSHOT4.5)DCReconstructionTestDCReconstructionTest— same test, same causeThat error is
FileNotFoundException: TORUS map not found at ../../etc/data/magfield/Symm_torus_r2501_phi16_z251_24Apr2018.dat(the NPE is itsdownstream effect) — a field map absent from a fresh clone. It reproduces
identically without this change, which is the only reason it can be set aside.
Notes for reviewers
jnp-hipo4:4.5before 2026-07-25 09:19 UTC you may have acached fat jar from a packaging bug in the first upload (the assembly was
deployed as the main artifact). It has been corrected and re-published. Clear
~/.m2/repository/org/jlab/jnp/jnp-hipo4/4.5if the tree looks wrong; a correctmain jar is 127 classes with no
net/*packages.jnp-hipoandjnp-hipo4(org.jlab.jnp.utils.{json,file,data,…}), sincehipo-java ships its own copies. The old jar duplicated them too, so this is not
a regression — but classpath order still decides which
JsonObjectwins.Removing that overlap means hipo-java dropping
org/jlab/jnp/utilsin favour ofdepending on
jnp-hipo, which is a larger decision than this PR.