After the maven project is created successfully, the jar dependency has been added, but no jar package exists after it is published to Tomcat,
When Tomcat is started, it is always reported that the jar package is not found, but the jar package exists in the project structure, which has been very depressing, so record it.
1. First, confirm that we have installed the environment required by Maven, and have created a Maven dependent web project. You can view the previous Maven learning content to build a Maven project.
A complete Maven-dependent WEB Project
As you can see, I only rely on the Oracle driver package, but when publishing to Tomcat APACHE-Tomcat-6.0.35 \ webapps \ Maven-demo \ WEB-INF \ lib directory but there is no that jar package
Later I found out that the solution is as follows:
1. Right-click Properties from the project and find the deployment Assembly option, as shown below:
Click Add to find
Double-click to enter
Find the jar package that Maven depends on, and click OK.
You can remove the test class as long as the class is running.
After OK, deploy Tomcat and find that the dependent jar package has been added to the lib directory of the project.
I think it should be noted that every time the jar cannot be found, it may be that it is not added to the deployment environment. Write down to prevent forgetting.
Configure Elipse to publish Maven project to Tomcat