Java. classpath file Classpath entry org. maven. eclipse. MAVEN2_CLASSPATH_CONTAINER will not be exported or published exception solution, classpathcontainer

Source: Internet
Author: User

Java. classpath file Classpath entry org. maven. eclipse. MAVEN2_CLASSPATH_CONTAINER will not be exported or published exception solution, classpathcontainer
Classpath entry org. maven. eclipse. MAVEN2_CLASSPATH_CONTAINER will not be exported or published

In actual development of Java Web projects built using Maven, sometimes the above situation is warned. If this warning is not solved, when the Web server is started, an exception occurs when a third-party jar package cannot be loaded.

Therefore, to solve the above problems, the following steps are involved:

1. First find the. classpath file in the root directory of the project, open the file, find the following TAG content, and then add the TAG content marked by the following green line:

 

<Classpathentry kind = "con" path = "org. eclipse. m2e. MAVEN2_CLASSPATH_CONTAINER">

 

<Attributes>

 

<Attribute name = "maven. pomderived" value = "true"/>

 

<Attribute name = "org. eclipse. jst. component. dependency" value = "/WEB-INF/lib"/>

 

</Attributes>

</Classpathentry>

2. Select your project in Eclipse project manager, right-click Build Path> Configure Build Path> Order and Export, select Maven Dependencies, and click OK

3. finally, clean the current project, and check whether there is Classpath entry org In the Warning under the Problems tab. maven. eclipse. MAVEN2_CLASSPATH_CONTAINER will not be exported or published warning. If no, the problem is solved.

Then start the server, and the third-party jar package cannot be loaded.

 

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.