2013-03-19 103 views
5

所有內容都被加載到maven倉庫中。這在我的情況下位於C:\opt\m2\repository。我在eclipse中設置了M2_REPO變量,指向C:\opt\m2\repository,並且在命令行我做了mvn clean installMaven在導入到eclipse時不會添加依賴jar文件到項目

然後我等了10分鐘才能下載所有的依賴項,然後去檢查回購。 Everthing被下載到那裏。然後我將mvn eclipse:eclipse導入到eclipse中。

除了所有的Maven依賴關係之外,一切似乎都被導入。我的項目有9409錯誤,因爲它缺少這些jar文件。

我沒有Project -> Clean沒有幫助。

我做了F5項目名稱,沒有幫助。

我沒有刪除並再次導入,沒有幫助。

只是FYI,我也嘗試m2e插件,沒有幫助。

我錯過了什麼嗎?

這是.classpath文件的內容:

<?xml version="1.0" encoding="UTF-8"?> 
<classpath> 
<classpathentry kind="src" output="ks-common-util/target/classes" path="ks-common-util/src/main/java"/> 
<classpathentry kind="src" output="ks-common-util/target/classes" path="ks-common-util/src/main/resources"/> 
<classpathentry kind="src" output="ks-common-util/target/test-classes" path="ks-common-util/src/test/java"/> 
<classpathentry kind="src" output="ks-common-util/target/test-classes" path="ks-common-util/src/test/resources"/> 
<classpathentry kind="src" output="ks-common-test/target/classes" path="ks-common-test/src/main/java"/> 
<classpathentry kind="src" output="ks-common-test/target/classes" path="ks-common-test/src/main/resources"/> 
<classpathentry kind="src" output="ks-common-test/target/test-classes" path="ks-common-test/src/test/java"/> 
<classpathentry kind="src" output="ks-common-test/target/test-classes" path="ks-common-test/src/test/resources"/> 
<classpathentry kind="src" output="ks-common-api/target/classes" path="ks-common-api/src/main/java"/> 
<classpathentry kind="src" output="ks-common-api/target/classes" path="ks-common-api/src/main/resources"/> 
<classpathentry kind="src" output="ks-common-impl/target/classes" path="ks-common-impl/src/main/java"/> 
<classpathentry kind="src" output="ks-common-impl/target/classes" path="ks-common-impl/src/main/resources"/> 
<classpathentry kind="src" output="ks-common-impl/target/test-classes" path="ks-common-impl/src/test/java"/> 
<classpathentry kind="src" output="ks-common-impl/target/test-classes" path="ks-common-impl/src/test/resources"/> 
<classpathentry kind="src" output="ks-common-ui/target/classes" path="ks-common-ui/src/main/java"/> 
<classpathentry kind="src" output="ks-common-ui/target/classes" path="ks-common-ui/src/main/resources"/> 
<classpathentry kind="src" output="ks-common-ui/target/test-classes" path="ks-common-ui/src/test/java"/> 
<classpathentry kind="src" output="ks-common-ui/target/test-classes" path="ks-common-ui/src/test/resources"/> 
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> 
<classpathentry exported="true" kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> 
<classpathentry kind="output" path="target/classes"/> 

該項目的結構爲父母 - 兒童的項目。一個父項目和8個兒童項目。他們每個人都有一個pom.xml文件。

父項目沒問題,我可以編譯它。但是,子項目都沒有工作,因爲沒有任何依賴項被加載到項目中。

這是家長的pom.xml依賴

