From b583761ae43224ab9f16752fdc7808d325b22159 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 11 Feb 2022 10:49:02 -0800 Subject: [PATCH 01/15] Don't modify signature of 'Connection' constructor. --- labkey-client-api/src/org/labkey/remoteapi/Connection.java | 7 ++++--- .../src/org/labkey/remoteapi/query/ImportDataCommand.java | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/labkey-client-api/src/org/labkey/remoteapi/Connection.java b/labkey-client-api/src/org/labkey/remoteapi/Connection.java index 15c7b63f..aa67c7f0 100644 --- a/labkey-client-api/src/org/labkey/remoteapi/Connection.java +++ b/labkey-client-api/src/org/labkey/remoteapi/Connection.java @@ -173,13 +173,14 @@ public Connection(String baseUrl, CredentialsProvider credentialsProvider) * Constructs a new Connection object with a base URL that attempts authentication via .netrc/_netrc entry, if present. * If not present, connects as guest. * @param baseUrl The base URL + * @throws URISyntaxException if the given url is not a valid URI * @throws IOException if there are problems reading the credentials * @see NetrcCredentialsProvider * @see #Connection(URI, CredentialsProvider) */ - public Connection(String baseUrl) throws IOException + public Connection(String baseUrl) throws URISyntaxException, IOException { - this(toURI(baseUrl), new NetrcCredentialsProvider(toURI(baseUrl))); + this(new URI(baseUrl), new NetrcCredentialsProvider(new URI(baseUrl))); } /** @@ -541,4 +542,4 @@ private static URI toURI(String baseUrl) throw new IllegalArgumentException("Invalid target server URL: " + baseUrl); } } -} \ No newline at end of file +} diff --git a/labkey-client-api/src/org/labkey/remoteapi/query/ImportDataCommand.java b/labkey-client-api/src/org/labkey/remoteapi/query/ImportDataCommand.java index 6a6462d0..8774c74f 100644 --- a/labkey-client-api/src/org/labkey/remoteapi/query/ImportDataCommand.java +++ b/labkey-client-api/src/org/labkey/remoteapi/query/ImportDataCommand.java @@ -32,6 +32,7 @@ import java.io.InputStreamReader; import java.io.StringWriter; import java.net.URI; +import java.net.URISyntaxException; import java.util.Arrays; import java.util.Objects; import java.util.stream.Collectors; @@ -297,7 +298,7 @@ public ImportDataCommand copy() return new ImportDataCommand(this); } - public static void main(String[] args) throws IOException + public static void main(String[] args) throws IOException, URISyntaxException { // required String baseServerUrl = null; From d4a948fdaad0dca64c50db8885bb75b0b82573d3 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 11 Feb 2022 16:15:51 -0800 Subject: [PATCH 02/15] Update changelog for next release --- labkey-client-api/CHANGELOG.md | 8 +++++++- .../src/org/labkey/remoteapi/Connection.java | 7 +++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/labkey-client-api/CHANGELOG.md b/labkey-client-api/CHANGELOG.md index 96add7c5..b36a360e 100644 --- a/labkey-client-api/CHANGELOG.md +++ b/labkey-client-api/CHANGELOG.md @@ -1,8 +1,14 @@ # The LabKey Remote API Library for Java - Change Log +## version TBD +*Released*: TBD +* [Issue 43380](https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=43380): ImportDataCommand missing options supported by query-import.api +* Remove `CheckForStudyReloadCommand.java` +* Remove `URISyntaxException` from one `Connection` constructor + ## version 1.4.0 *Released*: 16 June 2021 -* Issue 43246: Lineage query NPE while processing an UploadedFile +* [Issue 43246](https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=43246): Lineage query NPE while processing an UploadedFile * Additional lineage options and support additional properties in response * Update dependency version numbers * Update to Gradle 7.1 diff --git a/labkey-client-api/src/org/labkey/remoteapi/Connection.java b/labkey-client-api/src/org/labkey/remoteapi/Connection.java index aa67c7f0..80f133d5 100644 --- a/labkey-client-api/src/org/labkey/remoteapi/Connection.java +++ b/labkey-client-api/src/org/labkey/remoteapi/Connection.java @@ -142,7 +142,7 @@ public Connection(URI baseURI, CredentialsProvider credentialsProvider) { if (baseURI.getHost() == null || baseURI.getScheme() == null) { - throw new IllegalArgumentException("Invalid server URL: " + baseURI.toString()); + throw new IllegalArgumentException("Invalid server URL: " + baseURI); } _baseURI = baseURI; _credentialsProvider = credentialsProvider; @@ -173,14 +173,13 @@ public Connection(String baseUrl, CredentialsProvider credentialsProvider) * Constructs a new Connection object with a base URL that attempts authentication via .netrc/_netrc entry, if present. * If not present, connects as guest. * @param baseUrl The base URL - * @throws URISyntaxException if the given url is not a valid URI * @throws IOException if there are problems reading the credentials * @see NetrcCredentialsProvider * @see #Connection(URI, CredentialsProvider) */ - public Connection(String baseUrl) throws URISyntaxException, IOException + public Connection(String baseUrl) throws IOException { - this(new URI(baseUrl), new NetrcCredentialsProvider(new URI(baseUrl))); + this(toURI(baseUrl), new NetrcCredentialsProvider(toURI(baseUrl))); } /** From 70005683650ed0e3c0e9e7a28a7e342511c06ac4 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Tue, 12 Apr 2022 16:00:34 -0700 Subject: [PATCH 03/15] Update gradle version --- labkey-api-sas/gradle/wrapper/gradle-wrapper.properties | 2 +- labkey-client-api/gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/labkey-api-sas/gradle/wrapper/gradle-wrapper.properties b/labkey-api-sas/gradle/wrapper/gradle-wrapper.properties index 2a563242..aa991fce 100644 --- a/labkey-api-sas/gradle/wrapper/gradle-wrapper.properties +++ b/labkey-api-sas/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/labkey-client-api/gradle/wrapper/gradle-wrapper.properties b/labkey-client-api/gradle/wrapper/gradle-wrapper.properties index 69a97150..aa991fce 100644 --- a/labkey-client-api/gradle/wrapper/gradle-wrapper.properties +++ b/labkey-client-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From bbb4dc8b327a88142a15927eae81cdf6fca25066 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Tue, 12 Apr 2022 16:01:18 -0700 Subject: [PATCH 04/15] Add mavenCentral repo and test with virual repo that excludes it --- labkey-api-sas/build.gradle | 3 ++- labkey-client-api/build.gradle | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/labkey-api-sas/build.gradle b/labkey-api-sas/build.gradle index 04badddc..25acb280 100644 --- a/labkey-api-sas/build.gradle +++ b/labkey-api-sas/build.gradle @@ -27,8 +27,9 @@ plugins { } repositories { + mavenCentral() maven { - url "${artifactory_contextUrl}/libs-release" + url "${artifactory_contextUrl}/libs-release-no-mc" if (hasProperty('artifactory_user') && hasProperty('artifactory_password')) { diff --git a/labkey-client-api/build.gradle b/labkey-client-api/build.gradle index 4b9b3365..ac40e4fb 100644 --- a/labkey-client-api/build.gradle +++ b/labkey-client-api/build.gradle @@ -37,8 +37,9 @@ plugins { } repositories { + mavenCentral() maven { - url "${artifactory_contextUrl}/libs-release" + url "${artifactory_contextUrl}/libs-release-no-mc" if (hasProperty('artifactory_user') && hasProperty('artifactory_password')) { From 4ce1d09fb8eecad9d379b5395dc517980d59bf3e Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Thu, 14 Apr 2022 12:36:35 -0700 Subject: [PATCH 05/15] Update plugins repository --- labkey-api-sas/build.gradle | 2 +- labkey-client-api/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/labkey-api-sas/build.gradle b/labkey-api-sas/build.gradle index 25acb280..229c648c 100644 --- a/labkey-api-sas/build.gradle +++ b/labkey-api-sas/build.gradle @@ -7,7 +7,7 @@ buildscript { repositories { mavenCentral() maven { - url "${artifactory_contextUrl}/plugins-release" + url "${artifactory_contextUrl}/plugins-release-no-mc" } if (gradlePluginsVersion.contains("SNAPSHOT")) { diff --git a/labkey-client-api/build.gradle b/labkey-client-api/build.gradle index ac40e4fb..e0e99a38 100644 --- a/labkey-client-api/build.gradle +++ b/labkey-client-api/build.gradle @@ -7,7 +7,7 @@ buildscript { repositories { mavenCentral() maven { - url "${artifactory_contextUrl}/plugins-release" + url "${artifactory_contextUrl}/plugins-release-no-mc" } if (gradlePluginsVersion.contains("SNAPSHOT")) { From b4ce14357fad410e9f576d877df8549038f7c0a4 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Thu, 14 Apr 2022 15:55:23 -0700 Subject: [PATCH 06/15] Add plugin portal as repository and update versions of things --- labkey-api-sas/build.gradle | 1 + labkey-api-sas/gradle.properties | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/labkey-api-sas/build.gradle b/labkey-api-sas/build.gradle index 229c648c..391774be 100644 --- a/labkey-api-sas/build.gradle +++ b/labkey-api-sas/build.gradle @@ -6,6 +6,7 @@ import org.labkey.gradle.plugin.extension.TeamCityExtension buildscript { repositories { mavenCentral() + gradlePluginPortal() maven { url "${artifactory_contextUrl}/plugins-release-no-mc" } diff --git a/labkey-api-sas/gradle.properties b/labkey-api-sas/gradle.properties index a57eaeb8..7c37d5c7 100644 --- a/labkey-api-sas/gradle.properties +++ b/labkey-api-sas/gradle.properties @@ -3,6 +3,6 @@ # in the context URL or you will get a 500 error from artifactory.) artifactory_contextUrl=https://artifactory.labkey.com/artifactory -artifactoryPluginVersion=4.13.0 -gradlePluginsVersion=1.12.0 -labkeyClientApiVersion=1.2.0 +artifactoryPluginVersion=4.21.0 +gradlePluginsVersion=1.32.2 +labkeyClientApiVersion=1.4.0 From bcae3fabed129ac02b7df096476ac2be5c21de9e Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Thu, 14 Apr 2022 15:55:57 -0700 Subject: [PATCH 07/15] Update gradle plugins version --- labkey-client-api/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labkey-client-api/gradle.properties b/labkey-client-api/gradle.properties index 2ab36a7f..d83a0272 100644 --- a/labkey-client-api/gradle.properties +++ b/labkey-client-api/gradle.properties @@ -11,7 +11,7 @@ sourceCompatibility=1.8 targetCompatibility=1.8 artifactoryPluginVersion=4.21.0 -gradlePluginsVersion=1.26.0 +gradlePluginsVersion=1.32.2 commonsCodecVersion=1.15 commonsLoggingVersion=1.2 From cd195c299fdad8f81d42e6d3fbe56b377c09385e Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Thu, 14 Apr 2022 17:16:33 -0700 Subject: [PATCH 08/15] remove gradlePluginPortal --- labkey-api-sas/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/labkey-api-sas/build.gradle b/labkey-api-sas/build.gradle index 391774be..229c648c 100644 --- a/labkey-api-sas/build.gradle +++ b/labkey-api-sas/build.gradle @@ -6,7 +6,6 @@ import org.labkey.gradle.plugin.extension.TeamCityExtension buildscript { repositories { mavenCentral() - gradlePluginPortal() maven { url "${artifactory_contextUrl}/plugins-release-no-mc" } From 504139773535c5bfeb0664fcad493ebd92675709 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Thu, 14 Apr 2022 17:16:52 -0700 Subject: [PATCH 09/15] Don't publish buildInfo --- labkey-client-api/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/labkey-client-api/build.gradle b/labkey-client-api/build.gradle index e0e99a38..608811a1 100644 --- a/labkey-client-api/build.gradle +++ b/labkey-client-api/build.gradle @@ -241,6 +241,7 @@ project.publishing { maven = true } defaults { + publishBuildInfo = false publishPom = true publishIvy = false } From aecbcc012237aeef11b48fa6328eac7c58b87c5b Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Mon, 18 Apr 2022 07:04:59 -0700 Subject: [PATCH 10/15] Update release notes --- labkey-client-api/CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/labkey-client-api/CHANGELOG.md b/labkey-client-api/CHANGELOG.md index 96add7c5..9162fc7d 100644 --- a/labkey-client-api/CHANGELOG.md +++ b/labkey-client-api/CHANGELOG.md @@ -1,5 +1,12 @@ # The LabKey Remote API Library for Java - Change Log +## version TBD +*Released*: TBD +* Update gradle and various dependencies +* Update signature of `Connection` constructor +* Issue 43380: `ImportDataCommand` missing options supported by the query-import.api endpoint +* Remove `CheckForStudyReloadCommand`. + ## version 1.4.0 *Released*: 16 June 2021 * Issue 43246: Lineage query NPE while processing an UploadedFile From 05af4998232480d49c426e091d6a6aa639996347 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Mon, 18 Apr 2022 07:05:49 -0700 Subject: [PATCH 11/15] Revert usage of temporary repository --- labkey-api-sas/build.gradle | 4 ++-- labkey-client-api/build.gradle | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/labkey-api-sas/build.gradle b/labkey-api-sas/build.gradle index 229c648c..98752374 100644 --- a/labkey-api-sas/build.gradle +++ b/labkey-api-sas/build.gradle @@ -7,7 +7,7 @@ buildscript { repositories { mavenCentral() maven { - url "${artifactory_contextUrl}/plugins-release-no-mc" + url "${artifactory_contextUrl}/plugins-release" } if (gradlePluginsVersion.contains("SNAPSHOT")) { @@ -29,7 +29,7 @@ plugins { repositories { mavenCentral() maven { - url "${artifactory_contextUrl}/libs-release-no-mc" + url "${artifactory_contextUrl}/libs-release" if (hasProperty('artifactory_user') && hasProperty('artifactory_password')) { diff --git a/labkey-client-api/build.gradle b/labkey-client-api/build.gradle index 608811a1..833c94d9 100644 --- a/labkey-client-api/build.gradle +++ b/labkey-client-api/build.gradle @@ -7,7 +7,7 @@ buildscript { repositories { mavenCentral() maven { - url "${artifactory_contextUrl}/plugins-release-no-mc" + url "${artifactory_contextUrl}/plugins-release" } if (gradlePluginsVersion.contains("SNAPSHOT")) { @@ -39,7 +39,7 @@ plugins { repositories { mavenCentral() maven { - url "${artifactory_contextUrl}/libs-release-no-mc" + url "${artifactory_contextUrl}/libs-release" if (hasProperty('artifactory_user') && hasProperty('artifactory_password')) { From afffbde0c047c5ed03099fe712c6c1e20eb0f3c0 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Mon, 18 Apr 2022 13:30:22 -0700 Subject: [PATCH 12/15] Clean up some warnings --- .../src/org/labkey/remoteapi/query/ImportDataCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/labkey-client-api/src/org/labkey/remoteapi/query/ImportDataCommand.java b/labkey-client-api/src/org/labkey/remoteapi/query/ImportDataCommand.java index 8774c74f..202f8f76 100644 --- a/labkey-client-api/src/org/labkey/remoteapi/query/ImportDataCommand.java +++ b/labkey-client-api/src/org/labkey/remoteapi/query/ImportDataCommand.java @@ -32,7 +32,7 @@ import java.io.InputStreamReader; import java.io.StringWriter; import java.net.URI; -import java.net.URISyntaxException; +import java.nio.charset.Charset; import java.util.Arrays; import java.util.Objects; import java.util.stream.Collectors; @@ -298,7 +298,7 @@ public ImportDataCommand copy() return new ImportDataCommand(this); } - public static void main(String[] args) throws IOException, URISyntaxException + public static void main(String[] args) throws IOException { // required String baseServerUrl = null; @@ -581,7 +581,7 @@ private static void printUsage() private static String readFully(InputStream in) throws IOException { StringWriter sw = new StringWriter(); - try (BufferedReader buf = new BufferedReader(new InputStreamReader(in))) + try (BufferedReader buf = new BufferedReader(new InputStreamReader(in, Charset.defaultCharset()))) { String line; do From 4131caf942acf174a42a70cf5cbc10d9a1968b18 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 20 Apr 2022 07:03:03 -0700 Subject: [PATCH 13/15] Release date and version --- labkey-client-api/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/labkey-client-api/CHANGELOG.md b/labkey-client-api/CHANGELOG.md index 7cb2e45b..613e690a 100644 --- a/labkey-client-api/CHANGELOG.md +++ b/labkey-client-api/CHANGELOG.md @@ -1,7 +1,7 @@ # The LabKey Remote API Library for Java - Change Log -## version TBD -*Released*: TBD +## version 1.5.0 +*Released*: 20 April 2022 * Update gradle and various dependencies * Update signature of `Connection` constructor * [Issue 43380](https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=43380): `ImportDataCommand` missing options supported by the query-import.api endpoint From c5b3002710aaf9719e55245d5c62152ab6f1c224 Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 20 Apr 2022 07:04:06 -0700 Subject: [PATCH 14/15] v1.5.0 --- labkey-client-api/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labkey-client-api/build.gradle b/labkey-client-api/build.gradle index 833c94d9..fcaf2ea0 100644 --- a/labkey-client-api/build.gradle +++ b/labkey-client-api/build.gradle @@ -57,7 +57,7 @@ repositories { group "org.labkey.api" -version "1.5.0-SNAPSHOT" +version "1.5.0" dependencies { implementation "org.apache.httpcomponents:httpmime:${httpmimeVersion}" From 006afb8b27dacda31bdd276a3d4b6e5804ce28ef Mon Sep 17 00:00:00 2001 From: labkey-susanh Date: Wed, 20 Apr 2022 07:53:36 -0700 Subject: [PATCH 15/15] Next snapshot --- labkey-client-api/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labkey-client-api/build.gradle b/labkey-client-api/build.gradle index fcaf2ea0..14f48d26 100644 --- a/labkey-client-api/build.gradle +++ b/labkey-client-api/build.gradle @@ -57,7 +57,7 @@ repositories { group "org.labkey.api" -version "1.5.0" +version "1.6.0-SNAPSHOT" dependencies { implementation "org.apache.httpcomponents:httpmime:${httpmimeVersion}"