Skip to content

Commit

Permalink
Dependency Updates (#35)
Browse files Browse the repository at this point in the history
* Bump spring versions to match other duracloud projects

* SF -> 5.3.x
* Data -> 2.7.x
* Security -> 5.8.x
* Batch -> 4.3.x
* Update duracloud deps to latest release
* Match commons-lang3 with duracloud version
* Update easymock
* Update spring data api usage
* Remove exception which no longer exists
* Replace wix with testcontainers
* Update slf4j and logback
* Update jackson
* Update hibernate and mysql-connector
* Misc dependency updates
* javax.interceptor-api
* aspectjweaver
* dbcp2
* mapdb
* Plugin updates
* Add maven-war-plugin
* Remove redundant groupId
* Update CI to java 17
* Another maven plugin update
* Increase memory usage for maven
* Set release version to 17
  • Loading branch information
mikejritter authored Mar 1, 2024
1 parent 00f203f commit e47e15a
Show file tree
Hide file tree
Showing 18 changed files with 111 additions and 122 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
env:
# Specify memory for Maven
MAVEN_OPTS: "-Xmx256M"
MAVEN_OPTS: "-Xmx512M"
steps:
# Output current build environment
- run: echo "This is a CI build of branch ${{ github.ref }} in repository ${{ github.repository }}"
Expand All @@ -20,10 +20,10 @@ jobs:
uses: actions/checkout@v2

# https://github.com/actions/setup-java
- name: Install JDK 11
- name: Install JDK 17
uses: actions/setup-java@v2
with:
java-version: 11
java-version: 17
distribution: adopt

# https://github.com/actions/cache
Expand All @@ -47,7 +47,7 @@ jobs:
uses: actions/setup-java@v2
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
with:
java-version: 11
java-version: 17
distribution: adopt
server-id: sonatype-snapshots # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for sonatype username
Expand All @@ -59,7 +59,7 @@ jobs:
uses: actions/setup-java@v2
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
with:
java-version: 11
java-version: 17
distribution: adopt
server-id: sonatype-releases # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for sonatype username
Expand Down
86 changes: 43 additions & 43 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.3</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -135,7 +135,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -158,7 +158,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -185,18 +185,20 @@
<log.level.default>INFO</log.level.default>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<slf4j.version>1.7.6</slf4j.version>
<springframework.version>4.3.30.RELEASE</springframework.version>
<springframework.data.jpa.version>1.11.23.RELEASE</springframework.data.jpa.version>
<springframework.security.version>4.2.20.RELEASE</springframework.security.version>
<spring.batch.version>3.0.7.RELEASE</spring.batch.version>
<hibernate.version>5.4.3.Final</hibernate.version>
<mysql.connector.version>5.1.49</mysql.connector.version>
<duracloud.version>7.1.0</duracloud.version>
<duracloud.db.version>7.1.0</duracloud.db.version>
<slf4j.version>2.0.9</slf4j.version>
<logback.version>1.4.14</logback.version>
<springframework.version>5.3.29</springframework.version>
<springframework.data.jpa.version>2.7.15</springframework.data.jpa.version>
<springframework.security.version>5.8.5</springframework.security.version>
<spring.batch.version>4.3.10</spring.batch.version>
<hibernate.version>5.4.33.Final</hibernate.version>
<hibernate.validator.version>5.4.3.Final</hibernate.validator.version>
<mysql.connector.version>8.2.0</mysql.connector.version>
<duracloud.version>8.0.0</duracloud.version>
<duracloud.db.version>8.0.0</duracloud.db.version>
<duraspace-codestyle.version>1.1.0</duraspace-codestyle.version>
<enforce-victims.rule.version>1.3.4</enforce-victims.rule.version>
<jackson.version>2.12.3</jackson.version>
<jackson.version>2.16.0</jackson.version>
<jaxb.api.version>2.3.1</jaxb.api.version>
<jaxb.runtime.version>2.3.3</jaxb.runtime.version>
<javax.annotation.api.version>1.3.2</javax.annotation.api.version>
Expand Down Expand Up @@ -261,7 +263,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.6</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-releases</serverId>
Expand All @@ -276,9 +278,9 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<release>11</release>
<release>17</release>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
Expand All @@ -304,7 +306,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<version>3.2.3</version>
<configuration>
<systemProperties/>
</configuration>
Expand Down Expand Up @@ -361,7 +363,7 @@

<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resources</id>
Expand All @@ -385,7 +387,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.4.1</version>
<executions>
<execution>
<goals>
Expand All @@ -403,7 +405,7 @@
</excludes>
</bannedDependencies>
<requireMavenVersion>
<version>[3.5.0,4.0.0)</version>
<version>[3.6.3,4.0.0)</version>
</requireMavenVersion>
</rules>
</configuration>
Expand All @@ -415,7 +417,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.0</version>
<version>3.3.1</version>
<executions>
<execution>
<id>verify-style</id>
Expand Down Expand Up @@ -566,7 +568,7 @@
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>1.2</version>
<version>1.2.2</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -602,7 +604,7 @@
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.8</version>
<version>1.9.21</version>
</dependency>

<!-- Spring Batch dependencies -->
Expand All @@ -621,7 +623,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1</version>
<version>2.11.0</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
Expand All @@ -637,6 +639,7 @@
</dependency>

<dependency>
<!-- this was moved to jakarta.xml.bind-api -->
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.api.version}</version>
Expand All @@ -657,7 +660,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.0</version>
<version>${logback.version}</version>
</dependency>

