Repository navigation
Maven Central pilot: licence, Central's POM metadata, the licence check, publishing - #29
adamjohnwright wants to merge 12 commits into
Conversation
…ck, publishing - LICENSE: Apache-2.0; <licenses> and graph-core's own <scm> in the POM. - The parent is reactome-parent 1.0.7 (its pilot branch), whose licence check the build turns on; the POM put in tidy's order, which the parent checks. - .github/workflows/maven.yml: built, packaged and its licences checked on every pull request (its tests need a Reactome graph: next step); on a v* tag signed and uploaded to the Central Portal behind the maven-central environment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lasses AspectJ compiled the sources itself, so javac had nothing to compile and its lint never ran. javac now compiles with -Xlint:all (but path), and the maintained AspectJ plugin weaves the compiled classes, main and test: the same 684 join points as before. Every domain class gets a serialVersionUID, and ReflectionUtils no longer treats a class's constants as fields to fill (it printed the refusal for every object built); a test, seen failing without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 120 rawtypes, unchecked, redundant-cast and deprecation warnings are gone, with no change in behaviour and the same erased signatures: - raw Class, Collection, Iterator and List become Class<?> (or Class<T> where the method already has a T), Collection<?>, Iterator<SchemaNode>; the public methods keep their names, parameters and erased descriptors - where the caller picks T (getByClassName, fetchSingleValue, getObject, the repositories' find methods), the cast stays and an @SuppressWarnings ("unchecked") on the smallest method or local says why - PersonService's eight casts to the type already returned are dropped - AdvancedLinkageService loses a private field of the deprecated AdvancedLinkageRepository that was never set or read - tests: SerializationTest reads maps through a TypeReference, the test factory builds through getDeclaredConstructor().newInstance() with the same outcome for each failure, and the tests of deprecated methods say so Compared with javap against this commit's parent, only DatabaseObjectUtils (one extra local for the suppressed cast) and AdvancedLinkageService (the field) differ, beyond AspectJ's line numbers and member order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Inherits the parent's compiler settings (any warning fails the build) and adds -proc:none: no processor is used, and log4j's warned on every compile. The JetBrains annotations, compile-only, so a dependency's @contract no longer warns. One maven-source-plugin declaration, not two. javadoc's doclint: the authors' addresses escaped, one empty paragraph gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Formatting only (mvn spotless:apply): no other change. The woven join points are the same 684. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… can query(String, Map, Class<T>) cast the client's fetch specification itself to T and threw on every call; it now returns the template's mapped result. CI built with -Dmaven.test.skip, which skips compiling the tests too: now every test is compiled, linted and woven, and those needing no graph run. The test plugins' --illegal-access=permit, which Java 17 ignores, is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Behaviour compared, old jar against new. Built at 2b64ddf, before the strict work, and at 45f7107. One program was run against each jar and the outputs diffed:
The comparison can see a difference. With the old Behaviour that does change:
🤖 Generated with Claude Code |
AspectJ wove target/classes in place, so a build without clean wove classes that were already woven: 150 advised methods gained a second closure, and the logging advice ran twice for each service call. javac now writes target/unwoven-classes (and unwoven-test-classes), and AspectJ weaves from there into target/classes. Checked: a clean build gives the same 271 closures as before; a second build without clean leaves target/classes byte-identical; against the clean build before this change, only builddef.lst (the weaver's arguments) and the order of one synthetic method in LazyFetchAspect differ. CI now builds a second time without clean and fails if the closure count changes: it fails without this change (271, then 421) and passes with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f the jar From the adversarial review of c30c91e: - Test classes were woven twice as well (218 closures, then 436). The CI check now compares main and test counts; with only the test weave put back in place it fails (271 218, then 271 436), and passes with this branch. - The jar shipped builddef.lst, the weaver's arguments with the build machine's paths; it is now excluded. - Correction to c30c91e's message: a rebuild is not byte-identical. ajc orders one synthetic method of LazyFetchAspect differently from run to run (members and closures are the same); that was so before this branch too. - Not changed: classes of a deleted source stay until a clean build, as before; the release job builds from a fresh checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Same answers as The whole suite ran twice against the same graph: once at
🤖 Generated with Claude Code |
|
The repositories that build on graph-core, built against Each was built twice from its default branch: once with graph-core
🤖 Generated with Claude Code |
graph-core's POM on Central stays there, and its repositories with it. EBI's Nexus is going away, and the BioPAX repository was plain http, which Maven refuses anyway, so the POM names none: everything graph-core needs is on Central. A build check fails if the POM names a repository again. The developers are the current maintainers. Built and verified (tidy, licences, the test that needs no graph) with an empty local repository: every artifact came from Central, the parent from reactome-parent's pilot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n published As reactome-parent's review found for its POMs: the SCM addresses were not URLs (ssh://github.com:...) or used git://, which GitHub no longer serves. checkout and setup-java are pinned to their release commits, since the publish job holds the signing key and the Central token. The publish job stops unless the tag is on main, is v<the POM's version>, and that version is not a SNAPSHOT (each refusal seen, and a matching tag on main seen passing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pilot, for review; not to merge yet. It's the second half of reactome/reactome-parent#4, which explains the purpose and holds the decisions for review. This shows the pattern on the most-used library.
LICENSE: Apache-2.0. The POM gets<licenses>and graph-core's own<scm>; otherwise it would inherit reactome-parent's, which points at the wrong repository.reactome-parent1.0.7, the pilot's. The build turns on its dependency licence check. graph-core's 35 shipped dependencies all pass: Apache, MIT, BSD and EPL, plus four under a choice of licences, each passing on its permissive option. Seen failing with EPL removed.tidy's order, which the parent checks: elements reordered and blank lines added, nothing else..github/workflows/maven.yml: graph-core had no CI.v*tag: signed and uploaded to the Central Portal, behind themaven-centralenvironment.mvn verifybuilds the three jars and passes the licence check.reactome-base, the MySQL-era library, is test-scoped here, so it isn't shipped.http://BioPAX one. The version stays3.0.0-SNAPSHOT, and the release version is the maintainers' choice (reactome-parent's decision A).Added 25 Nov: builds under the strict parent
dev.aspectj's plugin weaves the compiled classes, main and test. It's the same 684 join points as before, the same advice order, and the jar's resources are unchanged.-Xlint:all,-path(it was 232):@SuppressWarningsonly where a public method is inherently unchecked (the caller picksT);serialVersionUID..git-blame-ignore-revs.ReflectionUtilsfilled static fields too. It would have printedserialVersionUIDto stderr for every Person built. Now covered by a test, seen failing.CRUDRepository.query(String, Map, Class<T>)threw on every call. It now returns the template's mapped result; not yet tried against a graph.For downstream code:
DatabaseObjectUtils.getClassForName,SchemaNode.getClazz()andAttributeClass.getType()now returnClass<?>, not rawClass. Binaries built against the old jar still work. But source that assigns one straight toClass<? extends X>must add a cast orasSubclasswhen it recompiles.serialVersionUID.Merge with a merge commit, not squash or rebase, or
.git-blame-ignore-revsnames a commit that isn't onmain.Open PRs (#17, #20, #21, #25, #26) will conflict with the formatting commit. The easy way through: on the PR's branch, first merge the commit just before 7b6e55f, then run
mvn spotless:applyand commit. Then mergemain: both sides are formatted the same way, so only real changes conflict.Not yet run: the tests that need a Reactome graph. They're next: a fixture slice in a Neo4j container on every PR, and the full release graph weekly.
Added 26 Nov: aspects woven once
AspectJ wove
target/classesandtarget/test-classesin place, so a build withoutcleanwove classes that were already woven. Advised methods gained a second closure (271 → 421 in the main classes, 218 → 436 in the tests), and their advice, such as the logging aspect's, ran twice per call. This was also true before this branch.target/unwoven-classesandtarget/unwoven-test-classes, and AspectJ weaves from there intotarget/classesandtarget/test-classes.cleanand fails if either closure count changes. It fails with the old layout, and with only the test weave put back in place.LazyFetchAspect, which ajc varies from run to run anyway.builddef.lst, the weaver's arguments, which include the build machine's paths.🤖 Generated with Claude Code