From 7c8237e524d699c0eb1a9fcaaa1bbdaf418c0262 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 13 Feb 2026 19:26:30 -0900 Subject: [PATCH 01/16] Initial refactor to support Java 17, add jaxb libs. See issue #5. --- pom.xml | 151 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 81 insertions(+), 70 deletions(-) diff --git a/pom.xml b/pom.xml index 46a1328c..c1b0d1be 100644 --- a/pom.xml +++ b/pom.xml @@ -1,17 +1,19 @@ - + 4.0.0 org.dataone d1_libclient_java jar - 2.3.1 + 2.4.0-SNAPSHOT DataONE Java Client Library http://dataone.org UTF-8 1.52 - 2.3.0 + 2.4.2 2.3.0 - 1.7 + 17 @@ -26,7 +28,7 @@ dataone.org - http://maven.dataone.org/ + https://maven.dataone.org/ true @@ -36,18 +38,30 @@ Jibx Maven Repository - http://jibx.sourceforge.net/maven/ + https://jibx.sourceforge.net/maven/ maven2-repository.dev.java.net Java.net Repository for Maven - http://download.java.net/maven/2/ + https://download.java.net/maven/2/ default + + + jakarta.xml.bind + jakarta.xml.bind-api + 2.3.2 + + + + org.glassfish.jaxb + jaxb-runtime + 2.3.2 + junit junit @@ -67,7 +81,8 @@ easystream 1.2.12 - javax.mail @@ -161,10 +176,6 @@ org.apache.maven.plugins maven-compiler-plugin - - 1.7 - ${compiler.target.version} - com.mycila.maven-license-plugin @@ -207,12 +218,12 @@ - - - - test-jar - - + + + + test-jar + + @@ -220,7 +231,7 @@ maven-dependency-plugin 2.1 - @@ -283,10 +294,10 @@ 2.4 - src/main/assembly/withDependencies.xml + src/main/assembly/withDependencies.xml - - - - + + + + + - - - - - + + + + + - aggregate - - aggregate - - site - - + aggregate + + aggregate + + site + + true - - org.dataone:* - - + + org.dataone:* + + false - true + true @@ -332,32 +343,32 @@ trying (and failing) to run the command - and avoid the little red markers in Eclipse --> - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.0,) - - copy-dependencies - - - - - - - - - - - + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-dependency-plugin + [2.0,) + + copy-dependencies + + + + + + + + + + + @@ -388,4 +399,4 @@ scm:svn:https://repository.dataone.org/software/cicore HEAD - + \ No newline at end of file From f3e3d260efeef1516da33bd81b20bf61943c643b Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 13 Feb 2026 19:27:36 -0900 Subject: [PATCH 02/16] Ignore vscode config dir --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 6d706b8d..e7b87831 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ buildNumber.properties .project # JDT-specific (Eclipse Java Development Tools) .classpath + +# VS Code +.vscode/ From 5469e5a81b917110793e096859a57a78f1034e25 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 13 Feb 2026 19:29:29 -0900 Subject: [PATCH 03/16] Tested with java 17, 21, and 25, passing. Defaulting to Java 25. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c1b0d1be..74f615a2 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ 1.52 2.4.2 2.3.0 - 17 + 25 From 19eea65ac6f1bdf829ee840ce7ffa88c8cda4a82 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 13 Feb 2026 19:33:15 -0900 Subject: [PATCH 04/16] Remove dependencies from pom that are not in use. --- pom.xml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pom.xml b/pom.xml index 74f615a2..7eb551bd 100644 --- a/pom.xml +++ b/pom.xml @@ -69,21 +69,6 @@ jar test - - org.jmock - jmock-junit4 - 2.5.1 - test - - - - net.sf.jsignature.io-tools - easystream - 1.2.12 - - javax.mail mail @@ -96,9 +81,6 @@ jar provided - org.jibx jibx-run From 3d589b0c995e693b59b6ebda9428c9a86a26baf5 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 13 Feb 2026 19:42:47 -0900 Subject: [PATCH 05/16] Consolidate dependencies. --- pom.xml | 5 ----- .../dataone/client/utils/HttpConnectionMonitorService.java | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 7eb551bd..2f086b16 100644 --- a/pom.xml +++ b/pom.xml @@ -69,11 +69,6 @@ jar test - - javax.mail - mail - 1.4.1 - javax.servlet servlet-api diff --git a/src/main/java/org/dataone/client/utils/HttpConnectionMonitorService.java b/src/main/java/org/dataone/client/utils/HttpConnectionMonitorService.java index 9f3aac98..ddc78478 100644 --- a/src/main/java/org/dataone/client/utils/HttpConnectionMonitorService.java +++ b/src/main/java/org/dataone/client/utils/HttpConnectionMonitorService.java @@ -34,9 +34,9 @@ public class HttpConnectionMonitorService extends Thread { WeakHashMap connManStateMap = new WeakHashMap<>(); WeakHashMap clientStateMap = new WeakHashMap<>(); - private volatile boolean shutdown; + private volatile boolean shutdown = false; - final static Logger logger = Logger.getLogger(HttpConnectionMonitorService.class); + private static final Logger logger = Logger.getLogger(HttpConnectionMonitorService.class); private static class SingletonHolder { public static final HttpConnectionMonitorService INSTANCE = new HttpConnectionMonitorService(); From 00be31e28b2ecc4a14ba2c6bde3b3c7541ca943b Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 20 Feb 2026 16:45:47 -0800 Subject: [PATCH 06/16] Removed extraneous maven plugins, updated git repo locations --- pom.xml | 200 ++------------------------------------------------------ 1 file changed, 4 insertions(+), 196 deletions(-) diff --git a/pom.xml b/pom.xml index 2f086b16..43e05598 100644 --- a/pom.xml +++ b/pom.xml @@ -154,199 +154,7 @@ org.apache.maven.plugins maven-compiler-plugin - - com.mycila.maven-license-plugin - maven-license-plugin - -
src/license-header.txt
-
-
- - org.codehaus.mojo - buildnumber-maven-plugin - - - validate - - create - - - - - false - false - - - - org.apache.maven.plugins - maven-jar-plugin - - - - ${project.version} - ${buildNumber} - ${scmBranch} - ${timestamp} - - - true - lib/ - - - - - - - - test-jar - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 2.1 - - - - copy-dependencies - package - - copy-dependencies - - - ${project.build.directory}/lib - false - false - true - runtime - org.apache.maven,org.codehaus.plexus,classworlds - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 2.8.1 - - - - - integration-test - - - integration-test - - - - verify - - - verify - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 2.4 - - - src/main/assembly/withDependencies.xml - - - - - - maven-javadoc-plugin - 2.9 - - - - - - - - - - - - - aggregate - - aggregate - - site - - - - - true - - - - org.dataone:* - - - false - true - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-dependency-plugin - [2.0,) - - copy-dependencies - - - - - - - - - - - - src/main/resources @@ -371,9 +179,9 @@ - https://repository.dataone.org/software/cicore - scm:svn:https://repository.dataone.org/software/cicore - scm:svn:https://repository.dataone.org/software/cicore + https://github.com/DataONEorg/d1_libclient_java + scm:git:ssh://github.com:DataONEorg/d1_libclient_java.git + scm:git:ssh://git@github.com:DataONEorg/d1_libclient_java.git HEAD - \ No newline at end of file + From 7679c45aa986d34c89d0a57b241d091e3015197a Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 20 Feb 2026 16:47:27 -0800 Subject: [PATCH 07/16] Remove extraneous buildInfo file from resources --- src/main/resources/buildInfo/buildInfo.properties | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 src/main/resources/buildInfo/buildInfo.properties diff --git a/src/main/resources/buildInfo/buildInfo.properties b/src/main/resources/buildInfo/buildInfo.properties deleted file mode 100644 index fb1fc987..00000000 --- a/src/main/resources/buildInfo/buildInfo.properties +++ /dev/null @@ -1,6 +0,0 @@ -D1-Component=${project.artifactId} -D1-version=${project.version} -D1-SCM-Revision=${buildNumber} -D1-SCM-Branch=${scmBranch} -D1-Build-TimeStamp=${timestamp} - From 8d9c9dc2db4ac8113ae686c41757d38abe6c5a3e Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Fri, 20 Feb 2026 16:48:16 -0800 Subject: [PATCH 08/16] Remove unneeded hazelcast properties --- .../org/dataone/configuration/config.xml | 3 +-- .../configuration/d1hazelcast.properties | 23 ------------------- 2 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 src/main/resources/org/dataone/configuration/d1hazelcast.properties diff --git a/src/main/resources/org/dataone/configuration/config.xml b/src/main/resources/org/dataone/configuration/config.xml index eec2362d..ee913bd8 100644 --- a/src/main/resources/org/dataone/configuration/config.xml +++ b/src/main/resources/org/dataone/configuration/config.xml @@ -3,5 +3,4 @@ - - \ No newline at end of file + diff --git a/src/main/resources/org/dataone/configuration/d1hazelcast.properties b/src/main/resources/org/dataone/configuration/d1hazelcast.properties deleted file mode 100644 index 0d6253bd..00000000 --- a/src/main/resources/org/dataone/configuration/d1hazelcast.properties +++ /dev/null @@ -1,23 +0,0 @@ -## default hazelcast properties - -# The name of the Hazelcast Cluster group and password -dataone.hazelcast.group=DataONE -dataone.hazelcast.password=password - -# The name of the cluster-wide node map -dataone.hazelcast.nodes=hzNodes - -# The name of the cluster-wide system metadata map -dataone.hazelcast.systemMetadata=hzSystemMetadata - -# The list of IP addresses of DataONE Hazelcast cluster members -dataone.hazelcast.clusterInstances=10.0.0.100,128.111.220.50,129.24.0.48 - -# The name of the replication tasks queue used to schedule unprocessed tasks -dataone.hazelcast.replicationQueuedTasks=hzReplicationTasks - -# the name of the replication tasks map that hold task being processed -dataone.hazelcast.replicationPendingTasks=hzPendingReplicationTasks - -# The name of the id generator to uniquely produce cluster-wide task ids -dataone.hazelcast.taskIdGenerator=task-ids From 8b8649a61c0caf59b220a0e63b18beb2d3dec071 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Wed, 17 Jun 2026 17:20:48 -0800 Subject: [PATCH 09/16] Update d1_common to 2.4.3-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 43e05598..d04a7fc2 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ UTF-8 1.52 - 2.4.2 + 2.4.3-SNAPSHOT 2.3.0 25 From cac5af1d24de0847edeb61ef490aca811b261cfd Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Wed, 17 Jun 2026 17:40:11 -0800 Subject: [PATCH 10/16] Adapted to library/API changes from d1_common upgrade. --- pom.xml | 4 ++-- src/test/java/org/dataone/client/v1/itk/DataPackageTest.java | 4 ++-- src/test/java/org/dataone/client/v2/itk/DataPackageTest.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index d04a7fc2..bd77a6bc 100644 --- a/pom.xml +++ b/pom.xml @@ -133,12 +133,12 @@ org.apache.httpcomponents httpclient - 4.3.6 + 4.5.14 org.apache.httpcomponents httpclient-cache - 4.3.6 + 4.5.14 diff --git a/src/test/java/org/dataone/client/v1/itk/DataPackageTest.java b/src/test/java/org/dataone/client/v1/itk/DataPackageTest.java index 8e881d56..ceb28a14 100644 --- a/src/test/java/org/dataone/client/v1/itk/DataPackageTest.java +++ b/src/test/java/org/dataone/client/v1/itk/DataPackageTest.java @@ -170,7 +170,7 @@ public void testInsertRelationshipObjectLiteral() { e.printStackTrace(); fail(e.getMessage()); - } catch (IOException e) { + } catch (RuntimeException e) { e.printStackTrace(); fail(e.getMessage()); @@ -261,7 +261,7 @@ public void testInsertRelationshipBlankNode() { } catch (ORESerialiserException e) { e.printStackTrace(); - } catch (IOException e) { + } catch (RuntimeException e) { e.printStackTrace(); } diff --git a/src/test/java/org/dataone/client/v2/itk/DataPackageTest.java b/src/test/java/org/dataone/client/v2/itk/DataPackageTest.java index 9a34485d..601436f3 100644 --- a/src/test/java/org/dataone/client/v2/itk/DataPackageTest.java +++ b/src/test/java/org/dataone/client/v2/itk/DataPackageTest.java @@ -170,7 +170,7 @@ public void testInsertRelationshipObjectLiteral() { e.printStackTrace(); fail(e.getMessage()); - } catch (IOException e) { + } catch (RuntimeException e) { e.printStackTrace(); fail(e.getMessage()); @@ -261,7 +261,7 @@ public void testInsertRelationshipBlankNode() { } catch (ORESerialiserException e) { e.printStackTrace(); - } catch (IOException e) { + } catch (RuntimeException e) { e.printStackTrace(); } From ba84fec7fbae775ac0f5155b0156e392fc2b6017 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Wed, 17 Jun 2026 17:48:47 -0800 Subject: [PATCH 11/16] Bumped dependency versions to be compatible with d1_common upgrades, and cleaned up imports. --- pom.xml | 8 ++++---- .../org/dataone/client/v1/itk/DataPackageTest.java | 11 +---------- .../org/dataone/client/v2/itk/DataPackageTest.java | 11 +---------- 3 files changed, 6 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index bd77a6bc..023eef64 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 1.52 2.4.3-SNAPSHOT - 2.3.0 + 2.4.0-SNAPSHOT 25 @@ -65,14 +65,14 @@ junit junit - 4.7 + [4.13.1,) jar test javax.servlet - servlet-api - 2.5 + javax.servlet-api + 4.0.1 jar provided diff --git a/src/test/java/org/dataone/client/v1/itk/DataPackageTest.java b/src/test/java/org/dataone/client/v1/itk/DataPackageTest.java index ceb28a14..f2a4a708 100644 --- a/src/test/java/org/dataone/client/v1/itk/DataPackageTest.java +++ b/src/test/java/org/dataone/client/v1/itk/DataPackageTest.java @@ -34,13 +34,10 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.apache.commons.io.IOUtils; import org.dataone.client.exception.ClientSideException; -import org.dataone.client.v1.itk.DataPackage; import org.dataone.client.v1.types.D1TypeBuilder; import org.dataone.configuration.Settings; import org.dataone.ore.ResourceMapFactory; @@ -58,7 +55,6 @@ import org.junit.Ignore; import org.junit.Test; -import com.hp.hpl.jena.rdf.model.AnonId; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import com.hp.hpl.jena.rdf.model.Property; @@ -220,8 +216,6 @@ public void testInsertRelationshipBlankNode() { Model rdfModel = ModelFactory.createDefaultModel(); InputStream inputStream = IOUtils.toInputStream(rdfXML, "UTF-8"); rdfModel.read(inputStream, null); - Resource subjectResource = null; - Property property = null; Resource objectResource = null; Selector selector = null; StmtIterator statements = null; @@ -299,7 +293,6 @@ public void testInsertRelationship() throws OREException, ORESerialiserException //Create the derived resources //A resource map - Identifier resourceMapId = D1TypeBuilder.buildIdentifier("resouceMap.1.1"); //Metadata Identifier metadataId = D1TypeBuilder.buildIdentifier("meta.1.1"); //One derived data @@ -323,9 +316,7 @@ public void testInsertRelationship() throws OREException, ORESerialiserException dataPackage.insertRelationship(metadataId, dataIds); //Create the primary resources - Identifier primaryDataId = D1TypeBuilder.buildIdentifier("primaryData.1.1"); URI primaryDataURI = new URI(D1_URI_PREFIX + "primaryData.1.1"); - Identifier primaryDataId2 = D1TypeBuilder.buildIdentifier("primaryData.2.1"); URI primaryDataURI2 = new URI(D1_URI_PREFIX + "primaryData.2.1"); //Create a list of ids of the primary data resources @@ -422,7 +413,7 @@ private Predicate asPredicate(Property property, String prefix) Predicate predicate = new Predicate(); predicate.setName(property.getLocalName()); predicate.setNamespace(property.getNameSpace()); - if ( prefix != null || ! prefix.isEmpty() ) { + if (prefix != null && !prefix.isEmpty()) { predicate.setPrefix(prefix); } diff --git a/src/test/java/org/dataone/client/v2/itk/DataPackageTest.java b/src/test/java/org/dataone/client/v2/itk/DataPackageTest.java index 601436f3..607cb3aa 100644 --- a/src/test/java/org/dataone/client/v2/itk/DataPackageTest.java +++ b/src/test/java/org/dataone/client/v2/itk/DataPackageTest.java @@ -34,13 +34,10 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import org.apache.commons.io.IOUtils; import org.dataone.client.exception.ClientSideException; -import org.dataone.client.v2.itk.DataPackage; import org.dataone.client.v1.types.D1TypeBuilder; import org.dataone.configuration.Settings; import org.dataone.ore.ResourceMapFactory; @@ -58,7 +55,6 @@ import org.junit.Ignore; import org.junit.Test; -import com.hp.hpl.jena.rdf.model.AnonId; import com.hp.hpl.jena.rdf.model.Model; import com.hp.hpl.jena.rdf.model.ModelFactory; import com.hp.hpl.jena.rdf.model.Property; @@ -220,8 +216,6 @@ public void testInsertRelationshipBlankNode() { Model rdfModel = ModelFactory.createDefaultModel(); InputStream inputStream = IOUtils.toInputStream(rdfXML, "UTF-8"); rdfModel.read(inputStream, null); - Resource subjectResource = null; - Property property = null; Resource objectResource = null; Selector selector = null; StmtIterator statements = null; @@ -301,7 +295,6 @@ public void testInsertRelationship() throws OREException, ORESerialiserException //Create the derived resources //A resource map - Identifier resourceMapId = D1TypeBuilder.buildIdentifier("resouceMap.1.1"); //Metadata Identifier metadataId = D1TypeBuilder.buildIdentifier("meta.1.1"); //One derived data @@ -325,9 +318,7 @@ public void testInsertRelationship() throws OREException, ORESerialiserException dataPackage.insertRelationship(metadataId, dataIds); //Create the primary resources - Identifier primaryDataId = D1TypeBuilder.buildIdentifier("primaryData.1.1"); URI primaryDataURI = new URI(D1_URI_PREFIX + "primaryData.1.1"); - Identifier primaryDataId2 = D1TypeBuilder.buildIdentifier("primaryData.2.1"); URI primaryDataURI2 = new URI(D1_URI_PREFIX + "primaryData.2.1"); //Create a list of ids of the primary data resources @@ -424,7 +415,7 @@ private Predicate asPredicate(Property property, String prefix) Predicate predicate = new Predicate(); predicate.setName(property.getLocalName()); predicate.setNamespace(property.getNameSpace()); - if ( prefix != null || ! prefix.isEmpty() ) { + if (prefix != null && !prefix.isEmpty()) { predicate.setPrefix(prefix); } From d60a68934890dcf1d2bdb4d77c06b47ed61b1774 Mon Sep 17 00:00:00 2001 From: Matt Jones Date: Thu, 18 Jun 2026 07:53:05 -0800 Subject: [PATCH 12/16] Update bouncycastle dependency to patch security issues. --- pom.xml | 15 ++++++- .../client/auth/CertificateManager.java | 39 ++++++++++++------- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 023eef64..3a3b030d 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ http://dataone.org UTF-8 - 1.52 + 1.84 2.4.3-SNAPSHOT 2.4.0-SNAPSHOT 25 @@ -84,7 +84,12 @@ org.bouncycastle - bcpkix-jdk15on + bcpkix-jdk18on + ${bouncycastle.version} + + + org.bouncycastle + bcprov-jdk18on ${bouncycastle.version} @@ -125,6 +130,12 @@ ${d1_test_resources.version} jar test + + + org.bouncycastle + bcprov-jdk15on + +