How to do it...

Now, we have both the JDK and Maven installed on our local machine. Let's create or initialize a web project in Java using Maven project template toolkit Archetype.

The Archetype plugin will create the necessary folder structure that is required by the developers to quickly start their development.
[root@awsstar ~]# mvn archetype:generate -DgroupId=com.awsstar -DartifactId=javawebapp -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

The preceding command will take some time if you are running it for the first time.

The preceding executed command will give the output in the javawebapp folder, because if you take a look at the parameter passed, -D artifactID is javawebapp.

If we go in the webapp folder and ...

Get AWS Automation Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.