Repository navigation
Conversation
maximthomas
left a comment
There was a problem hiding this comment.
praise: The change removes the warnings it targets, and the POMs say why.
pom.xml:766-767states why the old JAXB coordinates go, and the CI logs bear it out:jvnet-nexus-*andrso-public-gridwarnings on 6 rows at the base, on none of the 9 rows at this head.persistit/core/pom.xml:87drops theasm7.3.1 pin, which would have downgraded the asm 9.1 thatrmic4.2.5 depends on.- The OSGi
Import-Packageofjson-web-tokenandapi-descriptoris byte-identical to the base (javax.xml.bind;version="[2.3,3)").
question (blocking): Is dropping the managed versions of javax.xml.bind:jaxb-api and com.sun.xml.bind:jaxb-core meant to make OpenDJ and OpenAM pin or migrate them when they take this release, or should the parent keep managing them?
pom.xml:766-782
OpenDJ master imports this parent as a BOM (pom.xml:159-166). Its opendj-core/pom.xml:82-89 declares both artifacts without a version, and so does OpenAM master's openam-core/pom.xml:459-466, which gets the BOM through opendj-parent. Neither root POM manages them. A scratch consumer of that shape resolves against the base parent and fails against this head with 'dependencies.dependency.version' for javax.xml.bind:jaxb-api:jar is missing. If the parent should keep managing them, add the entries back next to the new ones. A managed entry is only resolved when some module uses it, and none does here. With the block below, dependency:tree over all 103 modules shows no jaxb-api, jaxb-core or javax.activation-api; the same filter finds them in 34 module trees at the base. So jvnet-parent stays out of this build. If the break is intended, it belongs in the release notes, and the enforcer rule in the next comment pins that these coordinates stay out. I have not checked OpenIDM or other consumers.
<!-- Still managed for consumers that declare them without a version (OpenDJ opendj-core,
OpenAM openam-core); no module of this build depends on them -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0.1</version>
</dependency>suggestion (non-blocking): Nothing in the build keeps javax.xml.bind:jaxb-api and com.sun.xml.bind:jaxb-core out.
pom.xml:766, :1391
The root POM only manages maven-enforcer-plugin 3.0.0-M2 and binds no execution. Any new or bumped dependency that depends on jaxb-api would bring back the jvnet-parent:5 artifact and a second javax.xml.bind jar, and the only symptom would be the warning this PR removes. I ran the rule below with an offline mvn validate. At the base it fails at api-descriptor with Found Banned Dependency: javax.xml.bind:jaxb-api:jar:2.3.1 (and jaxb-core:2.3.0.1). At this head it passes in 92 of 103 modules. The 93rd, httpdump, stopped on an unpackaged sibling snapshot in that validate-only run, not on the rule. It also works with the fix above, because a managed entry is not a resolved dependency.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>ban-jvnet-jaxb</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<!-- Their parent net.java:jvnet-parent declares the defunct maven.java.net repositories -->
<excludes>
<exclude>javax.xml.bind:jaxb-api</exclude>
<exclude>com.sun.xml.bind:jaxb-core</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>Pin: placed in the root <build><plugins> (line 1391, after </pluginManagement>), it makes the base build red and keeps this head green.
question (non-blocking): Should json-web-token stay usable by consumers whose BOM manages jakarta.xml.bind:jakarta.xml.bind-api at 3.x/4.x?
commons/json-web-token/pom.xml:100-111, commons/rest/api-descriptor/pom.xml:96-107
Both modules now get javax.xml.bind under the GA that JAXB 3.x/4.x publishes. A consumer that manages that GA at 3.0.1 swaps in a jar with no javax/xml/bind/DatatypeConverter.class. Then SupportedEllipticCurve.java:284 and CrestStringSchema.java:141, :151 throw NoClassDefFoundError, unless javax.xml.bind arrives some other way. OpenAM's features/jaxb3-update-2026-05-19 manages 3.0.1 (pom.xml:1737-1739), and today only opendj-core's jaxb-api hides the problem there. A consumer that also declares jaxb-api/jaxb-core (OpenAM master openam-core) now gets two jars each for javax.xml.bind, com.sun.istack and com.sun.xml.txw2, because Maven cannot mediate across GAs. Minor as long as no consumer relies on this; Major if it should be supported. Either way, worth a line in the release notes. The lasting fix is to drop JAXB from both modules. The main code uses DatatypeConverter on only those three lines, but I have not checked JDK replacements for equivalence.
suggestion (non-blocking): Say in the PR description that the org.json 20231013 → 20260814 bump changes how non-RFC numbers parse.
pom.xml:821
OpenAM has no org.json entry of its own, so it gets this version through opendj-parent. I ran the same calls against both jars. {"a":01} and {"a":.5} come back as Integer 1 and BigDecimal 0.5 at 20231013, but as String at 20260814. After that, getNumber/getInt throw JSONException and optInt returns its default. Valid RFC 8259 numbers (1.0, -0) parse the same in both.
issue (non-blocking): A JAXB 3 consumer that declares json-web-token before jaxb-runtime now gets txw2 2.3.2 and istack-commons-runtime 3.0.8 under jaxb-runtime 3.0.2.
commons/json-web-token/pom.xml:104-111
The new artifacts use the same GAs as JAXB 3.x/4.x, so Maven keeps one version, and here it picks this module's. All of jaxb-runtime 3.0.2's references to these packages resolve against 2.3.2/3.0.8 except one. com.sun.istack.ByteArrayDataSource implements javax.activation.DataSource in 3.0.8 and jakarta.activation.DataSource in 4.0.1. Unmarshalling inline base64 into a DataHandler/Source property would therefore hit IncompatibleClassChangeError. Not run: that needs a JAXB 3 DataHandler unmarshal, and the OpenAM JAXB 3 branch has no such use. At the base the same hazard depended on jar order through jaxb-core 2.3.0.1.
suggestion (non-blocking): No test needs jaxb-impl, txw2 or istack-commons-runtime in json-web-token or api-descriptor.
commons/json-web-token/pom.xml:100-115, commons/rest/api-descriptor/pom.xml:96-111
The main code of both modules uses only javax.xml.bind.DatatypeConverter. Its implementation ships in the API jar (javax/xml/bind/DatatypeConverterImpl.class is in jakarta.xml.bind-api-2.3.3.jar). No class references JAXBContext, Marshaller, com.sun.istack or com.sun.xml.txw2. So removing the runtime trio would leave every test green (inferred, not run).
Pin: either drop the three runtime artifacts from both modules in a follow-up, or, if a consumer relies on getting the JAXB runtime from here, add a test that creates a JAXBContext. Without the trio, that test goes red.
suggestion (non-blocking): No test in this repo exercises org.json:json.
pom.xml:821
No main or test source imports org.json.*; launcher-zip only bundles the jar. So no test here can pin the parsing change above. The pin would be a consumer-side test (OpenAM) that parses its own payloads.
nitpick (non-blocking): "Three places in the build reach jvnet-parent; this PR removes all three" claims more than the change does.
pom.xml:766
javax.annotation-api 1.3.1 (json-resource-examples, doc-maven-plugin) and 1.2 (the maven-surefire-plugin 3.1.2 classpath) still inherit jvnet-parent:3, which declares jvnet-nexus-snapshots. jersey 1.18.3 (test scope, client-apache-sync/-async) inherits jvnet-parent:4, which declares no repository. They cause no warning because javax.annotation-api has no dependencies, so Maven never queries the repository it inherits. Better wording: "the three paths that make Maven query maven.java.net".
note (non-blocking): The Tests section does not match the modules it lists.
- PR description, Tests:
json-schema/core"(111,org.json)" andlauncher"(9,org.json)" depend oncom.googlecode.json-simple, notorg.json:json.
Several artifacts inherit net.java:jvnet-parent, which declares the maven.java.net repositories; Maven fails to fetch /.meta/prefixes.txt from them (expired certificate) and warns on every build. - Replace javax.xml.bind:jaxb-api:2.3.1 with jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 (same javax.xml.bind package), and com.sun.xml.bind:jaxb-core:2.3.0.1 with org.glassfish.jaxb:txw2:2.3.2 plus com.sun.istack:istack-commons-runtime:3.0.8, which carry the com.sun.xml.txw2 and com.sun.istack classes jaxb-impl 2.3.2 no longer bundles. - Update the rmic plugin dependency org.glassfish.corba:rmic to 4.2.5 and drop the explicit asm 7.3.1 that would downgrade the asm 9.1 it requires. - Update org.json:json to 20260814: 20231013 declares nexus-staging-maven-plugin as an extension, whose jersey 1.17.1 dependencies inherit jvnet-parent and get loaded when maven-assembly-plugin builds the launcher zip.
Both modules only used javax.xml.bind.DatatypeConverter: decode the curve seeds and parse the date formats with JDK code instead, so they no longer pass jaxb-api, jaxb-core, jaxb-impl or javax.activation-api on to their users. Keep jaxb-api and jaxb-core managed for consumers that declare them without a version, and ban them and javax.activation-api, whose parent net.java:jvnet-parent declares the maven.java.net repositories. framework-functional-tests now gets javax.xml.bind for rest-assured from jakarta.xml.bind-api in test scope.
b6977af to
e697010
Compare
|
Round 1 is in e697010, and the branch is rebased onto the current master. The description is updated. 1. question (blocking), managed 2. suggestion, enforcer: added as 3. question, consumers that manage
So a consumer has no 4. suggestion, 5. issue, 6. suggestion, the runtime trio: dropped together with the API. One module did rely on it. I checked the consumers on master, simulating the change against their BOMs:
The description lists this for the release notes. 7. suggestion, no test of 8. nitpick, "all three": reworded to "Three dependency paths make Maven query 9. note, the Tests section: fixed. |
Every build warns:
Maven asks every remote repository it meets for
/.meta/prefixes.txt, including the repositories declared in the POMs of dependencies and plugins. Thejvnet-nexus-*repositories come fromnet.java:jvnet-parent; java.net was shut down and the certificate ofmaven.java.nethas expired. The build itself is not affected, all artifacts come from Central. Three dependency paths make Maven querymaven.java.net; this PR removes all three.JAXB
javax.xml.bind:jaxb-api:2.3.1(viajaxb-api-parent) andcom.sun.xml.bind:jaxb-core:2.3.0.1(viajaxb-bom:2.3.0.1) inheritjvnet-parent:5, which declaresjvnet-nexus-releases.jaxb-apialso bringsjavax.activation:javax.activation-api:1.2.0, whose parentcom.sun.activation:all:1.2.0inheritsjvnet-parent:1and itsjvnet-nexus-snapshots.json-web-tokenandapi-descriptordepended on them, together withjaxb-impl, and passed them on to every module that uses them,json-resourceamong them.Both modules only used
javax.xml.bind.DatatypeConverter, so they no longer depend on JAXB at all:SupportedEllipticCurvedecodes the hex seeds of the curves itself instead ofparseHexBinary.CrestStringSchemavalidates thedate-timeanddate/full-dateformats withjavax.xml.datatype.DatatypeFactoryfrom the JDK, which is whatDatatypeConverterImplcalled:parseDateTimeisnewXMLGregorianCalendar(...).toGregorianCalendar()after trimming XML white space,parseDateis the same without trimming. Run side by side over 32 inputs (valid and invalid values, surrounding white space,\u000b,, years beyond 9999,24:00:00), the old and the new code give the same result for each. The newCrestStringSchemaTestpins 24 of them and passes both before and after the change.json-web-tokenreplaceparseHexBinaryandprintHexBinarythe same way.The OSGi bundles of both modules no longer import
javax.xml.bind;api-descriptorimportsjavax.xml.datatypefrom the JRE instead.framework-functional-testsgotjavax.xml.bindonly throughapi-descriptor, and rest-assured 2.x loads it when it starts. It now declaresjakarta.xml.bind-api:2.3.3, the samejavax.xml.bindAPI withorg.eclipse.ee4j:projectas its parent, in test scope.The root POM still manages
jaxb-api,jaxb-coreandjaxb-impl: OpenDJopendj-coreand OpenAMopenam-coreandopenam-xacml3-schemadeclare them without a version and get it from this POM as a BOM. No module of this build depends on them, and the newban-jvnet-parentenforcer rule fails the build ifjaxb-api,jaxb-coreorjavax.activation-apicome back.rmic in
persistit/coreThe plugin dependency
org.glassfish.corba:rmic:4.2.0-b007and the CORBA, PFL and Gmbal artifacts it brings inheritjvnet-parent:5. It is updated to4.2.5, whose tree has no java.net parent. The explicitorg.ow2.asm:asm:7.3.1is removed:rmic:4.2.5depends on asm 9.1, and the pin would downgrade it.This step generates nothing either before or after the change, although it logs
Compiling 1 remote classes. The plugin swallows the compiler error and the build passes:ASM8_EXPERIMENTAL can only be used by classes compiled with --enable-preview(the old rmic does not work with asm 7.3.1);Unsupported class file major version 71(asm 9.1 cannot read the JDK 27 classes);_Stubclass either.So the content of the jar does not change. Whether the step is needed at all is left for a separate change.
org.json
org.json:json:20231013declaresnexus-staging-maven-plugin:1.6.3as a build extension. Whenlauncher-zipis assembled,maven-assembly-plugin:3.1.0builds the models of the dependencies and loads that extension. Itsjersey1.17.1 dependencies inheritjvnet-parent:1, sojvnet-nexus-snapshotscomes back;rso-public-grid(fromnexus-parent), whose host no longer resolves, comes the same way.org.jsonis updated to20260814, whose POM has no such extension. 20240205 to 20260522 still declare it; 20260719 comments it out.The update changes how numbers that RFC 8259 does not allow are parsed, and 20260719 parses them the same way, so no version without the extension keeps the old behaviour.
{"a":01},{"a":007}and{"a":.5}gaveInteger 1,Integer 7andBigDecimal 0.5at 20231013; at 20260814 they give the strings"01","007"and".5", sogetNumberandgetIntthrowJSONExceptionandoptIntreturns its default. Valid numbers (1.0,-0,1e3) parse the same. No code of this repository usesorg.json;launcher-ziponly bundles the jar.Other
jvnet-parentartifactsjavax.annotation:javax.annotation-api1.3.1 and 1.2, which some modules and plugin classpaths still use, inheritjvnet-parent:3, which declaresjvnet-nexus-snapshots, andjersey1.18.3 inheritsjvnet-parent:4, which declares repositories only in profiles. They cause no warning:javax.annotation-apihas no dependencies, so Maven never queries the repository it inherits.For consumers
json-web-token,api-descriptorand the modules that depend on them (json-resource,json-resource-http,http-framework/oauth2, the JWT and OpenID Connect JASPI modules,selfservice/stages, ...) no longer bringjaxb-api,jaxb-core,jaxb-implorjavax.activation-api. A module that usesjavax.xml.bindand got it only this way has to declare it. Checked on master of the consumers, with the change simulated against their BOMs:openidm-script(ScriptRegistryService,DatatypeConverter.printHexBinary) andopenidm-maintenance(ChecksumFile,HexBinaryAdapter) would no longer compile (openidm-script and openidm-maintenance compile against JAXB that only commons brings in OpenIDM#261). The distribution is not affected: its bundle directory gets the same 336 artifacts, the JAXB ones throughjackson-module-jaxb-annotationsandopendj-core.openig-warthroughopendj-coreandopenam-xacml3-schema; the WAR gets the same 278 artifacts.json-web-tokenandapi-descriptorwithout JAXB, and those jars no longer reference it.org.jsonparsing change above reaches OpenAM, which takes theorg.jsonversion from this BOM.Tests
mvn verifyof the whole reactor on JDK 27 with network access got to module 97 of 103, the tests ofpersistit/core, without a failure before it was stopped for lack of memory on the machine. Neitherjvnet-nexus-*norrso-public-gridappears in its log, and theban-jvnet-parentrule passed in every module it reached. The rest (persistit/core,persistit/ui,script/*,cassandra-embedded) is left to CI, together with the other JDKs of the matrix. The modules that changed passed their tests:json-web-token(328),api-descriptor(290, 24 of them new) andframework-functional-tests(72 integration tests). The rule itself failsjson-web-tokenwhen it is given ajaxb-apidependency (Found Banned Dependency: javax.xml.bind:jaxb-api:jar:2.3.1, andjavax.activation-api:1.2.0through it). No test in this repository exercisesorg.json.