Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
java-version: '21'
distribution: 'corretto'
cache: maven
- name: Maven version
run: mvn --version
- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn clean package
- name: Codecov
uses: codecov/[email protected]
57 changes: 43 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>

<groupId>com.amazonaws.secretsmanager</groupId>
<artifactId>aws-secretsmanager-caching-java</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<packaging>jar</packaging>


Expand Down Expand Up @@ -35,6 +37,7 @@
</scm>

<properties>
<maven.compiler.release>8</maven.compiler.release>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -44,27 +47,33 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>secretsmanager</artifactId>
<version>2.20.93</version>
<version>2.29.6</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.8.0</version>
<version>7.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.4.0</version>
<version>5.14.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>4.8.6</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.13.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -76,7 +85,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -89,7 +98,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<version>3.11.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -101,7 +110,7 @@
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.0</version>
<configuration>
<configLocation>${basedir}/config/checkstyle/checkstyle.xml</configLocation>
<consoleOutput>true</consoleOutput>
Expand All @@ -121,9 +130,9 @@
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.6.5</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
Expand All @@ -143,7 +152,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.10</version>
<version>0.8.12</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand All @@ -160,6 +169,26 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<configuration>
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
</configuration>
</plugin>
</plugins>
</build>

Expand All @@ -171,7 +200,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.util.concurrent.TimeUnit;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;


Expand Down Expand Up @@ -71,6 +72,7 @@ public SecretCacheConfiguration() {
*
* @return The AWS Secrets Manager client.
*/
@SuppressFBWarnings(value = "EI_EXPOSE_REP")
public SecretsManagerClient getClient() {
return client;
}
Expand All @@ -83,6 +85,7 @@ public SecretsManagerClient getClient() {
* @param client
* The AWS Secrets Manager client.
*/
@SuppressFBWarnings(value = "EI_EXPOSE_REP2")
public void setClient(SecretsManagerClient client) {
this.client = client;
}
Expand All @@ -106,6 +109,7 @@ public SecretCacheConfiguration withClient(SecretsManagerClient client) {
*
* @return The object used to hook in-memory cache updates.
*/
@SuppressFBWarnings(value = "EI_EXPOSE_REP")
public SecretCacheHook getCacheHook() {
return cacheHook;
}
Expand All @@ -117,6 +121,7 @@ public SecretCacheHook getCacheHook() {
* @param cacheHook
* The interface used to hook the in-memory cache.
*/
@SuppressFBWarnings(value = "EI_EXPOSE_REP2")
public void setCacheHook(SecretCacheHook cacheHook) {
this.cacheHook = cacheHook;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.concurrent.ThreadLocalRandom;

import com.amazonaws.secretsmanager.caching.SecretCacheConfiguration;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import software.amazon.awssdk.services.secretsmanager.SecretsManagerClient;
import software.amazon.awssdk.services.secretsmanager.model.GetSecretValueResponse;

Expand Down Expand Up @@ -92,6 +92,7 @@ public abstract class SecretCacheObject<T> {
* @param config
* The secret cache configuration.
*/
@SuppressFBWarnings(value = "EI_EXPOSE_REP2")
public SecretCacheObject(final String secretId,
final SecretsManagerClient client,
final SecretCacheConfiguration config) {
Expand Down
Loading