GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — reformat pom.xml and add exec-maven-plugin · arnabdas/aws-java-sample@6264a44

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .gitignore
  • pom.xml
  • src/main/java/com/amazonaws/samples
    • QuickStart.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboard
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
/AwsCredentials.properties
1+
AwsCredentials.properties
22
.idea
33
target/
4+
*.iml
Collapse file

‎pom.xml‎

Copy file name to clipboard
+44-18Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,50 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>com.amazonaws.samples</groupId>
6-
<artifactId>aws-java-sample</artifactId>
7-
<version>1.0</version>
8-
<packaging>jar</packaging>
5+
<groupId>com.amazonaws.samples</groupId>
6+
<artifactId>aws-java-sample</artifactId>
7+
<version>1.0</version>
8+
<packaging>jar</packaging>
99

10-
<name>aws-java-sample</name>
11-
<url>http://aws.amazon.com/sdkforjava</url>
10+
<name>aws-java-sample</name>
11+
<url>http://aws.amazon.com/sdkforjava</url>
1212

13-
<properties>
14-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15-
</properties>
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
1616

17-
<dependencies>
18-
<dependency>
19-
<groupId>com.amazonaws</groupId>
20-
<artifactId>aws-java-sdk</artifactId>
21-
<version>1.5.5</version>
22-
</dependency>
23-
</dependencies>
17+
<dependencies>
18+
<dependency>
19+
<groupId>com.amazonaws</groupId>
20+
<artifactId>aws-java-sdk</artifactId>
21+
<version>1.5.5</version>
22+
</dependency>
23+
</dependencies>
24+
25+
<build>
26+
<resources>
27+
<resource>
28+
<directory>src/main</directory>
29+
</resource>
30+
</resources>
31+
32+
<plugins>
33+
<plugin>
34+
<groupId>org.codehaus.mojo</groupId>
35+
<artifactId>exec-maven-plugin</artifactId>
36+
<version>1.2.1</version>
37+
<executions>
38+
<execution>
39+
<goals>
40+
<goal>java</goal>
41+
</goals>
42+
</execution>
43+
</executions>
44+
<configuration>
45+
<mainClass>com.amazonaws.samples.QuickStart</mainClass>
46+
</configuration>
47+
</plugin>
48+
</plugins>
49+
</build>
2450
</project>
Collapse file

‎src/main/java/com/amazonaws/samples/QuickStart.java‎

Copy file name to clipboardExpand all lines: src/main/java/com/amazonaws/samples/QuickStart.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public static void main(String[] args) {
1616
AmazonS3 s3 = new AmazonS3Client(credentialsProvider);
1717

1818
// Create a bucket
19-
String bucketName = "aws-java-sdk-sample-" + credentialsProvider.getCredentials().getAWSAccessKeyId();
19+
String accessKey = credentialsProvider.getCredentials().getAWSAccessKeyId();
20+
String bucketName = "aws-java-sdk-sample-" + accessKey.toLowerCase();
2021
s3.createBucket(bucketName);
2122
}
2223

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.