Skip to content

Commit 086157b

Browse files
committed
updated POM to use JDK 21
1 parent 655a3a0 commit 086157b

File tree

15 files changed

+35
-121
lines changed

15 files changed

+35
-121
lines changed

javav2/example_code/batch/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<version>1.0-SNAPSHOT</version>
99
<properties>
1010
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11-
<java.version>17</java.version>
12-
<maven.compiler.target>17</maven.compiler.target>
13-
<maven.compiler.source>17</maven.compiler.source>
11+
<java.version>21</java.version>
12+
<maven.compiler.target>21</maven.compiler.target>
13+
<maven.compiler.source>21</maven.compiler.source>
1414
</properties>
1515
<build>
1616
<plugins>
@@ -35,7 +35,7 @@
3535
<dependency>
3636
<groupId>software.amazon.awssdk</groupId>
3737
<artifactId>bom</artifactId>
38-
<version>2.29.45</version>
38+
<version>2.31.8</version>
3939
<type>pom</type>
4040
<scope>import</scope>
4141
</dependency>

javav2/example_code/batch/src/test/java/BatchTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
2929
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
3030
public class BatchTest {
31-
private static String computeEnvironmentName = "my-compute-environment" ;
32-
private static String jobQueueName = "my-job-queue";
31+
private static String computeEnvironmentName = "my-compute-environment12" ;
32+
private static String jobQueueName = "my-job-queue12";
3333
private static String jobDefinitionName = "my-job-definition";
3434
private static String dockerImage = "dkr.ecr.us-east-1.amazonaws.com/echo-text:echo-text";
3535
private static String subnet = "" ;
@@ -206,7 +206,6 @@ public void testDeleteComputeEnvironment() {
206206
private static String getSecretValues() {
207207
SecretsManagerClient secretClient = SecretsManagerClient.builder()
208208
.region(Region.US_EAST_1)
209-
.credentialsProvider(EnvironmentVariableCredentialsProvider.create())
210209
.build();
211210
String secretName = "test/batch";
212211

javav2/example_code/cloudformation/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<version>1.0-SNAPSHOT</version>
99
<properties>
1010
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11-
<java.version>17</java.version>
12-
<maven.compiler.target>17</maven.compiler.target>
13-
<maven.compiler.source>17</maven.compiler.source>
11+
<java.version>21</java.version>
12+
<maven.compiler.target>21</maven.compiler.target>
13+
<maven.compiler.source>21</maven.compiler.source>
1414
</properties>
1515
<build>
1616
<plugins>
@@ -35,7 +35,7 @@
3535
<dependency>
3636
<groupId>software.amazon.awssdk</groupId>
3737
<artifactId>bom</artifactId>
38-
<version>2.29.45</version>
38+
<version>2.31.8</version>
3939
<type>pom</type>
4040
<scope>import</scope>
4141
</dependency>

javav2/example_code/cloudformation/src/test/java/CloudFormationTest.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public class CloudFormationTest {
3030
public static void setUp() {
3131
cfClient = CloudFormationClient.builder()
3232
.region(Region.US_EAST_1)
33-
.credentialsProvider(EnvironmentVariableCredentialsProvider.create())
3433
.build();
3534

3635
// Get the values to run these tests from AWS Secrets Manager.
@@ -42,31 +41,6 @@ public static void setUp() {
4241
location = values.getLocation();
4342
key = values.getKey();
4443
value = values.getValue();
45-
46-
// Uncomment this code block if you prefer using a config.properties file to
47-
// retrieve AWS values required for these tests.
48-
/*
49-
* try (InputStream input =
50-
* CloudFormationTest.class.getClassLoader().getResourceAsStream(
51-
* "config.properties")) {
52-
* Properties prop = new Properties();
53-
* if (input == null) {
54-
* System.out.println("Sorry, unable to find config.properties");
55-
* return;
56-
* }
57-
*
58-
* // Populate the data members required for all tests.
59-
* prop.load(input);
60-
* stackName = prop.getProperty("stackName");
61-
* roleARN = prop.getProperty("roleARN");
62-
* location = prop.getProperty("location");
63-
* key = prop.getProperty("key");
64-
* value = prop.getProperty("value");
65-
*
66-
* } catch (IOException ex) {
67-
* ex.printStackTrace();
68-
* }
69-
*/
7044
}
7145

7246
@Test
@@ -104,7 +78,6 @@ public void DeleteStack() {
10478
private static String getSecretValues() {
10579
SecretsManagerClient secretClient = SecretsManagerClient.builder()
10680
.region(Region.US_EAST_1)
107-
.credentialsProvider(EnvironmentVariableCredentialsProvider.create())
10881
.build();
10982
String secretName = "test/cloudformation";
11083

javav2/example_code/cloudfront/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<version>1.0-SNAPSHOT</version>
99
<properties>
1010
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11-
<java.version>17</java.version>
12-
<maven.compiler.target>17</maven.compiler.target>
13-
<maven.compiler.source>17</maven.compiler.source>
11+
<java.version>21</java.version>
12+
<maven.compiler.target>21</maven.compiler.target>
13+
<maven.compiler.source>21</maven.compiler.source>
1414
</properties>
1515
<build>
1616
<plugins>
@@ -35,7 +35,7 @@
3535
<dependency>
3636
<groupId>software.amazon.awssdk</groupId>
3737
<artifactId>bom</artifactId>
38-
<version>2.30.31</version>
38+
<version>2.31.8</version>
3939
<type>pom</type>
4040
<scope>import</scope>
4141
</dependency>

javav2/example_code/cloudfront/src/test/java/CloudFrontSigningTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ static void setUp() throws IOException {
5858
// Run tests on Real AWS resources.
5959
cloudFrontClient = CloudFrontClient.builder()
6060
.region(Region.AWS_GLOBAL)
61-
.credentialsProvider(ProfileCredentialsProvider.create())
6261
.build();
62+
6363
s3Client = S3Client.builder()
6464
.region(Region.US_EAST_1)
65-
.credentialsProvider(ProfileCredentialsProvider.create())
66-
.build();
65+
.build();
6766

6867
try (InputStream input = CloudFrontSigningTest.class.getClassLoader().getResourceAsStream("config.properties")) {
6968
Properties prop = new Properties();

javav2/example_code/cloudfront/src/test/java/CloudFrontTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public static void setUp() throws IOException {
4545
region = Region.AWS_GLOBAL;
4646
cloudFrontClient = CloudFrontClient.builder()
4747
.region(region)
48-
.credentialsProvider(ProfileCredentialsProvider.create())
4948
.build();
5049
try (InputStream input = CloudFrontTest.class.getClassLoader().getResourceAsStream("config.properties")) {
5150

javav2/example_code/cloudtrail/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<version>1.0-SNAPSHOT</version>
99
<properties>
1010
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11-
<java.version>17</java.version>
12-
<maven.compiler.target>17</maven.compiler.target>
13-
<maven.compiler.source>17</maven.compiler.source>
11+
<java.version>21</java.version>
12+
<maven.compiler.target>21</maven.compiler.target>
13+
<maven.compiler.source>21</maven.compiler.source>
1414
</properties>
1515
<build>
1616
<plugins>
@@ -35,7 +35,7 @@
3535
<dependency>
3636
<groupId>software.amazon.awssdk</groupId>
3737
<artifactId>bom</artifactId>
38-
<version>2.29.45</version>
38+
<version>2.31.8</version>
3939
<type>pom</type>
4040
<scope>import</scope>
4141
</dependency>

javav2/example_code/cloudtrail/src/test/java/CloudTrailTest.java

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ public class CloudTrailTest {
2727
public static void setUp() {
2828
cloudTrailClient = CloudTrailClient.builder()
2929
.region(Region.US_EAST_1)
30-
.credentialsProvider(EnvironmentVariableCredentialsProvider.create())
31-
.build();
30+
.build();
3231

3332
// Get the values to run these tests from AWS Secrets Manager.
3433
Gson gson = new Gson();
@@ -39,25 +38,6 @@ public static void setUp() {
3938

4039
// Uncomment this code block if you prefer using a config.properties file to
4140
// retrieve AWS values required for these tests.
42-
/*
43-
* try (InputStream input =
44-
* CloudTrailTest.class.getClassLoader().getResourceAsStream("config.properties"
45-
* )) {
46-
* Properties prop = new Properties();
47-
* if (input == null) {
48-
* System.out.println("Sorry, unable to find config.properties");
49-
* return;
50-
* }
51-
*
52-
* // Populate the data members required for all tests.
53-
* prop.load(input);
54-
* trailName = prop.getProperty("trailName");
55-
* s3BucketName = prop.getProperty("s3BucketName");
56-
*
57-
* } catch (IOException ex) {
58-
* ex.printStackTrace();
59-
* }
60-
*/
6141
}
6242

6343
@Test
@@ -135,7 +115,7 @@ public void DeleteTrail() {
135115
private static String getSecretValues() {
136116
SecretsManagerClient secretClient = SecretsManagerClient.builder()
137117
.region(Region.US_EAST_1)
138-
.credentialsProvider(EnvironmentVariableCredentialsProvider.create())
118+
//.credentialsProvider(EnvironmentVariableCredentialsProvider.create())
139119
.build();
140120
String secretName = "test/cloudtrail";
141121

javav2/example_code/cloudwatch/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<version>1.0-SNAPSHOT</version>
99
<properties>
1010
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
11-
<java.version>17</java.version>
12-
<maven.compiler.target>17</maven.compiler.target>
13-
<maven.compiler.source>17</maven.compiler.source>
11+
<java.version>21</java.version>
12+
<maven.compiler.target>21</maven.compiler.target>
13+
<maven.compiler.source>21</maven.compiler.source>
1414
</properties>
1515
<build>
1616
<plugins>
@@ -26,7 +26,7 @@
2626
<dependency>
2727
<groupId>software.amazon.awssdk</groupId>
2828
<artifactId>bom</artifactId>
29-
<version>2.29.45</version>
29+
<version>2.31.8</version>
3030
<type>pom</type>
3131
<scope>import</scope>
3232
</dependency>

0 commit comments

Comments
 (0)