<dependencyManagement> 
<dependencies> 
    <!-- Test Framework Dependencies --> 
    <dependency> 
    <groupId>junit</groupId> 
    <artifactId>junit</artifactId> 
    <version>${junit.version}</version> 
    <scope>test</scope> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.derby</groupId> 
    <artifactId>derby</artifactId> 
    <version>${derby.version}</version> 
    <scope>test</scope> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.derby</groupId> 
    <artifactId>derbynet</artifactId> 
    <version>${derby.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.derby</groupId> 
    <artifactId>derbyclient</artifactId> 
    <version>${derby.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.mortbay.jetty</groupId> 
    <artifactId>jetty</artifactId> 
    <version>${jetty.version}</version> 
    <scope>test</scope> 
    </dependency> 
    <dependency> 
    <artifactId>servlet-api</artifactId> 
    <groupId>javax.servlet</groupId> 
    <version>2.5</version> 
    <scope>provided</scope> 
    </dependency> 
    <dependency> 
    <groupId>javax.persistence</groupId> 
    <artifactId>persistence-api</artifactId> 
    <version>1.0</version> 
    </dependency> 
    <dependency> 
    <groupId>javax.transaction</groupId> 
    <artifactId>jta</artifactId> 
    <version>1.1</version> 
    </dependency> 
    <dependency> 
    <groupId>cglib</groupId> 
    <artifactId>cglib-nodep</artifactId> 
    <version>2.1_3</version> 
    </dependency> 
    <dependency> 
    <groupId>org.eclipse.persistence</groupId> 
    <artifactId>eclipselink</artifactId> 
    <version>${eclipselink.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.openjpa</groupId> 
    <artifactId>openjpa</artifactId> 
    <version>1.2.1</version> 
    </dependency> 

    <!-- Hibernate --> 
    <dependency> 
    <groupId>org.hibernate</groupId> 
    <artifactId>hibernate-annotations</artifactId> 
    <version>3.4.0.GA</version> 
    </dependency> 
    <dependency> 
    <groupId>org.hibernate</groupId> 
    <artifactId>hibernate-entitymanager</artifactId> 
    <version>3.4.0.GA</version> 
    </dependency> 

    <!-- Hibernate Transitive Dependencies --> 
    <dependency> 
    <groupId>dom4j</groupId> 
    <artifactId>dom4j</artifactId> 
    <version>1.6.1</version> 
    </dependency> 
    <dependency> 
    <groupId>commons-collections</groupId> 
    <artifactId>commons-collections</artifactId> 
    <version>3.2</version> 
    </dependency> 
    <dependency> 
    <groupId>antlr</groupId> 
    <artifactId>antlr</artifactId> 
    <version>2.7.7</version> 
    </dependency> 

    <!-- Spring Dependencies --> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-aop</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-aspects</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-beans</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-context</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-core</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-jdbc</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-orm</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-test</artifactId> 
    <version>${spring.version}</version> 
    <scope>test</scope> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-web</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-webmvc</artifactId> 
    <version>${spring.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework.security</groupId> 
    <artifactId>spring-security-core</artifactId> 
    <version>${spring.security.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-support</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-security-core</artifactId> 
    <version>${spring.security.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-support</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-security-cas-client</artifactId> 
    <version>${spring.security.version}</version> 
    </dependency> 

    <!-- This jar is only needed if you are using CAS with Spring Security --> 
    <dependency> 
    <groupId>org.springframework.security</groupId> 
    <artifactId>spring-security-cas-client</artifactId> 
    <version>${spring.security.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-dao</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.opensaml</groupId> 
    <artifactId>opensaml</artifactId> 
    <version>1.1</version> 
    <!-- <version>2.2.2</version> --> 
    </dependency> 
    <dependency> 
    <groupId>xerces</groupId> 
    <artifactId>xercesImpl</artifactId> 
    <version>${xercesImpl.version}</version> 
    </dependency> 

    <!-- Metro Dependencies --> 
    <dependency> 
    <groupId>com.sun.xml.ws</groupId> 
    <artifactId>webservices-rt</artifactId> 
    <version>${metro.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.jvnet.jax-ws-commons.spring</groupId> 
    <artifactId>jaxws-spring</artifactId> 
    <version>1.8</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring</artifactId> 
     </exclusion> 
     <!-- These must be excluded for WSIT to work --> 
     <exclusion> 
     <groupId>com.sun.xml.ws</groupId> 
     <artifactId>jaxws-rt</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>com.sun.xml.bind</groupId> 
     <artifactId>jaxb-impl</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>javax.activation</groupId> 
     <artifactId>activation</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>javax.xml.soap</groupId> 
     <artifactId>saaj-api</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>com.sun.xml.messaging.saaj</groupId> 
     <artifactId>saaj-impl</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>com.sun.xml.stream.buffer</groupId> 
     <artifactId>streambuffer</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>com.sun.xml.stream</groupId> 
     <artifactId>sjsxp</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>com.sun.org.apache.xml.internal</groupId> 
     <artifactId>resolver</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 

    <!-- stax-ex 1.0 pom making a disaster so trying 1.2 --> 
    <dependency> 
    <groupId>org.jvnet.staxex</groupId> 
    <artifactId>stax-ex</artifactId> 
    <version>1.2</version> 
    </dependency> 

    <!-- CXF Dependencies --> 
    <!-- Libraries not required for Java 1.6_04+ are being excluding (based cxf WHICH_JARS file) --> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-api</artifactId> 
    <version>${cxf.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-javamail_1.4_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-activation_1.1_spec</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-core</artifactId> 
    <version>${cxf.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-javamail_1.4_spec</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-frontend-jaxws</artifactId> 
    <version>${cxf.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-javamail_1.4_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-jaxws_2.1_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-activation_1.1_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-annotation_1.0_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>javax.xml.bind</groupId> 
     <artifactId>jaxb-api</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>javax.xml.soap</groupId> 
     <artifactId>saaj-api</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>com.sun.xml.messaging.saaj</groupId> 
     <artifactId>saaj-impl</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.codehaus.woodstox</groupId> 
     <artifactId>wstx-asl</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-frontend-simple</artifactId> 
    <version>${cxf.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-jaxws_2.1_spec</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-common-utilities</artifactId> 
    <version>${cxf.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>javax.xml.bind</groupId> 
     <artifactId>jaxb-api</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-tools-common</artifactId> 
    <version>${cxf.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-ws-metadata_2.0_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>javax.xml.soap</groupId> 
     <artifactId>saaj-api</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.velocity</groupId> 
     <artifactId>velocity</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-transports-http</artifactId> 
    <version>${cxf.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-transports-http-jetty</artifactId> 
    <version>${cxf.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-ws-security</artifactId> 
    <version>${cxf.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-annotation_1.0_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-stax-api_1.0_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>javax.xml.soap</groupId> 
     <artifactId>saaj-api</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.cxf</groupId> 
    <artifactId>cxf-rt-bindings-soap</artifactId> 
    <version>${cxf.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-javamail_1.4_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-activation_1.1_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>javax.xml.bind</groupId> 
     <artifactId>jaxb-api</artifactId> 
     </exclusion> 
     <!-- GWT hosted not working if this is excluded --> 
     <!-- 
     <exclusion> 
     <groupId>org.codehaus.woodstox</groupId> 
     <artifactId>wstx-asl</artifactId> 
     </exclusion> 
     --> 
    </exclusions> 
    </dependency> 
    // deleted to fit in SO POST 

    <!-- Logging --> 
    <dependency> 
    <groupId>org.slf4j</groupId> 
    <artifactId>slf4j-api</artifactId> 
    <version>1.6.0</version> 
    </dependency> 
    <dependency> 
    <groupId>org.slf4j</groupId> 
    <artifactId>slf4j-log4j12</artifactId> 
    <version>1.6.0</version> 
    </dependency> 
    <dependency> 
    <groupId>log4j</groupId> 
    <artifactId>log4j</artifactId> 
    <version>${log4j.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>commons-logging</groupId> 
    <artifactId>commons-logging</artifactId> 
    <version>1.1.1</version> 
    </dependency> 

    <!-- Velocity (used by cxf & statements) --> 
    <dependency> 
    <groupId>velocity</groupId> 
    <artifactId>velocity</artifactId> 
    <version>${velocity.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.velocity</groupId> 
    <artifactId>velocity</artifactId> 
    <version>${velocity.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>org.apache.velocity</groupId> 
    <artifactId>velocity-tools</artifactId> 
    <version>${velocity.tools.version}</version> 
    </dependency> 
    <dependency> 
    <groupId>commons-lang</groupId> 
    <artifactId>commons-lang</artifactId> 
    <version>2.3</version> 
    </dependency> 

    <!-- Pom dependencies for impl specific jars --> 
    <dependency> 
    <groupId>org.kuali.student.common</groupId> 
    <artifactId>ks-jta</artifactId> 
    <version>${project.version}</version> 
    <type>pom</type> 
    </dependency> 
    <dependency> 
    <groupId>org.kuali.student.common</groupId> 
    <artifactId>ks-cxf</artifactId> 
    <version>${project.version}</version> 
    <type>pom</type> 
    </dependency> 
    <dependency> 
    <groupId>org.kuali.student.common</groupId> 
    <artifactId>ks-metro</artifactId> 
    <version>${project.version}</version> 
    <type>pom</type> 
    </dependency> 
    <dependency> 
    <groupId>org.kuali.student.common</groupId> 
    <artifactId>ks-eclipselink</artifactId> 
    <version>${project.version}</version> 
    <type>pom</type> 
    </dependency> 
    <dependency> 
    <groupId>org.kuali.student.common</groupId> 
    <artifactId>ks-hibernate</artifactId> 
    <version>${project.version}</version> 
    <type>pom</type> 
    </dependency> 

    <!-- GWT Dependencies --> 
    // deleted in order to fit in SO post 
    <dependency> 
    <groupId>org.kuali.rice</groupId> 
    <artifactId>rice-impl</artifactId> 
    <version>${kuali.rice.version}</version> 
    <exclusions> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-dao</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-jpa</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-remoting</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-support</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-jmx</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.springframework</groupId> 
     <artifactId>spring-mock</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>htmlunit</groupId> 
     <artifactId>htmlunit</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.mortbay.jetty</groupId> 
     <artifactId>jetty</artifactId> 
     </exclusion> 
     <!-- 
     <exclusion> 
     <groupId>org.springmodules</groupId> 
     <artifactId>spring-modules-ojb</artifactId> 
     </exclusion> 
     --> 
     <!-- 
     <exclusion> 
     <groupId>ojb</groupId> 
     <artifactId>db-ojb</artifactId> 
     </exclusion> 
     --> 
     <exclusion> 
     <groupId>com.oracle</groupId> 
     <artifactId>ojdbc14</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>mysql</groupId> 
     <artifactId>mysql-connector-java</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-activation_1.1_spec</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.apache.geronimo.specs</groupId> 
     <artifactId>geronimo-javamail_1.4_spec</artifactId> 
     </exclusion> 
     <!-- 
     These dependencies conflict with gwt-dev for running hosted mode via eclipse 
     launch file. 
     --> 
     <exclusion> 
     <groupId>tomcat</groupId> 
     <artifactId>jasper-compiler-jdt</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>tomcat</groupId> 
     <artifactId>jasper-compiler</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>tomcat</groupId> 
     <artifactId>jasper-runtime</artifactId> 
     </exclusion> 
     <exclusion> 
     <groupId>org.eclipse.jdt</groupId> 
     <artifactId>core</artifactId> 
     </exclusion> 

     <!-- JOTM - uncomment out to switch to Bitronix -->   
     <!-- 
     <exclusion>         
     <groupId>xapool</groupId>     
     <artifactId>xapool</artifactId>   
     </exclusion>         
     <exclusion>         
     <groupId>jotm</groupId>     
     <artifactId>jotm</artifactId>    
     </exclusion> 
     --> 

     <!-- itext --> 
     <exclusion> 
     <groupId>itext</groupId> 
     <artifactId>itext</artifactId> 
     </exclusion> 
    </exclusions> 
    </dependency> 
    <dependency> 
    <groupId>commons-beanutils</groupId> 
    <artifactId>commons-beanutils</artifactId> 
    <version>1.7.0</version> 
    </dependency> 
    // deleted some because SO only allow 30000 characters 

<dependencies> 
<dependency> 
    <groupId>junit</groupId> 
    <artifactId>junit</artifactId> 
</dependency> 

這是孩子們的pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
<modelVersion>4.0.0</modelVersion> 
    <parent> 
     <groupId>org.kuali.student</groupId> 
     <artifactId>student</artifactId> 
     <version>1.2</version> 
    </parent> 
    <groupId>org.kuali.student.common</groupId> 
    <artifactId>ks-common</artifactId> 
    <packaging>pom</packaging> 
    <name>KS Common</name> 
    <description>Kuali Student Common</description> 
    <issueManagement> 
     <system>Jira</system> 
     <url>https://test.kuali.org/jira/browse/KSCOR</url> 
    </issueManagement> 
    <profiles> 
     <profile> 
      <id>default</id> 
      <activation> 
       <activeByDefault>true</activeByDefault> 
      </activation> 
      <modules> 
       <module>ks-cxf</module> 
       <module>ks-metro</module> 
       <module>ks-eclipselink</module> 
       <module>ks-hibernate</module> 
       <module>ks-jta</module> 
       <module>ks-rice-lessdep</module> 
       <module>ks-common-util</module> 
       <module>ks-common-test</module> 
       <module>ks-common-api</module> 
       <module>ks-common-impl</module> 
       <module>ks-common-ui</module> 
      </modules> 
     </profile> 
     <profile> 
      <id>skip-ui</id> 
      <modules> 
       <module>ks-cxf</module> 
       <module>ks-metro</module> 
       <module>ks-eclipselink</module> 
       <module>ks-hibernate</module> 
       <module>ks-jta</module> 
       <module>ks-rice-lessdep</module> 
       <module>ks-common-util</module> 
       <module>ks-common-test</module> 
       <module>ks-common-api</module> 
       <module>ks-common-impl</module> 
      </modules> 
     </profile> 
    </profiles> 
    <repositories> 
     <repository> 
      <id>kuali.nexus</id> 
      <name>Nexus Repository Manager</name> 
      <url>http://nexus.kuali.org/content/groups/public</url> 
      <releases> 
       <enabled>true</enabled> 
      </releases> 
      <snapshots> 
       <enabled>true</enabled> 
      </snapshots> 
     </repository> 
    </repositories> 
</project> 
+1

隨着m2e插件,你不需要做任何手動kludging。從工作區中刪除項目,然後轉到文件 - >導入 - > Maven->現有Maven項目。通過嚮導和繁榮!你做完了。 – Perception 2013-03-19 17:06:31

+0

我剛剛嘗試過,但除了'junit-4.4.jar'之外沒有其他任何依賴項,所有依賴項jar都成功加載到'$ HOME/.m2/repository'中,但沒有被導入到項目中。 – ssgao 2013-03-19 17:25:29

+0

現在忽略Maven存儲庫。做這兩件事 - 首先,右鍵單擊您的項目並選擇'屬性',在'Java Build Path'項目中,選擇並展開「Maven Dependencies」。您的依賴庫在那裏列出?其次,將POM的內容添加到問題中。如果POM非常大,那麼只包含依賴關係部分。 – Perception 2013-03-19 17:32:35

回答

6

使用m2e插件,您不需要執行任何手動kludging。從工作區中移除項目,然後轉至File->Import->Maven->Existing Maven Projects。瀏覽對話框導入您的項目,就完成了。

Maven Import - Part 1

Maven Import - Part 2

需要注意的是,如果有任何.classpath.settings.project在你的Maven項目資源或任何其子模塊,則需要先刪除它們,以執行導入(mvn eclipse:clean而不是足以將它們移除)。這是因爲他們與m2e設置產生衝突。

+0

確實是.project,.classpath和.settings給我帶來了麻煩。謝謝感知。 – ssgao 2013-03-19 19:00:23

+0

對我沒有幫助.. – 2013-10-10 08:07:08

+0

@VladislavBauer - 更具體地說明你的問題是什麼。也許發佈一個單獨的問題? – Perception 2013-10-10 12:58:20

3

嘗試之一,該訂單:

mvn eclipse:eclipse -Dwtpversion=2.0 

mvn package 

mvn eclipse:clean 
+0

沒有任何變化。最後我獲得了成功。然後我回到日食並擊中'F5'。仍然是那些錯誤。 – ssgao 2013-03-19 17:10:36

+0

右鍵單擊你的項目 - > maven - >禁用maven nature;做一個mvn月食:乾淨;再次右鍵點擊 - >配置 - >轉換爲Maven項目 – fcm 2013-03-19 17:16:17

+0

,這次它拾取了1個依賴項「junit-4.4.jar」,但仍然缺少其他所有內容。 – ssgao 2013-03-19 17:24:18

0

試試這樣說:

  1. 你需要的第一件事是m2eclipse的。這是一個小錯誤,但它的作品。(http://m2eclipse.sonatype.org/sites/m2e
  2. 導入Maven項目槽中蝕(m2eclipse的)
  3. 做一個MVN elipse:乾淨的日食:日食對項目
  4. 刷新該項目在eclipse

應該以這種方式工作

+0

謝謝,但這基本上是fcm建議,我已經做到了。它沒有幫助。 – ssgao 2013-03-19 17:42:55

+0

對不起,很久以前我用Eclipse和Eclipse一起使用了Eclipse,但基本上使用了較老的M2Eclipse插件(不是帶連接器的新插件會導致問題)對我來說工作得很好。導入低谷插件,使用mvn eclipse插件重新生成元數據,在eclipse中刷新 – emd 2013-03-19 17:46:58

-1

我有同樣的問題,我解決它以這種方式(在項目中,我使用Maven的,春天,休眠):

1)幫助 2)檢查更新

我不得不升級:Spring IDE(對不起,我不記得全名)。 完成此操作後,一切正常(在此操作之前,我嘗試了許多解決方案,沒有任何幫助)。

0

我試着在pom.xml中添加更新,乾淨的項目沒有工作。但是,這工作

1 - 右鍵單擊​​Maven項目。

2 - 的Maven - >添加依賴

3 - 輸入組ID,神器,版本。

4 - 提交

瞧,那裏! 希望有所幫助。

相關問題