diff --git a/.github/workflows/container_app_pr.yml b/.github/workflows/container_app_pr.yml index 9e514690a13..c86d284e74b 100644 --- a/.github/workflows/container_app_pr.yml +++ b/.github/workflows/container_app_pr.yml @@ -25,7 +25,7 @@ jobs: ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge' - uses: actions/setup-java@v3 with: - java-version: "11" + java-version: "17" distribution: 'adopt' - uses: actions/cache@v3 with: diff --git a/.github/workflows/container_app_push.yml b/.github/workflows/container_app_push.yml index cc9d9926e61..b3e247e376c 100644 --- a/.github/workflows/container_app_push.yml +++ b/.github/workflows/container_app_push.yml @@ -36,10 +36,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Set up JDK 11 + - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: "11" + java-version: "17" distribution: temurin cache: maven @@ -109,7 +109,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: "11" + java-version: "17" distribution: temurin # Depending on context, we push to different targets. Login accordingly. diff --git a/.github/workflows/container_base_push.yml b/.github/workflows/container_base_push.yml index 5c62fb0c811..b938851f816 100644 --- a/.github/workflows/container_base_push.yml +++ b/.github/workflows/container_base_push.yml @@ -34,7 +34,7 @@ jobs: packages: read strategy: matrix: - jdk: [ '11' ] + jdk: [ '17' ] # Only run in upstream repo - avoid unnecessary runs in forks if: ${{ github.repository_owner == 'IQSS' }} diff --git a/.github/workflows/deploy_beta_testing.yml b/.github/workflows/deploy_beta_testing.yml index 5050da7aa8a..f858272ca2b 100644 --- a/.github/workflows/deploy_beta_testing.yml +++ b/.github/workflows/deploy_beta_testing.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - name: Enable API Session Auth feature flag working-directory: src/main/resources/META-INF diff --git a/.github/workflows/maven_unit_test.yml b/.github/workflows/maven_unit_test.yml index 45beabf3193..efa3fa4a471 100644 --- a/.github/workflows/maven_unit_test.yml +++ b/.github/workflows/maven_unit_test.yml @@ -22,18 +22,9 @@ jobs: strategy: fail-fast: false matrix: - jdk: [ '11' ] + jdk: [ '17' ] experimental: [false] status: ["Stable"] - # - # JDK 17 builds disabled due to non-essential fails marking CI jobs as completely failed within - # Github Projects, PR lists etc. This was consensus on Slack #dv-tech. See issue #8094 - # (This is a limitation of how Github is currently handling these things.) - # - #include: - # - jdk: '17' - # experimental: true - # status: "Experimental" continue-on-error: ${{ matrix.experimental }} runs-on: ubuntu-latest steps: @@ -68,6 +59,14 @@ jobs: # We don't want to cache the WAR file, so delete it - run: rm -rf ~/.m2/repository/edu/harvard/iq/dataverse + + # Upload the built war file. For download, it will be wrapped in a ZIP by GitHub. + # See also https://github.com/actions/upload-artifact#zipped-artifact-downloads + - uses: actions/upload-artifact@v3 + with: + name: dataverse-java${{ matrix.jdk }}.war + path: target/dataverse*.war + retention-days: 7 push-app-img: name: Publish App Image permissions: diff --git a/.github/workflows/spi_release.yml b/.github/workflows/spi_release.yml index 0d584693ccf..8ad74b3e4bb 100644 --- a/.github/workflows/spi_release.yml +++ b/.github/workflows/spi_release.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'adopt' server-id: ossrh server-username: MAVEN_USERNAME @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'adopt' - uses: actions/cache@v2 with: @@ -78,7 +78,7 @@ jobs: - name: Set up Maven Central Repository uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'adopt' server-id: ossrh server-username: MAVEN_USERNAME @@ -91,4 +91,4 @@ jobs: env: MAVEN_USERNAME: ${{ secrets.DATAVERSEBOT_SONATYPE_USERNAME }} MAVEN_PASSWORD: ${{ secrets.DATAVERSEBOT_SONATYPE_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.DATAVERSEBOT_GPG_PASSWORD }} \ No newline at end of file + MAVEN_GPG_PASSPHRASE: ${{ secrets.DATAVERSEBOT_GPG_PASSWORD }} diff --git a/doc/release-notes/8094-java-17.md b/doc/release-notes/8094-java-17.md new file mode 100644 index 00000000000..f3c81145465 --- /dev/null +++ b/doc/release-notes/8094-java-17.md @@ -0,0 +1 @@ +Java 17 or higher is now required. diff --git a/doc/sphinx-guides/source/container/base-image.rst b/doc/sphinx-guides/source/container/base-image.rst index ed06314ef0e..1a47a8fc413 100644 --- a/doc/sphinx-guides/source/container/base-image.rst +++ b/doc/sphinx-guides/source/container/base-image.rst @@ -41,7 +41,7 @@ Image Contents The base image provides: -- `Eclipse Temurin JRE using Java 11 `_ +- `Eclipse Temurin JRE using Java 17 `_ - `Payara Community Application Server `_ - CLI tools necessary to run Dataverse (i. e. ``curl`` or ``jq`` - see also :doc:`../installation/prerequisites` in Installation Guide) - Linux tools for analysis, monitoring and so on diff --git a/doc/sphinx-guides/source/developers/dev-environment.rst b/doc/sphinx-guides/source/developers/dev-environment.rst index a4e79c3bb75..1301994cc82 100755 --- a/doc/sphinx-guides/source/developers/dev-environment.rst +++ b/doc/sphinx-guides/source/developers/dev-environment.rst @@ -12,7 +12,7 @@ These instructions are oriented around Docker but the "classic" instructions we Quickstart ---------- -First, install Java 11, Maven, and Docker. +First, install Java 17, Maven, and Docker. After cloning the `dataverse repo `_, run this: @@ -30,7 +30,7 @@ Detailed Steps Install Java ~~~~~~~~~~~~ -The Dataverse Software requires Java 11. +The Dataverse Software requires Java 17. On Mac and Windows, we suggest downloading OpenJDK from https://adoptium.net (formerly `AdoptOpenJDK `_) or `SDKMAN `_. diff --git a/doc/sphinx-guides/source/installation/prerequisites.rst b/doc/sphinx-guides/source/installation/prerequisites.rst index 0022da37f5f..0d1610be8bf 100644 --- a/doc/sphinx-guides/source/installation/prerequisites.rst +++ b/doc/sphinx-guides/source/installation/prerequisites.rst @@ -19,7 +19,7 @@ We assume you plan to run your Dataverse installation on Linux and we recommend Java ---- -The Dataverse Software requires Java SE 11 (or higher). +The Dataverse Software requires Java SE 17 (or higher). Installing Java =============== @@ -30,11 +30,11 @@ The Oracle JDK can be downloaded from http://www.oracle.com/technetwork/java/jav On a RHEL/derivative, install OpenJDK (devel version) using yum:: - # sudo yum install java-11-openjdk + # sudo yum install java-17-openjdk -If you have multiple versions of Java installed, Java 11 should be the default when ``java`` is invoked from the command line. You can test this by running ``java -version``. +If you have multiple versions of Java installed, Java 17 should be the default when ``java`` is invoked from the command line. You can test this by running ``java -version``. -On RHEL/derivative you can make Java 11 the default with the ``alternatives`` command, having it prompt you to select the version of Java from a list:: +On RHEL/derivative you can make Java 17 the default with the ``alternatives`` command, having it prompt you to select the version of Java from a list:: # alternatives --config java diff --git a/modules/container-base/src/main/docker/Dockerfile b/modules/container-base/src/main/docker/Dockerfile index 148c29e0ed1..97aa4cd2792 100644 --- a/modules/container-base/src/main/docker/Dockerfile +++ b/modules/container-base/src/main/docker/Dockerfile @@ -164,6 +164,8 @@ RUN < 5.14 - 11 + 17 UTF-8 -Xdoclint:none diff --git a/pom.xml b/pom.xml index df8daa7e019..b4636c9aac6 100644 --- a/pom.xml +++ b/pom.xml @@ -573,9 +573,9 @@ test - com.jayway.restassured + io.rest-assured rest-assured - 2.4.0 + 5.3.1 test diff --git a/scripts/installer/as-setup.sh b/scripts/installer/as-setup.sh index 8d0cbe60cf4..fc5b378cff5 100755 --- a/scripts/installer/as-setup.sh +++ b/scripts/installer/as-setup.sh @@ -116,6 +116,9 @@ function preliminary_setup() ./asadmin $ASADMIN_OPTS create-jvm-options "-Ddataverse.timerServer=true" + # Workaround for FISH-7722: Failed to deploy war with @Stateless https://github.com/payara/Payara/issues/6337 + ./asadmin $ASADMIN_OPTS create-jvm-options --add-opens=java.base/java.io=ALL-UNNAMED + # enable comet support ./asadmin $ASADMIN_OPTS set server-config.network-config.protocols.protocol.http-listener-1.http.comet-support-enabled="true" diff --git a/scripts/installer/install.py b/scripts/installer/install.py index a7f11f352ed..700c70dbc28 100644 --- a/scripts/installer/install.py +++ b/scripts/installer/install.py @@ -252,8 +252,8 @@ # 1d. check java version java_version = subprocess.check_output(["java", "-version"], stderr=subprocess.STDOUT).decode() print("Found java version "+java_version) - if not re.search('(1.8|11)', java_version): - sys.exit("Dataverse requires OpenJDK 1.8 or 11. Please make sure it's in your PATH, and try again.") + if not re.search('(17)', java_version): + sys.exit("Dataverse requires OpenJDK 17. Please make sure it's in your PATH, and try again.") # 1e. check if the setup scripts - setup-all.sh, are available as well, maybe? # @todo (?) diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java b/src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java index 5836bd9e175..93f45bd288e 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetVersion.java @@ -1814,7 +1814,7 @@ public String getPublicationDateAsString() { // So something will need to be modified to accommodate this. -- L.A. /** * We call the export format "Schema.org JSON-LD" and extensive Javadoc can - * be found in {@link SchemaDotOrgExporter}. + * be found in {@link edu.harvard.iq.dataverse.export.SchemaDotOrgExporter}. */ public String getJsonLd() { // We show published datasets only for "datePublished" field below. diff --git a/src/main/java/edu/harvard/iq/dataverse/dataaccess/FileAccessIO.java b/src/main/java/edu/harvard/iq/dataverse/dataaccess/FileAccessIO.java index 8ee3f0cf53c..d95df1567bd 100644 --- a/src/main/java/edu/harvard/iq/dataverse/dataaccess/FileAccessIO.java +++ b/src/main/java/edu/harvard/iq/dataverse/dataaccess/FileAccessIO.java @@ -565,21 +565,26 @@ private String getDatasetDirectory() throws IOException { if (isDirectAccess()) { throw new IOException("No DvObject defined in the Data Access Object"); } - - Path datasetDirectoryPath=null; + String authorityForFS = null; + String identifierForFS = null; if (dvObject instanceof Dataset) { - datasetDirectoryPath = Paths.get(this.getDataset().getAuthorityForFileStorage(), this.getDataset().getIdentifierForFileStorage()); + authorityForFS = this.getDataset().getAuthorityForFileStorage(); + identifierForFS = this.getDataset().getIdentifierForFileStorage(); } else if (dvObject instanceof DataFile) { - datasetDirectoryPath = Paths.get(this.getDataFile().getOwner().getAuthorityForFileStorage(), this.getDataFile().getOwner().getIdentifierForFileStorage()); + authorityForFS = this.getDataFile().getOwner().getAuthorityForFileStorage(); + identifierForFS = this.getDataFile().getOwner().getIdentifierForFileStorage(); } else if (dvObject instanceof Dataverse) { throw new IOException("FileAccessIO: Dataverses are not a supported dvObject"); } - - if (datasetDirectoryPath == null) { + + if (authorityForFS == null || identifierForFS == null) { throw new IOException("Could not determine the filesystem directory of the parent dataset."); } - String datasetDirectory = Paths.get(getFilesRootDirectory(), datasetDirectoryPath.toString()).toString(); + + // Determine the final directory tree. As of JDK 16, the first component of the path MUST be non-null + // (we check for that via the setting), but also the others make no sense if they are null. + String datasetDirectory = Paths.get(getFilesRootDirectory(), authorityForFS, identifierForFS).toString(); if (dvObject.getStorageIdentifier() == null || dvObject.getStorageIdentifier().isEmpty()) { throw new IOException("Data Access: No local storage identifier defined for this datafile."); diff --git a/src/test/java/edu/harvard/iq/dataverse/api/AccessIT.java b/src/test/java/edu/harvard/iq/dataverse/api/AccessIT.java index b7bdb17ec83..3786f1351cf 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/AccessIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/AccessIT.java @@ -5,10 +5,10 @@ */ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.DataFile; import edu.harvard.iq.dataverse.util.FileUtil; import java.io.IOException; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/AdminIT.java b/src/test/java/edu/harvard/iq/dataverse/api/AdminIT.java index c9d262f6437..767175e2a76 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/AdminIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/AdminIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.DataFile; import edu.harvard.iq.dataverse.authorization.providers.builtin.BuiltinAuthenticationProvider; import edu.harvard.iq.dataverse.authorization.providers.oauth2.impl.GitHubOAuth2AP; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java index 08643b2f018..d57d7ea6d99 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/AuxiliaryFilesIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.io.File; import java.io.IOException; import java.nio.file.Path; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/BagIT.java b/src/test/java/edu/harvard/iq/dataverse/api/BagIT.java index d3ca498e447..0a5ff740931 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/BagIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/BagIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.engine.command.impl.LocalSubmitToArchiveCommand; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import static jakarta.ws.rs.core.Response.Status.CREATED; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/BatchImportIT.java b/src/test/java/edu/harvard/iq/dataverse/api/BatchImportIT.java index aa0fb0d4a1e..f20815437db 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/BatchImportIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/BatchImportIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; import java.io.File; -import com.jayway.restassured.response.Response; +import io.restassured.response.Response; import java.util.logging.Logger; import org.junit.BeforeClass; import org.junit.Test; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/BuiltinUsersIT.java b/src/test/java/edu/harvard/iq/dataverse/api/BuiltinUsersIT.java index 36a56950ec3..cf416d2afca 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/BuiltinUsersIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/BuiltinUsersIT.java @@ -1,10 +1,10 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; +import io.restassured.http.ContentType; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.api.auth.ApiKeyAuthMechanism; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import java.util.AbstractMap; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/ConfirmEmailIT.java b/src/test/java/edu/harvard/iq/dataverse/api/ConfirmEmailIT.java index e00dba2263b..0a3db70e5c6 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/ConfirmEmailIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/ConfirmEmailIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.util.logging.Logger; import static junit.framework.Assert.assertEquals; import org.junit.BeforeClass; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DataCiteIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DataCiteIT.java index 86c3eed4297..33cb5d3ea53 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DataCiteIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DataCiteIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import static junit.framework.Assert.assertEquals; import static org.hamcrest.CoreMatchers.equalTo; import org.junit.Test; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java index 69d9c78d602..e4fa9a52c32 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DataRetrieverApiIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.api.auth.ApiKeyAuthMechanism; import org.junit.BeforeClass; import org.junit.Test; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java index 4929175b89c..d333a0ce59a 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java @@ -1,11 +1,11 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; +import io.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; +import static io.restassured.RestAssured.given; -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.response.Response; +import io.restassured.http.ContentType; +import io.restassured.response.Response; import java.util.logging.Logger; @@ -13,7 +13,7 @@ import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; import org.junit.Ignore; -import com.jayway.restassured.path.json.JsonPath; +import io.restassured.path.json.JsonPath; import java.util.List; import java.util.Map; @@ -42,11 +42,11 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; -import com.jayway.restassured.parsing.Parser; +import io.restassured.parsing.Parser; -import static com.jayway.restassured.path.json.JsonPath.with; +import static io.restassured.path.json.JsonPath.with; -import com.jayway.restassured.path.xml.XmlPath; +import io.restassured.path.xml.XmlPath; import static edu.harvard.iq.dataverse.api.UtilIT.equalToCI; @@ -670,9 +670,7 @@ public void testExport() { exportDatasetAsDdi.then().assertThat() .statusCode(OK.getStatusCode()); - // This is now returning [] instead of sammi@sample.com. Not sure why. - // :ExcludeEmailFromExport is absent so the email should be shown. - assertEquals("[]", XmlPath.from(exportDatasetAsDdi.body().asString()).getString("codeBook.stdyDscr.stdyInfo.contact.@email")); + assertEquals(null, XmlPath.from(exportDatasetAsDdi.body().asString()).getString("codeBook.stdyDscr.stdyInfo.contact.@email")); assertEquals(datasetPersistentId, XmlPath.from(exportDatasetAsDdi.body().asString()).getString("codeBook.docDscr.citation.titlStmt.IDNo")); Response reexportAllFormats = UtilIT.reexportDatasetAllFormats(datasetPersistentId); @@ -762,7 +760,7 @@ public void testExcludeEmail() { assertEquals("Dataverse, Admin", XmlPath.from(exportDatasetAsDdi.body().asString()).getString("codeBook.stdyDscr.citation.distStmt.contact")); // no "sammi@sample.com" to be found https://github.com/IQSS/dataverse/issues/3443 - assertEquals("[]", XmlPath.from(exportDatasetAsDdi.body().asString()).getString("codeBook.stdyDscr.citation.distStmt.contact.@email")); + assertEquals(null, XmlPath.from(exportDatasetAsDdi.body().asString()).getString("codeBook.stdyDscr.citation.distStmt.contact.@email")); assertEquals("Sample Datasets, inc.", XmlPath.from(exportDatasetAsDdi.body().asString()).getString("codeBook.stdyDscr.citation.distStmt.contact.@affiliation")); assertEquals(datasetPersistentId, XmlPath.from(exportDatasetAsDdi.body().asString()).getString("codeBook.docDscr.citation.titlStmt.IDNo")); diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DataversesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DataversesIT.java index eb8511f8ffe..cb684bc3506 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DataversesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DataversesIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; -import static com.jayway.restassured.path.json.JsonPath.with; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; +import static io.restassured.path.json.JsonPath.with; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.Dataverse; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import edu.harvard.iq.dataverse.util.BundleUtil; @@ -31,7 +31,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import java.nio.file.Files; -import com.jayway.restassured.path.json.JsonPath; +import io.restassured.path.json.JsonPath; import org.hamcrest.CoreMatchers; import org.hamcrest.Matchers; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DeactivateUsersIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DeactivateUsersIT.java index 3ffca21d5e6..2a6d69e9c89 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DeactivateUsersIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DeactivateUsersIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.authorization.DataverseRole; import java.util.ArrayList; import java.util.Collections; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DeleteUsersIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DeleteUsersIT.java index e4c72cf4e1d..91afb1b9d52 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DeleteUsersIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DeleteUsersIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.authorization.DataverseRole; import java.io.File; import java.io.IOException; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DownloadFilesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DownloadFilesIT.java index dc30c53c8e5..e414afdbe48 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DownloadFilesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DownloadFilesIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Headers; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.http.Headers; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/DuplicateFilesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/DuplicateFilesIT.java index 19adb7ba98f..93bb6637b18 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/DuplicateFilesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/DuplicateFilesIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.parsing.Parser; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.parsing.Parser; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.io.File; import java.io.IOException; import java.nio.file.Files; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/EditDDIIT.java b/src/test/java/edu/harvard/iq/dataverse/api/EditDDIIT.java index 5295637dd4f..9c49350cfa6 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/EditDDIIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/EditDDIIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.datavariable.VarGroup; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/ExternalToolsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/ExternalToolsIT.java index 4d78e535a9b..eca34b00f53 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/ExternalToolsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/ExternalToolsIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.io.File; import java.io.IOException; import java.io.StringReader; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/FeedbackApiIT.java b/src/test/java/edu/harvard/iq/dataverse/api/FeedbackApiIT.java index f61468e28ef..856f09733ff 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/FeedbackApiIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/FeedbackApiIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import jakarta.json.Json; import jakarta.json.JsonObjectBuilder; import static jakarta.ws.rs.core.Response.Status.CREATED; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/FileMetadataIT.java b/src/test/java/edu/harvard/iq/dataverse/api/FileMetadataIT.java index b05c81abf6a..72d070f0a03 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/FileMetadataIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/FileMetadataIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.http.ContentType; +import io.restassured.response.Response; import org.apache.commons.io.IOUtils; import org.junit.After; import org.junit.AfterClass; @@ -12,7 +12,7 @@ import java.util.UUID; -import static com.jayway.restassured.RestAssured.given; +import static io.restassured.RestAssured.given; import static jakarta.ws.rs.core.Response.Status.OK; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.fail; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/FileTypeDetectionIT.java b/src/test/java/edu/harvard/iq/dataverse/api/FileTypeDetectionIT.java index aeab3c00777..82c07803543 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/FileTypeDetectionIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/FileTypeDetectionIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import jakarta.json.Json; import jakarta.json.JsonObjectBuilder; import static jakarta.ws.rs.core.Response.Status.CREATED; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java index cb13c49083d..137cbee6b36 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java @@ -1,15 +1,15 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import java.util.logging.Logger; import edu.harvard.iq.dataverse.api.auth.ApiKeyAuthMechanism; import org.junit.Test; import org.junit.BeforeClass; -import com.jayway.restassured.path.json.JsonPath; -import static com.jayway.restassured.path.json.JsonPath.with; -import com.jayway.restassured.path.xml.XmlPath; +import io.restassured.path.json.JsonPath; +import static io.restassured.path.json.JsonPath.with; +import io.restassured.path.xml.XmlPath; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import edu.harvard.iq.dataverse.util.BundleUtil; import edu.harvard.iq.dataverse.util.SystemConfig; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/FitsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/FitsIT.java index 66c81898090..f8e949b3211 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/FitsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/FitsIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.path.json.JsonPath.with; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import static io.restassured.path.json.JsonPath.with; +import io.restassured.response.Response; import java.io.IOException; import java.util.List; import java.util.Map; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/HarvestingClientsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/HarvestingClientsIT.java index 3e36da415f3..73dc90fc9e2 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/HarvestingClientsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/HarvestingClientsIT.java @@ -2,11 +2,11 @@ import java.util.logging.Logger; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.path.json.JsonPath; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; +import io.restassured.path.json.JsonPath; import org.junit.Test; -import com.jayway.restassured.response.Response; +import io.restassured.response.Response; import static jakarta.ws.rs.core.Response.Status.CREATED; import static jakarta.ws.rs.core.Response.Status.UNAUTHORIZED; import static jakarta.ws.rs.core.Response.Status.ACCEPTED; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/HarvestingServerIT.java b/src/test/java/edu/harvard/iq/dataverse/api/HarvestingServerIT.java index 65f35f76cb1..5ff18742ccb 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/HarvestingServerIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/HarvestingServerIT.java @@ -2,15 +2,15 @@ import java.util.logging.Level; import java.util.logging.Logger; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; import org.junit.BeforeClass; import org.junit.AfterClass; import org.junit.Test; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; -import com.jayway.restassured.response.Response; -import com.jayway.restassured.path.xml.XmlPath; -import com.jayway.restassured.path.xml.element.Node; +import io.restassured.response.Response; +import io.restassured.path.xml.XmlPath; +import io.restassured.path.xml.element.Node; import java.util.ArrayList; import java.util.Collections; import static jakarta.ws.rs.core.Response.Status.OK; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/InReviewWorkflowIT.java b/src/test/java/edu/harvard/iq/dataverse/api/InReviewWorkflowIT.java index ca082c5ce95..20fbcf698ae 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/InReviewWorkflowIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/InReviewWorkflowIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.path.xml.XmlPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.path.xml.XmlPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.authorization.DataverseRole; import java.util.logging.Logger; import jakarta.json.Json; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/IndexIT.java b/src/test/java/edu/harvard/iq/dataverse/api/IndexIT.java index 72d834786a9..12608ac340c 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/IndexIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/IndexIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import static edu.harvard.iq.dataverse.api.UtilIT.API_TOKEN_HTTP_HEADER; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import java.util.ArrayList; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/InfoIT.java b/src/test/java/edu/harvard/iq/dataverse/api/InfoIT.java index 73a1171bf1b..2c782bc53ef 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/InfoIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/InfoIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.response.Response; +import static io.restassured.RestAssured.given; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import org.junit.Test; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/InvalidCharactersIT.java b/src/test/java/edu/harvard/iq/dataverse/api/InvalidCharactersIT.java index 63af8ea13e1..47a9cf66f62 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/InvalidCharactersIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/InvalidCharactersIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import java.io.File; import java.io.IOException; import java.nio.file.Path; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/IpGroupsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/IpGroupsIT.java index d73f07bd530..23adb9bc415 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/IpGroupsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/IpGroupsIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.authorization.DataverseRole; import java.util.ArrayList; import java.util.List; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/LicensesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/LicensesIT.java index 4e2e5e117fc..a54a3133863 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/LicensesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/LicensesIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import static jakarta.ws.rs.core.Response.Status.FORBIDDEN; import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java b/src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java index 5b0c8e56467..7b25d0cea44 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/LinkIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.util.logging.Logger; import static jakarta.ws.rs.core.Response.Status.CREATED; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/LogoutIT.java b/src/test/java/edu/harvard/iq/dataverse/api/LogoutIT.java index eaa6fc5270f..76fc1e2161d 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/LogoutIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/LogoutIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import org.junit.BeforeClass; import org.junit.jupiter.api.Test; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/MakeDataCountApiIT.java b/src/test/java/edu/harvard/iq/dataverse/api/MakeDataCountApiIT.java index c85920807fd..cc0df065e48 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/MakeDataCountApiIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/MakeDataCountApiIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import java.io.File; import java.io.IOException; import static jakarta.ws.rs.core.Response.Status.CREATED; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java b/src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java index f941cd0b0a9..c301e158b4e 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/MetadataBlocksIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import org.hamcrest.CoreMatchers; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/MetricsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/MetricsIT.java index cdbf2251ea3..4343ca5b6ac 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/MetricsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/MetricsIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.metrics.MetricsUtil; import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; import static jakarta.ws.rs.core.Response.Status.OK; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/MoveIT.java b/src/test/java/edu/harvard/iq/dataverse/api/MoveIT.java index 537fe09317c..2fa059ce330 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/MoveIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/MoveIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import static com.jayway.restassured.path.json.JsonPath.with; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import static io.restassured.path.json.JsonPath.with; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.authorization.DataverseRole; import java.io.StringReader; import java.util.List; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/NetcdfIT.java b/src/test/java/edu/harvard/iq/dataverse/api/NetcdfIT.java index 0b1862ad687..9cd06a22683 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/NetcdfIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/NetcdfIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.io.File; import java.io.IOException; import java.nio.file.Path; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/NotificationsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/NotificationsIT.java index f7955726b88..d2f94704b82 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/NotificationsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/NotificationsIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.util.logging.Logger; import static jakarta.ws.rs.core.Response.Status.CREATED; import static jakarta.ws.rs.core.Response.Status.OK; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/PidsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/PidsIT.java index 7983bf3708e..929b6e69137 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/PidsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/PidsIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import static jakarta.ws.rs.core.Response.Status.CREATED; import static jakarta.ws.rs.core.Response.Status.FORBIDDEN; import static jakarta.ws.rs.core.Response.Status.OK; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/ProvIT.java b/src/test/java/edu/harvard/iq/dataverse/api/ProvIT.java index dc3c01099e3..7290658d00e 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/ProvIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/ProvIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import jakarta.json.Json; import jakarta.json.JsonArray; import jakarta.json.JsonObject; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/RemoteStoreIT.java b/src/test/java/edu/harvard/iq/dataverse/api/RemoteStoreIT.java index 286013f7727..9f37c27cd09 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/RemoteStoreIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/RemoteStoreIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import jakarta.json.Json; import jakarta.json.JsonObjectBuilder; import static jakarta.ws.rs.core.Response.Status.CREATED; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/RolesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/RolesIT.java index d1e2ffb2426..49859c6fd00 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/RolesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/RolesIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.util.logging.Logger; import static junit.framework.Assert.assertEquals; import static org.hamcrest.CoreMatchers.equalTo; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/S3AccessIT.java b/src/test/java/edu/harvard/iq/dataverse/api/S3AccessIT.java index e39172b4c73..18a65f1a082 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/S3AccessIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/S3AccessIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.util.logging.Logger; import static jakarta.ws.rs.core.Response.Status.OK; import static junit.framework.Assert.assertEquals; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java b/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java index b6823ddbea4..24faad34ac6 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import java.util.logging.Level; import java.util.logging.Logger; @@ -310,7 +310,7 @@ public void testSearchDynamicMetadataFields() { allFieldsFromCitation.then().assertThat() .body("data.items[0].metadataBlocks.citation.displayName", CoreMatchers.equalTo("Citation Metadata")) // Many fields returned, all of the citation block that has been filled in. - .body("data.items[0].metadataBlocks.citation.fields.typeName.size", Matchers.equalTo(5)) + .body("data.items[0].metadataBlocks.citation.fields", Matchers.hasSize(5)) .statusCode(OK.getStatusCode()); } diff --git a/src/test/java/edu/harvard/iq/dataverse/api/SignedUrlAuthMechanismIT.java b/src/test/java/edu/harvard/iq/dataverse/api/SignedUrlAuthMechanismIT.java index 729b4f85e9f..ddd7873054b 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/SignedUrlAuthMechanismIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/SignedUrlAuthMechanismIT.java @@ -1,11 +1,11 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import org.junit.BeforeClass; import org.junit.jupiter.api.Test; -import static com.jayway.restassured.RestAssured.get; +import static io.restassured.RestAssured.get; import static jakarta.ws.rs.core.Response.Status.OK; import static jakarta.ws.rs.core.Response.Status.UNAUTHORIZED; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/SignpostingIT.java b/src/test/java/edu/harvard/iq/dataverse/api/SignpostingIT.java index 585eac91d18..39959e7dce4 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/SignpostingIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/SignpostingIT.java @@ -1,10 +1,10 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.http.ContentType; +import io.restassured.RestAssured; +import io.restassured.http.ContentType; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.response.Response; +import static io.restassured.RestAssured.given; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.util.json.JsonUtil; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/SiteMapIT.java b/src/test/java/edu/harvard/iq/dataverse/api/SiteMapIT.java index 723f05d3802..017ad014ffb 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/SiteMapIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/SiteMapIT.java @@ -1,9 +1,9 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; +import io.restassured.RestAssured; import org.junit.BeforeClass; import org.junit.Test; -import com.jayway.restassured.response.Response; +import io.restassured.response.Response; public class SiteMapIT { diff --git a/src/test/java/edu/harvard/iq/dataverse/api/StorageSitesIT.java b/src/test/java/edu/harvard/iq/dataverse/api/StorageSitesIT.java index b2f6e6151a1..1d93205fddd 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/StorageSitesIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/StorageSitesIT.java @@ -1,7 +1,7 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.locality.StorageSite; import edu.harvard.iq.dataverse.util.SystemConfig; import jakarta.json.Json; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/SwordIT.java b/src/test/java/edu/harvard/iq/dataverse/api/SwordIT.java index 95d9525f6db..2c0dc7621dc 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/SwordIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/SwordIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.api.datadeposit.SwordConfigurationImpl; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import java.io.File; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/TabularIT.java b/src/test/java/edu/harvard/iq/dataverse/api/TabularIT.java index 70267d70f5b..3442dddcf05 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/TabularIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/TabularIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.io.File; import java.util.Arrays; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/ThumbnailsIT.java b/src/test/java/edu/harvard/iq/dataverse/api/ThumbnailsIT.java index ffa432de63b..c02b116f3b0 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/ThumbnailsIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/ThumbnailsIT.java @@ -1,6 +1,6 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.response.Response; +import io.restassured.response.Response; import org.hamcrest.CoreMatchers; import org.junit.Test; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/UsersIT.java b/src/test/java/edu/harvard/iq/dataverse/api/UsersIT.java index 76f153721c0..203b897ab01 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/UsersIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/UsersIT.java @@ -1,10 +1,10 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.RestAssured; -import static com.jayway.restassured.RestAssured.given; -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import static io.restassured.RestAssured.given; +import io.restassured.http.ContentType; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.authorization.DataverseRole; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; import java.util.ArrayList; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java b/src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java index 5f61ab3f2c7..c8be2bbf177 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/UtilIT.java @@ -1,8 +1,8 @@ package edu.harvard.iq.dataverse.api; -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.http.ContentType; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import java.util.UUID; import java.util.logging.Logger; import jakarta.json.Json; @@ -19,12 +19,12 @@ import java.time.LocalDateTime; import java.util.logging.Level; import edu.harvard.iq.dataverse.api.datadeposit.SwordConfigurationImpl; -import com.jayway.restassured.path.xml.XmlPath; +import io.restassured.path.xml.XmlPath; import edu.harvard.iq.dataverse.mydata.MyDataFilterParams; import org.apache.commons.lang3.StringUtils; import org.junit.Test; import edu.harvard.iq.dataverse.settings.SettingsServiceBean; -import com.jayway.restassured.specification.RequestSpecification; +import io.restassured.specification.RequestSpecification; import java.util.List; import com.mashape.unirest.http.Unirest; import com.mashape.unirest.http.exceptions.UnirestException; @@ -40,9 +40,9 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import static com.jayway.restassured.RestAssured.put; -import static com.jayway.restassured.path.xml.XmlPath.from; -import static com.jayway.restassured.RestAssured.given; +import static io.restassured.RestAssured.put; +import static io.restassured.path.xml.XmlPath.from; +import static io.restassured.RestAssured.given; import edu.harvard.iq.dataverse.DatasetField; import edu.harvard.iq.dataverse.DatasetFieldType; import edu.harvard.iq.dataverse.DatasetFieldValue; diff --git a/src/test/java/edu/harvard/iq/dataverse/api/filesystem/FileRecordJobIT.java b/src/test/java/edu/harvard/iq/dataverse/api/filesystem/FileRecordJobIT.java index 5cfce389ed6..6bec7575c23 100644 --- a/src/test/java/edu/harvard/iq/dataverse/api/filesystem/FileRecordJobIT.java +++ b/src/test/java/edu/harvard/iq/dataverse/api/filesystem/FileRecordJobIT.java @@ -20,10 +20,10 @@ */ import com.fasterxml.jackson.databind.ObjectMapper; -import com.jayway.restassured.RestAssured; -import com.jayway.restassured.http.ContentType; -import com.jayway.restassured.path.json.JsonPath; -import com.jayway.restassured.response.Response; +import io.restassured.RestAssured; +import io.restassured.http.ContentType; +import io.restassured.path.json.JsonPath; +import io.restassured.response.Response; import edu.harvard.iq.dataverse.api.UtilIT; import edu.harvard.iq.dataverse.authorization.DataverseRole; import edu.harvard.iq.dataverse.batch.entities.JobExecutionEntity; @@ -55,7 +55,7 @@ import java.util.Random; import java.util.UUID; -import static com.jayway.restassured.RestAssured.given; +import static io.restassured.RestAssured.given; import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertTrue; import static junit.framework.Assert.fail; diff --git a/src/test/java/edu/harvard/iq/dataverse/export/OpenAireExporterTest.java b/src/test/java/edu/harvard/iq/dataverse/export/OpenAireExporterTest.java index aa1668201ba..9c6002a26db 100644 --- a/src/test/java/edu/harvard/iq/dataverse/export/OpenAireExporterTest.java +++ b/src/test/java/edu/harvard/iq/dataverse/export/OpenAireExporterTest.java @@ -1,6 +1,6 @@ package edu.harvard.iq.dataverse.export; -import com.jayway.restassured.path.xml.XmlPath; +import io.restassured.path.xml.XmlPath; import edu.harvard.iq.dataverse.util.xml.XmlPrinter; import io.gdcc.spi.export.ExportDataProvider; import io.gdcc.spi.export.XMLExporter; diff --git a/src/test/java/edu/harvard/iq/dataverse/mocks/MocksFactory.java b/src/test/java/edu/harvard/iq/dataverse/mocks/MocksFactory.java index 7d6e663a547..927d288d660 100644 --- a/src/test/java/edu/harvard/iq/dataverse/mocks/MocksFactory.java +++ b/src/test/java/edu/harvard/iq/dataverse/mocks/MocksFactory.java @@ -143,6 +143,7 @@ public static Dataset makeDataset() { Dataset ds = new Dataset(); ds.setId( nextId() ); ds.setIdentifier("sample-ds-" + ds.getId() ); + ds.setAuthority("10.5072"); ds.setCategoriesByName( Arrays.asList("CatOne", "CatTwo", "CatThree") ); final List files = makeFiles(10); final List metadatas = new ArrayList<>(10);