Tomcat does not publish the local jar package that the MAVEN project relies on

Source: Internet
Author: User

Development tools: STS (Spring tool Suite)

To build the SPRINGMVC Maven project, the jar packages used are all pom.xml file configuration dependencies, and MAVEN is automatically downloaded from the repository, so there's no problem with using Tomcat to deploy the release. But sometimes we need to use packages that don't exist in the Maven repository, which we need to configure ourselves.

Right-click the project name->build path->configure build Path->java build Path->add jars/add External JARs, add the required jar package and click OK. After this step, the code compiles without error. But deployment launches Tomcat, the runtime will find that the corresponding jar package has been added, but will still report classnotfound and other errors, this is because Tomcat did not release the jar package just added, Do not believe you can go to the Tomcat deployment location to see (right-click Tomcat,browse Deployment). At this point we need to right click on the project name->build path->configure build path, click Deployment Assembly->add-java build Path Entries, Select the desired jar package, finish. In this way, redeploy the project and start running normally.

Tomcat does not publish the local jar package that the MAVEN project relies on

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.