I have a Spring-Boot-Starter-project in Eclipse Oxygen 4.7.0 and is trying to build a .war for deployment on an EC2 instance. I have added two jars to allow JDBC connectivity to PostgresSQL DB server from my deployed war.
I have also added the src/main/webapp/WEB-INF/lib
path to the project build path as shown below
However, I am getting the Compilation error when I am doing mvn compile
with a build failure stating the reason as unavailability of the jar classes
Any help will be really appreciated
You have configured Project build path in your eclipse, and it will not impact anything when you are doing mvn compile
. Maven will not include the jar from the lib folder as it does not know lib folder's presence. You should apply either of below two options:
a. If those jars are present in maven repository then update your pom to read from maven repository directly. b. Install these jars in your local repository then refer it in your pom.xml, check https://stackoverflow.com/a/30209982/3530898 for details