Skip to content

build!: migrate clasweb/clas12maven dependencies to code.jlab.org - #1461

Draft
c-dilks wants to merge 33 commits into
developmentfrom
jclara-6.1
Draft

c-dilks wants to merge 33 commits into
developmentfrom
jclara-6.1

Conversation

@c-dilks

@c-dilks c-dilks commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

The primary goal here is to migrate away from clasweb's Maven repo, in favor of code.jlab.org package registries; reasons:

  • mitigate routine clasweb access denial by Cloudflare
  • add provenance to our binary dependencies (i.e., JAR files)
  • allow for maintenance and preservation of these dependencies

It only addresses those on clas12maven; those on jhep/maven are out of this PR's scope.

For many dependencies, the migration was straightforward; in some cases, the dependency was removed entirely. The following sections describe each.

Straightforward Dependency Migrations

Most of the changes in these dependencies are for deploying them to their package registries; here are their release notes:

ccdbrcdb

et

Held back on the clasweb version for now, but a new version is available. Since this is risky, it'll be bumped in its own PR.

groot

jclara

jevio

Held back on the clasweb version for now, but a new version is available. Since this is risky, it'll be bumped in its own PR.

xmsg

Dependency Removals

The following dependencies are no longer needed and therefore have been removed completely:

jtools

We only use org.jlab.clas12.tools.MimeType and org.jlab.clas12.tools.property.JPropertyList, in one of the two Clas12Types classes; I updated that class to be more like the other one, removing the need for jtools completely.

trackfitter

We are only using its LineFitter, LineFitPars, and ProbChi2perNDF.

Here is a repository showing the decompiled JAR file (you must be signed in):

LineFitter and LineFitPars are only consumed by dc module, which has its own versions of these classes already.

  • the decompiled trackfitter version is practically the same as our dc module's version
  • trackfitter's LineFitter.fitStatus method has double[] parameters, whereas the dc module's version has List<double> parameters
    • both versions are called, but I'm not sure which is actually more commonly called at runtime
    • the double[] version is more commonly used in the source code, whereas the List<double> version is only used in one class
  • implemented changes:
    • I changed the dc module's fitStatus method to take double[] parameters, and added an overload taking List<double> parameters
    • overloading like this rather than the other way around avoids boxing in any hot loop

On the other hand, ProbChi2perNDF does not appear to be implemented anywhere in coatjava. I decompiled trackfitter's JAR file, and rewrote this function using apache's common-math3. The edge-case handling remains the same, and is actually consistent with ROOT's TMath::Prob function.

Special Cases

jminuit

We currently consume org.freehep:jminuit:1.0 from clasweb, and only the rich module uses it. This version is binary equivalent to org.freehep:freehep-jminuit:1.0.1 hosted at SLAC: https://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public/

I decided to bump this to the 1.0.2 version from SLAC

Cleaning Shaded JAR (a.k.a. coat-libs-*.jar uber JAR)

Some of these clasweb dependencies are also being shaded (included in our uber JAR), mostly for downstream consumers such as mon12 and calcode. Many of them are unused. The following are removed:

  • org.freehep:jminuit (actually, calcode may be consuming this transitively, but we should have calcode consume this directly instead)
  • org.jama:jamapack
  • org.jlab.plugins:jMath
  • de.erichseifert:vectorgraphics2d
  • net.objecthunter:exp4j

@c-dilks

c-dilks commented Sep 28, 2026

Copy link
Copy Markdown
Member Author

sorta conflicts with #1449, but I wanted to test this independently of that PR

@c-dilks c-dilks changed the title build(deps): bump org.jlab.coda:jclara to 6.1 build(deps): bump jclara to 6.2 and xmsg to 2.5 Sep 28, 2026
@c-dilks
c-dilks marked this pull request as draft September 28, 2026 20:57
@c-dilks
c-dilks marked this pull request as ready for review September 29, 2026 12:36
@c-dilks c-dilks added maven dependencies Pull requests that update a dependency file and removed maven labels Sep 29, 2026
@c-dilks c-dilks changed the title build(deps): bump jclara to 6.2 and xmsg to 2.5 build(deps): bump jclara, xmsg, ccdbrcdb Sep 29, 2026
@c-dilks c-dilks added maven and removed dependencies Pull requests that update a dependency file labels Sep 29, 2026
@c-dilks c-dilks changed the title build(deps): bump jclara, xmsg, ccdbrcdb build: reduce dependence on clasweb's maven repo Sep 29, 2026
@c-dilks
c-dilks marked this pull request as draft September 29, 2026 21:28
@c-dilks c-dilks changed the title build: reduce dependence on clasweb's maven repo build: mitigate cloudflare access denials by reducing dependence on clasweb's maven repo Sep 29, 2026
Comment thread pom.xml Outdated
<artifactId>jevio</artifactId>
<classifier>jar-with-dependencies</classifier>
<version>6.2-SNAPSHOT</version>
<version>6.2.1</version>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to verify this new version of jevio is consistent with the version we've been using... it's our data format

Comment thread pom.xml Outdated
@c-dilks c-dilks changed the title build: mitigate cloudflare access denials by reducing dependence on clasweb's maven repo build: migrate clasweb/clas12maven dependencies to code.jlab.org Oct 2, 2026
@c-dilks c-dilks changed the title build: migrate clasweb/clas12maven dependencies to code.jlab.org build!: migrate clasweb/clas12maven dependencies to code.jlab.org Oct 3, 2026

This branch has not been deployed

No deployments
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.

1 participant