- Expert AWS Development
- Atul V. Mistry
- 132字
- 2025-02-24 00:33:27
AWS SDK for Java using Apache Maven
Please perform the following steps to include AWS SDK for Java using Apache Maven:
- Assuming that you have already installed Maven in your machine, create a new folder AWS SDK Example or any different name. Go to this folder and execute the following command to set up the environment:
mvn archetype:generate -DartifactId=swfexample -DgroupId=com.packt -DinteractiveMode=false
- To use AWS SDK for Java in your project, you need to add the dependency into the pom.xml file. For swf, it uses the aws-java-sdk-simpleworkflow module. Add the following code in the<dependencies> tag in your pom.xml file:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-simpleworkflow</artifactId>
<version>1.11.78</version>
</dependency>
Make sure that JDK 1.7+ versions can be supported by Maven. Add the following code into your pom.xml file before or after your <dependencies> block:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>