I am using Eclipse for Java EE and AWS Toolkit for Eclipse v2. I'm on a macOS Mojave Version 10.14.5. I have Java 8 installed.
I get errors when I first create an AWS Java Web Project that say "JavaServer Faces 2.2 can not be installed : One or more constraints have not been satisfied." and "JavaServer Faces 2.2 requires Dynamic Web Module 2.5 or newer." as seen in this screenshot:
Here is webproject01/pom.xml:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amazonaws.beanstalk</groupId>
<artifactId>webproject01</artifactId>
<packaging>war</packaging>
<version>1.0.0</version>
<name>archetype-web-app Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-ec2</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-bom</artifactId>
<version>1.11.104</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Here's webproject01/bin/pom.xml:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.amazonaws.beanstalk</groupId>
<artifactId>webproject01</artifactId>
<packaging>war</packaging>
<version>1.0.0</version>
<name>webproject01 Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>webproject01</finalName>
</build>
</project>
Here is the web.xml file:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Archetype Created Web Application</display-name>
</web-app>
I would like to get to the point where I can deploy my AWS Java Web Project to AWS via AWS Elastic Beanstalk right from Eclipse.
I have looked at other similar posts on stackoverflow and tried their solutions, but none of them work. They were older posts.
javaee-api
dependency should have scope provided. I don't see anything in the AWS-Eclipse-Toolkit about Java EE so I think you are trying something that will ultimately just continue to give you troubles. If you want to play with cloud and Java EE I recommend you open a free account at openshift.com and play there. It will be very Java EE oriented. – K.Nicholas