Maven project does not have maven Dependencies in the Eclipse Library

Source: Internet
Author: User

today, using MAVEN to create a multi-module project, after creating the parent project and the individual submodules, when compiling the parent project, there is a bunch of red forks on the parent project catalog, and it is not possible to find a dependent class, but the dependence of the corresponding jar in the Pom file is written , there are jar packages in the local Maven repository, but there is no Maven Dependencies in Eclipse's library , which is really scratching your heads .

Online Search, most of which is the following approach:

Right-click Maven Project--Macven--Enable Dependency Management

but it seems to me that this is not the right way. Then I looked at the other items, and then we opened the. classpath file for two items compared to the next, sure enough there are different, problematic items for the. classpath file is not "org.eclipse.m2e.MAVEN2_ Classpath_container"This part of the. Copy this line into the problematic project and reload the project, OK.

<?xml version= "1.0" encoding= "UTF-8"?>
<classpath>
<classpathentry kind= "src" output= "target/classes" path= "Src/main/java"/>
<classpathentry excluding= "* *" kind= "src" output= "target/classes" path= "Src/main/resources"/>
<classpathentry kind= "Con" path= "org.eclipse.jdt.launching.jre_container/ Org.eclipse.jdt.internal.debug.ui.launcher.standardvmtype/jdk1.7.0_45 "/>
<classpathentry kind= "Con" path= "Org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind= "Output" path= "Target/classes"/>
</classpath>

Blog is to remember that they are easy to forget things, but also a summary of their work, the article can be reproduced, without copyright. Hope to do their own efforts to do better, we work together to improve!

If there is any problem, welcome to discuss together, code if there is a problem, you are welcome to the great God!

Maven project does not have maven Dependencies in the Eclipse Library

Related Article

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.