Configure Elipse to publish Maven project to Tomcat

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.