Skip to content

Conversation

@c-dilks
Copy link
Member

@c-dilks c-dilks commented May 13, 2025

Summary

  • cleanup dependencies in all POM files
    • dependency conflicts are now disallowed at compile time (e.g., ejml)
    • added CI job to enforce good dependency practices in general
  • cleanup coat-libs JAR file: now 3x smaller
  • coatjava now builds 3x faster
  • resolved conflicting names coat-lib vs. coat-libs by choosing coat-libs, which is the deployed JAR file's name
  • streamlined deployment and versioning process; see docs/dev_notes.md

Details

Cleanup Dependency tree

  • resolve conflicting dependencies (e.g., ejml, see use the same ejml version used by j4ml #636)
    • adds maven-enforcer-plugin to disallow conflicts at build time (enforce dependency convergence)
    • conflicts which are resolved by choosing an old version (ejml-simple) are now ignored by Dependabot
  • resolve transitive dependencies, using mvn dependency:analyze and mvn dependency:tree to detect them
    • doing this was similar to "untangling a knot": removing one transitive dependency would often cause something else to fail
    • added CI job to require no warnings from dependency:analyze, therefore "best" practices for dependencies is now enforced
      • coat-libs, the shaded JAR, is excluded from this test, because dependency:analyze thinks that all of coat-libs's dependencies are "unused"
  • remove unused dependencies
  • dependencyManagement is now used in the parent/pom.xml, to reduce the number of places that common dependencies have to be fully stated
    • in other words, put all the common stuff in one place to reduce repetition
    • e.g., the version of groot is only needed in parent/pom.xml, and all other pom.xml files just need to say its groupId and artifactId

It was more work than just POMs

Most of dependency cleanup was just in the POM files, but some cases I had to edit Java files too:

remove test-scoped dependency org.jlab.jnp:jnp-hipo4 from reconstruction tests

This was strange. If I scope jnp-hipo4 to test in the POM file, as suggested by mvn dependency:analyze, I would get build errors in very specific methods, for example, ECCommon.readStripsHipo:

  • my IDE (Eclipse JDT LSP) correctly sees DataEvent as org.jlab.io.base.DataEvent
  • the Maven build (maven-compiler-plugin) would get confused and think that DataEvent comes from somewhere in jnp-hipo4, even though this package was not being imported

With the help of @raffaelladevita we found that jnp-hipo4 dependency could actually be removed from all of the impacted reconstruction tests (eb, ec, cvt, alert), so we can avoid the issue altogether.

removal of transitive dependencies exposed "fake" dependencies

Not sure how to best explain this one, but in the process of "untangling" the "knot" of transitive dependencies, I had to also remove some unused imported packages from the following files (see the PR diff for what was removed):

  • clas-tracking:
    • DAFilter
    • KFitter
    • KFitterStraight
  • cnuphys/swimmer:
    • SwimZ

We have a lot more unused stuff, but that's out of scope of this giant PR. This PR's scope only aimed to make mvn dependency:analyze happy.

Removed hard-coded classpaths

We had hard-coded classpaths in many places. We now set it once in env.sh, and use that version everywhere (that I could find). The new classpath prioritizes the shaded JAR, since there are class overlaps (i.e., the class from the shaded JAR will be used if it is there); doesn't matter though, since the overlapping classes should be identical.

Using Maven deployment plugin

This makes sure that all the files necessary for a Maven repository are produced, and therefore fixes #616.

The deployment process is now streamlined; see docs/dev_notes.md for the procedure.

New deployment tree (for example, releasing version 13.0.0):

    org
    └── jlab
        └── coat
            └── coat-libs
                ├── 13.0.0
                │   ├── coat-libs-13.0.0.jar
                │   ├── coat-libs-13.0.0.jar.md5
                │   ├── coat-libs-13.0.0.jar.sha1
                │   ├── coat-libs-13.0.0.pom
                │   ├── coat-libs-13.0.0.pom.md5
                │   └── coat-libs-13.0.0.pom.sha1
                ├── maven-metadata.xml
                ├── maven-metadata.xml.md5
                └── maven-metadata.xml.sha1

cf. old deployment tree, which lacks hashes, has the wrong metadata files, and forces a non-timestamped snapshot version number:

    org
    └── jlab
        └── coat
            └── coat-libs
                ├── 13.0.0-SNAPSHOT
                │   ├── coat-libs-13.0.0-SNAPSHOT.jar
                │   ├── coat-libs-13.0.0-SNAPSHOT.pom
                │   └── maven-metadata-local.xml
                └── maven-metadata-local.xml

version-bump.sh no longer forces SNAPSHOT versioning

Now version-bump.sh will change the version to whatever you tell it, and does not append -SNAPSHOT for the POM version numbers.

Added more exclusions to the shaded JAR

  • Excluding maven metadata fixes the following warning from deployDistribution.sh:
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
  • Excluding jacoco since only used here for coverage testing
  • Excluding misc files, such as IDE dotfiles
  • Renamed coat-lib -> coat-libs, since the shaded JAR filename uses coat-libs
  • Several other 3rd party dependencies got excluded after all the dependency "knot" untangling
    • This may break consumers, but they should not be relying on coat-libs to provide those 3rd party dependencies

Excluding maven metadata fixes the following warning from
`deployDistribution.sh`:
```
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
```

Excluding `jacoco` since only used here for coverage testing
@c-dilks c-dilks changed the title fix: exclude maven metadata and jacoco from shaded JAR build!: use maven deployment and cleanup shaded JAR May 14, 2025
@c-dilks c-dilks changed the title build!: use maven deployment and cleanup shaded JAR build!: cleanup dependency tree, shaded JAR, and deploy properly May 16, 2025
@baltzell baltzell merged commit e8db494 into development May 23, 2025
68 checks passed
c-dilks added a commit that referenced this pull request May 23, 2025
baltzell pushed a commit that referenced this pull request May 23, 2025
@c-dilks c-dilks deleted the shade-fixes branch June 6, 2025 18:22
c-dilks added a commit that referenced this pull request Jul 15, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
c-dilks added a commit that referenced this pull request Jul 15, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
c-dilks added a commit that referenced this pull request Sep 15, 2025
* fix: exclude maven metadata and jacoco from shaded JAR

Excluding maven metadata fixes the following warning from
`deployDistribution.sh`:
```
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
```

Excluding `jacoco` since only used here for coverage testing

* fix: now we can use `mvn deploy`

* build: work in progress...

* doc: deployment notes

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: more progress and an unhelpful git commit message

* fix: flow control

* doc: tersify

* build: cleanup

* fix: clear `ejml` warnings

* build: untangling dependencies

* build: openjfx

* fix: more untangling

* fix: classifiers

* fix: only include `junit` where actually needed

* fix: even more untangling

* fix: resolved almost all the transitive dependencies

* fix: the knot is untangled!!!

* doc: mermaid

* doc: mermaid

* doc: mermaid

* fix: remove test-scoped dependency `org.jlab.jnp:jnp-hipo4` from reconstruction tests

This was strange. If I scope `jnp-hipo4` to `test` in the POM file, as
suggested by `mvn dependency:analyze`, I would get build errors in very
specific methods, for example, `ECCommon.readStripsHipo`:
- my IDE (Eclipse JDT LSP) correctly sees `DataEvent` as `org.jlab.io.base.DataEvent`
- the Maven build (`maven-compiler-plugin`) would get confused and think
  that `DataEvent` comes from somewhere in `jnp-hipo4`, even though this
  package was not being imported

With the help of @raffaelladevita we found that `jnp-hipo4` dependency
could actually be removed from all of the tests, so we can avoid the
issue altogether.

* fix: need `CLAS12DIR` in the test

* ci: tell dependabot to not update `ejml-simple`

* refactor: clarify which deps are for conflict resolution

* ci: dependency analysis

* fix(ci): dependence

* fix: no progress printout

* fix: stop screaming about unused shade deps

* ci: release with version number in name; open issue if fail

* fix: syntax and issue template

* test: dump classpath for tests

* perf(ci): move unit tests to their own job

* ci: update needs for `final`

* fix: exclude `coat-libs` from javadoc aggregation

* fix: DRY violation of plugin version

* fix: `coat-lib` -> `coat-libs`

* fix: exclude `coat-libs` from `javadoc` in parent POM

* fix: use `skip` configuration to self-exclude `coat-libs`

* fix: `execution`

* fix: explicit control in CI config

* fix: install all modules' JARs

* fix: env

* feat: warn if a `target` directory persists after `mvn clean`

* fix: improve installation

* fix: claspathology

* fix: source after clara

* doc: choose version 1

* test: disable fail-fast

* fix: appease clara and install `common-tools` to `lib/services`

* fix: add `cnuphys/snr` and `clas-math` to `coat-libs`, since...

...they were in the original `coat-libs` somehow

* doc: general deployment procedure

* fix: small stuff

* fix(coat-libs): `org.jlab.clas` -> `org.jlab.coat`

* fix: actually deploy

* fix(ci): `-pl` args

* fix: release permission
c-dilks added a commit that referenced this pull request Sep 15, 2025
c-dilks added a commit that referenced this pull request Sep 15, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
tongtongcao pushed a commit that referenced this pull request Sep 22, 2025
* fix: exclude maven metadata and jacoco from shaded JAR

Excluding maven metadata fixes the following warning from
`deployDistribution.sh`:
```
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
```

Excluding `jacoco` since only used here for coverage testing

* fix: now we can use `mvn deploy`

* build: work in progress...

* doc: deployment notes

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: more progress and an unhelpful git commit message

* fix: flow control

* doc: tersify

* build: cleanup

* fix: clear `ejml` warnings

* build: untangling dependencies

* build: openjfx

* fix: more untangling

* fix: classifiers

* fix: only include `junit` where actually needed

* fix: even more untangling

* fix: resolved almost all the transitive dependencies

* fix: the knot is untangled!!!

* doc: mermaid

* doc: mermaid

* doc: mermaid

* fix: remove test-scoped dependency `org.jlab.jnp:jnp-hipo4` from reconstruction tests

This was strange. If I scope `jnp-hipo4` to `test` in the POM file, as
suggested by `mvn dependency:analyze`, I would get build errors in very
specific methods, for example, `ECCommon.readStripsHipo`:
- my IDE (Eclipse JDT LSP) correctly sees `DataEvent` as `org.jlab.io.base.DataEvent`
- the Maven build (`maven-compiler-plugin`) would get confused and think
  that `DataEvent` comes from somewhere in `jnp-hipo4`, even though this
  package was not being imported

With the help of @raffaelladevita we found that `jnp-hipo4` dependency
could actually be removed from all of the tests, so we can avoid the
issue altogether.

* fix: need `CLAS12DIR` in the test

* ci: tell dependabot to not update `ejml-simple`

* refactor: clarify which deps are for conflict resolution

* ci: dependency analysis

* fix(ci): dependence

* fix: no progress printout

* fix: stop screaming about unused shade deps

* ci: release with version number in name; open issue if fail

* fix: syntax and issue template

* test: dump classpath for tests

* perf(ci): move unit tests to their own job

* ci: update needs for `final`

* fix: exclude `coat-libs` from javadoc aggregation

* fix: DRY violation of plugin version

* fix: `coat-lib` -> `coat-libs`

* fix: exclude `coat-libs` from `javadoc` in parent POM

* fix: use `skip` configuration to self-exclude `coat-libs`

* fix: `execution`

* fix: explicit control in CI config

* fix: install all modules' JARs

* fix: env

* feat: warn if a `target` directory persists after `mvn clean`

* fix: improve installation

* fix: claspathology

* fix: source after clara

* doc: choose version 1

* test: disable fail-fast

* fix: appease clara and install `common-tools` to `lib/services`

* fix: add `cnuphys/snr` and `clas-math` to `coat-libs`, since...

...they were in the original `coat-libs` somehow

* doc: general deployment procedure

* fix: small stuff

* fix(coat-libs): `org.jlab.clas` -> `org.jlab.coat`

* fix: actually deploy

* fix(ci): `-pl` args

* fix: release permission
tongtongcao pushed a commit that referenced this pull request Sep 22, 2025
tongtongcao pushed a commit that referenced this pull request Sep 22, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
tongtongcao pushed a commit that referenced this pull request Nov 18, 2025
* fix: exclude maven metadata and jacoco from shaded JAR

Excluding maven metadata fixes the following warning from
`deployDistribution.sh`:
```
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
```

Excluding `jacoco` since only used here for coverage testing

* fix: now we can use `mvn deploy`

* build: work in progress...

* doc: deployment notes

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: more progress and an unhelpful git commit message

* fix: flow control

* doc: tersify

* build: cleanup

* fix: clear `ejml` warnings

* build: untangling dependencies

* build: openjfx

* fix: more untangling

* fix: classifiers

* fix: only include `junit` where actually needed

* fix: even more untangling

* fix: resolved almost all the transitive dependencies

* fix: the knot is untangled!!!

* doc: mermaid

* doc: mermaid

* doc: mermaid

* fix: remove test-scoped dependency `org.jlab.jnp:jnp-hipo4` from reconstruction tests

This was strange. If I scope `jnp-hipo4` to `test` in the POM file, as
suggested by `mvn dependency:analyze`, I would get build errors in very
specific methods, for example, `ECCommon.readStripsHipo`:
- my IDE (Eclipse JDT LSP) correctly sees `DataEvent` as `org.jlab.io.base.DataEvent`
- the Maven build (`maven-compiler-plugin`) would get confused and think
  that `DataEvent` comes from somewhere in `jnp-hipo4`, even though this
  package was not being imported

With the help of @raffaelladevita we found that `jnp-hipo4` dependency
could actually be removed from all of the tests, so we can avoid the
issue altogether.

* fix: need `CLAS12DIR` in the test

* ci: tell dependabot to not update `ejml-simple`

* refactor: clarify which deps are for conflict resolution

* ci: dependency analysis

* fix(ci): dependence

* fix: no progress printout

* fix: stop screaming about unused shade deps

* ci: release with version number in name; open issue if fail

* fix: syntax and issue template

* test: dump classpath for tests

* perf(ci): move unit tests to their own job

* ci: update needs for `final`

* fix: exclude `coat-libs` from javadoc aggregation

* fix: DRY violation of plugin version

* fix: `coat-lib` -> `coat-libs`

* fix: exclude `coat-libs` from `javadoc` in parent POM

* fix: use `skip` configuration to self-exclude `coat-libs`

* fix: `execution`

* fix: explicit control in CI config

* fix: install all modules' JARs

* fix: env

* feat: warn if a `target` directory persists after `mvn clean`

* fix: improve installation

* fix: claspathology

* fix: source after clara

* doc: choose version 1

* test: disable fail-fast

* fix: appease clara and install `common-tools` to `lib/services`

* fix: add `cnuphys/snr` and `clas-math` to `coat-libs`, since...

...they were in the original `coat-libs` somehow

* doc: general deployment procedure

* fix: small stuff

* fix(coat-libs): `org.jlab.clas` -> `org.jlab.coat`

* fix: actually deploy

* fix(ci): `-pl` args

* fix: release permission
tongtongcao pushed a commit that referenced this pull request Nov 18, 2025
tongtongcao pushed a commit that referenced this pull request Nov 18, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
tongtongcao pushed a commit that referenced this pull request Nov 21, 2025
* fix: exclude maven metadata and jacoco from shaded JAR

Excluding maven metadata fixes the following warning from
`deployDistribution.sh`:
```
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
```

Excluding `jacoco` since only used here for coverage testing

* fix: now we can use `mvn deploy`

* build: work in progress...

* doc: deployment notes

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: more progress and an unhelpful git commit message

* fix: flow control

* doc: tersify

* build: cleanup

* fix: clear `ejml` warnings

* build: untangling dependencies

* build: openjfx

* fix: more untangling

* fix: classifiers

* fix: only include `junit` where actually needed

* fix: even more untangling

* fix: resolved almost all the transitive dependencies

* fix: the knot is untangled!!!

* doc: mermaid

* doc: mermaid

* doc: mermaid

* fix: remove test-scoped dependency `org.jlab.jnp:jnp-hipo4` from reconstruction tests

This was strange. If I scope `jnp-hipo4` to `test` in the POM file, as
suggested by `mvn dependency:analyze`, I would get build errors in very
specific methods, for example, `ECCommon.readStripsHipo`:
- my IDE (Eclipse JDT LSP) correctly sees `DataEvent` as `org.jlab.io.base.DataEvent`
- the Maven build (`maven-compiler-plugin`) would get confused and think
  that `DataEvent` comes from somewhere in `jnp-hipo4`, even though this
  package was not being imported

With the help of @raffaelladevita we found that `jnp-hipo4` dependency
could actually be removed from all of the tests, so we can avoid the
issue altogether.

* fix: need `CLAS12DIR` in the test

* ci: tell dependabot to not update `ejml-simple`

* refactor: clarify which deps are for conflict resolution

* ci: dependency analysis

* fix(ci): dependence

* fix: no progress printout

* fix: stop screaming about unused shade deps

* ci: release with version number in name; open issue if fail

* fix: syntax and issue template

* test: dump classpath for tests

* perf(ci): move unit tests to their own job

* ci: update needs for `final`

* fix: exclude `coat-libs` from javadoc aggregation

* fix: DRY violation of plugin version

* fix: `coat-lib` -> `coat-libs`

* fix: exclude `coat-libs` from `javadoc` in parent POM

* fix: use `skip` configuration to self-exclude `coat-libs`

* fix: `execution`

* fix: explicit control in CI config

* fix: install all modules' JARs

* fix: env

* feat: warn if a `target` directory persists after `mvn clean`

* fix: improve installation

* fix: claspathology

* fix: source after clara

* doc: choose version 1

* test: disable fail-fast

* fix: appease clara and install `common-tools` to `lib/services`

* fix: add `cnuphys/snr` and `clas-math` to `coat-libs`, since...

...they were in the original `coat-libs` somehow

* doc: general deployment procedure

* fix: small stuff

* fix(coat-libs): `org.jlab.clas` -> `org.jlab.coat`

* fix: actually deploy

* fix(ci): `-pl` args

* fix: release permission
tongtongcao pushed a commit that referenced this pull request Nov 21, 2025
tongtongcao pushed a commit that referenced this pull request Nov 21, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
tongtongcao pushed a commit that referenced this pull request Dec 5, 2025
* fix: exclude maven metadata and jacoco from shaded JAR

Excluding maven metadata fixes the following warning from
`deployDistribution.sh`:
```
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
```

Excluding `jacoco` since only used here for coverage testing

* fix: now we can use `mvn deploy`

* build: work in progress...

* doc: deployment notes

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: more progress and an unhelpful git commit message

* fix: flow control

* doc: tersify

* build: cleanup

* fix: clear `ejml` warnings

* build: untangling dependencies

* build: openjfx

* fix: more untangling

* fix: classifiers

* fix: only include `junit` where actually needed

* fix: even more untangling

* fix: resolved almost all the transitive dependencies

* fix: the knot is untangled!!!

* doc: mermaid

* doc: mermaid

* doc: mermaid

* fix: remove test-scoped dependency `org.jlab.jnp:jnp-hipo4` from reconstruction tests

This was strange. If I scope `jnp-hipo4` to `test` in the POM file, as
suggested by `mvn dependency:analyze`, I would get build errors in very
specific methods, for example, `ECCommon.readStripsHipo`:
- my IDE (Eclipse JDT LSP) correctly sees `DataEvent` as `org.jlab.io.base.DataEvent`
- the Maven build (`maven-compiler-plugin`) would get confused and think
  that `DataEvent` comes from somewhere in `jnp-hipo4`, even though this
  package was not being imported

With the help of @raffaelladevita we found that `jnp-hipo4` dependency
could actually be removed from all of the tests, so we can avoid the
issue altogether.

* fix: need `CLAS12DIR` in the test

* ci: tell dependabot to not update `ejml-simple`

* refactor: clarify which deps are for conflict resolution

* ci: dependency analysis

* fix(ci): dependence

* fix: no progress printout

* fix: stop screaming about unused shade deps

* ci: release with version number in name; open issue if fail

* fix: syntax and issue template

* test: dump classpath for tests

* perf(ci): move unit tests to their own job

* ci: update needs for `final`

* fix: exclude `coat-libs` from javadoc aggregation

* fix: DRY violation of plugin version

* fix: `coat-lib` -> `coat-libs`

* fix: exclude `coat-libs` from `javadoc` in parent POM

* fix: use `skip` configuration to self-exclude `coat-libs`

* fix: `execution`

* fix: explicit control in CI config

* fix: install all modules' JARs

* fix: env

* feat: warn if a `target` directory persists after `mvn clean`

* fix: improve installation

* fix: claspathology

* fix: source after clara

* doc: choose version 1

* test: disable fail-fast

* fix: appease clara and install `common-tools` to `lib/services`

* fix: add `cnuphys/snr` and `clas-math` to `coat-libs`, since...

...they were in the original `coat-libs` somehow

* doc: general deployment procedure

* fix: small stuff

* fix(coat-libs): `org.jlab.clas` -> `org.jlab.coat`

* fix: actually deploy

* fix(ci): `-pl` args

* fix: release permission
tongtongcao pushed a commit that referenced this pull request Dec 5, 2025
tongtongcao pushed a commit that referenced this pull request Dec 5, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
tongtongcao pushed a commit that referenced this pull request Dec 5, 2025
* fix: exclude maven metadata and jacoco from shaded JAR

Excluding maven metadata fixes the following warning from
`deployDistribution.sh`:
```
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
```

Excluding `jacoco` since only used here for coverage testing

* fix: now we can use `mvn deploy`

* build: work in progress...

* doc: deployment notes

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: more progress and an unhelpful git commit message

* fix: flow control

* doc: tersify

* build: cleanup

* fix: clear `ejml` warnings

* build: untangling dependencies

* build: openjfx

* fix: more untangling

* fix: classifiers

* fix: only include `junit` where actually needed

* fix: even more untangling

* fix: resolved almost all the transitive dependencies

* fix: the knot is untangled!!!

* doc: mermaid

* doc: mermaid

* doc: mermaid

* fix: remove test-scoped dependency `org.jlab.jnp:jnp-hipo4` from reconstruction tests

This was strange. If I scope `jnp-hipo4` to `test` in the POM file, as
suggested by `mvn dependency:analyze`, I would get build errors in very
specific methods, for example, `ECCommon.readStripsHipo`:
- my IDE (Eclipse JDT LSP) correctly sees `DataEvent` as `org.jlab.io.base.DataEvent`
- the Maven build (`maven-compiler-plugin`) would get confused and think
  that `DataEvent` comes from somewhere in `jnp-hipo4`, even though this
  package was not being imported

With the help of @raffaelladevita we found that `jnp-hipo4` dependency
could actually be removed from all of the tests, so we can avoid the
issue altogether.

* fix: need `CLAS12DIR` in the test

* ci: tell dependabot to not update `ejml-simple`

* refactor: clarify which deps are for conflict resolution

* ci: dependency analysis

* fix(ci): dependence

* fix: no progress printout

* fix: stop screaming about unused shade deps

* ci: release with version number in name; open issue if fail

* fix: syntax and issue template

* test: dump classpath for tests

* perf(ci): move unit tests to their own job

* ci: update needs for `final`

* fix: exclude `coat-libs` from javadoc aggregation

* fix: DRY violation of plugin version

* fix: `coat-lib` -> `coat-libs`

* fix: exclude `coat-libs` from `javadoc` in parent POM

* fix: use `skip` configuration to self-exclude `coat-libs`

* fix: `execution`

* fix: explicit control in CI config

* fix: install all modules' JARs

* fix: env

* feat: warn if a `target` directory persists after `mvn clean`

* fix: improve installation

* fix: claspathology

* fix: source after clara

* doc: choose version 1

* test: disable fail-fast

* fix: appease clara and install `common-tools` to `lib/services`

* fix: add `cnuphys/snr` and `clas-math` to `coat-libs`, since...

...they were in the original `coat-libs` somehow

* doc: general deployment procedure

* fix: small stuff

* fix(coat-libs): `org.jlab.clas` -> `org.jlab.coat`

* fix: actually deploy

* fix(ci): `-pl` args

* fix: release permission
tongtongcao pushed a commit that referenced this pull request Dec 5, 2025
tongtongcao pushed a commit that referenced this pull request Dec 5, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
tongtongcao pushed a commit that referenced this pull request Dec 31, 2025
* fix: exclude maven metadata and jacoco from shaded JAR

Excluding maven metadata fixes the following warning from
`deployDistribution.sh`:
```
[WARNING] Artifact org.jlab.coat:coat-libs JAR (about to be
installed/deployed) contains Maven Plugin metadata for conflicting
coordinates: org.jacoco:jacoco-maven-plugin. Your JAR contains rogue
Maven Plugin metadata. Possible causes may be: shaded into this JAR some
Maven Plugin or some rogue resource.
```

Excluding `jacoco` since only used here for coverage testing

* fix: now we can use `mvn deploy`

* build: work in progress...

* doc: deployment notes

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: mermaid

* fix: more progress and an unhelpful git commit message

* fix: flow control

* doc: tersify

* build: cleanup

* fix: clear `ejml` warnings

* build: untangling dependencies

* build: openjfx

* fix: more untangling

* fix: classifiers

* fix: only include `junit` where actually needed

* fix: even more untangling

* fix: resolved almost all the transitive dependencies

* fix: the knot is untangled!!!

* doc: mermaid

* doc: mermaid

* doc: mermaid

* fix: remove test-scoped dependency `org.jlab.jnp:jnp-hipo4` from reconstruction tests

This was strange. If I scope `jnp-hipo4` to `test` in the POM file, as
suggested by `mvn dependency:analyze`, I would get build errors in very
specific methods, for example, `ECCommon.readStripsHipo`:
- my IDE (Eclipse JDT LSP) correctly sees `DataEvent` as `org.jlab.io.base.DataEvent`
- the Maven build (`maven-compiler-plugin`) would get confused and think
  that `DataEvent` comes from somewhere in `jnp-hipo4`, even though this
  package was not being imported

With the help of @raffaelladevita we found that `jnp-hipo4` dependency
could actually be removed from all of the tests, so we can avoid the
issue altogether.

* fix: need `CLAS12DIR` in the test

* ci: tell dependabot to not update `ejml-simple`

* refactor: clarify which deps are for conflict resolution

* ci: dependency analysis

* fix(ci): dependence

* fix: no progress printout

* fix: stop screaming about unused shade deps

* ci: release with version number in name; open issue if fail

* fix: syntax and issue template

* test: dump classpath for tests

* perf(ci): move unit tests to their own job

* ci: update needs for `final`

* fix: exclude `coat-libs` from javadoc aggregation

* fix: DRY violation of plugin version

* fix: `coat-lib` -> `coat-libs`

* fix: exclude `coat-libs` from `javadoc` in parent POM

* fix: use `skip` configuration to self-exclude `coat-libs`

* fix: `execution`

* fix: explicit control in CI config

* fix: install all modules' JARs

* fix: env

* feat: warn if a `target` directory persists after `mvn clean`

* fix: improve installation

* fix: claspathology

* fix: source after clara

* doc: choose version 1

* test: disable fail-fast

* fix: appease clara and install `common-tools` to `lib/services`

* fix: add `cnuphys/snr` and `clas-math` to `coat-libs`, since...

...they were in the original `coat-libs` somehow

* doc: general deployment procedure

* fix: small stuff

* fix(coat-libs): `org.jlab.clas` -> `org.jlab.coat`

* fix: actually deploy

* fix(ci): `-pl` args

* fix: release permission
tongtongcao pushed a commit that referenced this pull request Dec 31, 2025
tongtongcao pushed a commit that referenced this pull request Dec 31, 2025
The `$JYPATH` variable is used by some consumers (_e.g._, `j2root`) to set
the class path for `run-groovy`. We lost the ability to customize this
variable in #632. This PR
restores the desired functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants