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.