<dependency>
Expand All @@ -673,11 +676,18 @@
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${mysql.connector.version}</version>
</dependency>

<!-- Needed for convergence issue w/ Hibernate -->
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.4.1.Final</version>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
Expand All @@ -687,12 +697,8 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate.version}</version>
<version>${hibernate.validator.version}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml</groupId>
<artifactId>classmate</artifactId>
Expand Down Expand Up @@ -721,21 +727,15 @@
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>4.0.2</version>
<version>5.2.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.wix</groupId>
<artifactId>wix-embedded-mysql</artifactId>
<version>2.2.10</version>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<version>1.19.3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down Expand Up @@ -782,7 +782,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
<version>3.12.0</version>
</dependency>


Expand Down
8 changes: 6 additions & 2 deletions rewrite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.duracloud.snapshot</groupId>
<artifactId>ROOT</artifactId>
<packaging>war</packaging>
<version>3.2.0-SNAPSHOT</version>
Expand All @@ -22,7 +21,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<version>3.6.1</version>
<executions>
<execution>
<id>copy-build-artifact</id>
Expand All @@ -47,6 +46,11 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
</plugin>
</plugins>
</build>

Expand Down
9 changes: 4 additions & 5 deletions snapshot-bridge-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<version>3.2.0-SNAPSHOT</version>
<groupId>org.duracloud.snapshot</groupId>
<artifactId>bridge</artifactId>
<packaging>war</packaging>
<name>DuraCloud to Bridge Web Application</name>
Expand Down Expand Up @@ -50,7 +49,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<version>3.4.0</version>
<configuration>
<warName>${project.artifactId}-${project.version}</warName>
<webResources>
Expand All @@ -64,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<version>3.6.1</version>
<executions>
<execution>
<id>copy-build-artifact</id>
Expand Down Expand Up @@ -220,8 +219,8 @@
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ public Response create(@PathParam("snapshotId") String snapshotId,
log.info("cleaning up post exception...");
try {
log.debug("deleting newly created snapshot...");
snapshotRepo.delete(snapshot.getId());
snapshotRepo.deleteById(snapshot.getId());
} catch (Exception e) {
log.error("failed to cleanup snapshot " + snapshotId + ": " +
e.getMessage(), e);
Expand Down Expand Up @@ -778,7 +778,7 @@ public Response getContent(@PathParam("snapshotId") String snapshotId,
pageSize = 1000;
}

PageRequest pageable = new PageRequest(page, pageSize);
PageRequest pageable = PageRequest.of(page, pageSize);

List<SnapshotContentItem> items;
if (null == prefix || prefix.equals("")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import java.util.Date;
import javax.ws.rs.core.Response;

import org.codehaus.jettison.json.JSONException;
import org.duracloud.snapshot.SnapshotException;
import org.duracloud.snapshot.common.test.SnapshotTestBase;
import org.duracloud.snapshot.db.model.DuracloudEndPointConfig;
Expand Down Expand Up @@ -162,7 +161,7 @@ public void testCancelSnapshot() throws SnapshotException {
}

@Test
public void testGetRestore() throws SnapshotException, JSONException {
public void testGetRestore() throws SnapshotException {
String restorationId = "restoration-id";
Restoration restoration = setupRestoration();
expect(manager.get(restorationId)).andReturn(restoration);
Expand All @@ -173,7 +172,7 @@ public void testGetRestore() throws SnapshotException, JSONException {
}

@Test
public void testGetRestoreBySnapshot() throws SnapshotException, JSONException {
public void testGetRestoreBySnapshot() throws SnapshotException {
String snapshotId = "snapshot-id";
Restoration restoration = setupRestoration();
expect(manager.getBySnapshotId(snapshotId)).andReturn(restoration);
Expand Down
Loading

0 comments on commit e47e15a

Please sign in to comment.