2012-04-03 4 views
6

"mvn install"을 명령 줄에서 실행하면 아래 오류로 인해 멈추게됩니다.Maven이 이미 저장소에있는 이슈를 찾을 수 없습니다.

Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.detux.vios:common-entity:jar:2_0_0: 
Could not find artifact org.hibernate:hibernate-entitymanager:jar:3.6.2.FINAL in central (http://repo.maven.apache.org/maven2) 

나는 m2의 \ 저장소 \ 조직 \ 최대 절전 모드에서 확인 \ 최대 절전 모드 - EntityManager의 \ 3.6.2.FINAL \, 여기에 내가 새로운를 추가하려고했습니다

enter image description here

내용

입니다 원격 저장소의 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/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <parent> 
     <artifactId>common</artifactId> 
     <groupId>com.detux.vios</groupId> 
     <version>2_0_0</version> 
    </parent> 
    <groupId>com.detux.vios</groupId> 
    <artifactId>common-entity</artifactId> 
    <version>${common.version}</version> 
    <name>Vios Common entity</name> 
    <dependencies> 
     <dependency> 
      <groupId>org.hibernate</groupId> 
      <artifactId>hibernate-entitymanager</artifactId> 
      <version>${hibernate.version}</version> 
     </dependency> 
     <dependency> 
      <groupId>com.detux.vios</groupId> 
      <artifactId>common-util</artifactId> 
      <version>${common.version}</version> 
     </dependency> 
    </dependencies> 
    <properties> 
    </properties> 
    <repositories> 
     <repository> 
      <id>repository.jboss.org-public</id> 
      <name>JBoss repository</name> 
      <url>http://repository.jboss.org/nexus/content/groups/public</url> 
     </repository> 
    </repositories> 
</project> 

부모 프로젝트의 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/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>com.detux.vios</groupId> 
    <artifactId>common</artifactId> 
    <version>2_0_0</version> 
    <packaging>pom</packaging> 
    <name>Vios Common</name> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <configuration> 
        <source>1.6</source> 
        <target>1.6</target> 
       </configuration> 
      </plugin> 
      <plugin> 
       <groupId>org.apache.maven.plugins</groupId> 
       <artifactId>maven-jar-plugin</artifactId> 
       <executions> 
        <execution> 
         <id>jar-test-classes</id> 
         <phase>package</phase> 
         <goals> 
          <goal>test-jar</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 

    <properties> 
     <commons-jxpath.version>1.3</commons-jxpath.version> 
     <common.version>2_0_0</common.version> 
     <spring.version>3.0.5.RELEASE</spring.version> 
     <spring.integration.version>2.0.4.RELEASE</spring.integration.version> 
     <hibernate.version>3.6.2.FINAL</hibernate.version> 
     <maven-jaxb2-plugin.version>0.7.4</maven-jaxb2-plugin.version> 
     <commonsbeanutils.version>1.8.3</commonsbeanutils.version> 
     <commons-lang.version>2.6</commons-lang.version> 
    </properties> 
    <modules> 
     <module>common-model</module> 
     <module>common-entity</module> 
     <module>common-storage</module> 
     <module>common-util</module> 
     <module>common-service</module> 
     <module>common-service-business</module> 
     <module>common-service-resource</module> 
     <module>common-catalog</module> 
     <module>common-xml-jaxb2</module> 
    </modules> 
</project> 

답변

8

어떻게 이런 일이 있었는지 확실하지 않지만 has this artifactFinal이고 폴더 경로는 FINAL이 아닙니다.

pom.xml을 Final으로 변경하고 기존 로컬 저장소 폴더 m2\repository\org\hibernate\hibernate-entitymanager\3.6.2.FINAL을 삭제하여 다시 다운로드 할 수 있습니까?

+1

필자는 최종에서 최종으로 변경됩니다. 그런 다음 매력처럼 작동합니다. 매우 감사합니다. – bnguyen82

+1

maven에 m2 repository에있는 기존의 jar 파일 (원격 저장소에서 다운로드하는 대신 로컬 팀 저장소에서 복사)을 사용하려면 어떻게해야합니까? – bnguyen82

+1

@ bnguyen82 로컬 저장소에 대한 해결책을 찾지 못한 경우 -o 스위치를 사용하여 오프라인 모드로 작업 할 수 있습니다. 이미 jar 파일을 다운로드하지 않은 경우 아티팩트 오류가 누락 될 수 있습니다. –

관련 문제