2011-10-27 3 views
1

이상한 문제가 있습니다. 나 자신의 원격 저장소 및 그들의 플러그인을 업로드. 그럼 포장 프로젝트를 다운로드하려고합니다. Maven은 own_remote_repo에서 다운로드를 시작하지만 1 파일을 다운로드하면 repo1.maven.org/maven2에서 다른 파일을 검색하기 시작합니다. 물론 플러그인을 찾을 수 없어 실패합니다.Maven 다른 저장소의 한 플러그인에서 파일을 다운로드

전이 repo를 여러 번 사용해 보았습니다.

[편집]

출력 : 받는다는 중앙에서 jar 파일을 다운로드하려고하면 받는다는 - 플러그인 - 1.1.3.pom 받는다는의 dowloading 후 볼 수 있습니다 그래서

Downloading: http://repo1.maven.org/maven2/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.pom 
[INFO] Unable to find resource 'com.my.maven.plugin:maven-plugin:pom:1.1.3' in repository central (http://repo1.maven.org/maven2) 
Downloading: http://<server>:<port>/nexus/content/groups/public/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.pom 
3K downloaded (maven-plugin-1.1.3.pom) 
Downloading: http://repo1.maven.org/maven2/com/my/maven/plugin/maven-plugin/1.1.3/maven-plugin-1.1.3.jar 
[INFO] Unable to find resource 'com.my.maven.plugin:maven-plugin:maven-plugin:1.1.3' in repository central (http://repo1.maven.org/maven2) 
[INFO] ------------------------------------------------------------------------ 
[ERROR] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository 

repo ....

플러그인이있는 jar 파일은 넥서스의 같은 디렉토리에 있으며, 이름은 maven이 찾으려고하는 jar 파일과 같습니다. 넥서스에서 다운로드 한 maven-plugin-1.1.3.pom이 정확합니다.

아이디어가 있으십니까?

+1

이것을 보여주는 maven의 샘플 출력을 게시 할 수 있습니까? –

+0

완료. 이게 당신을 도울 수 있기를 바랍니다. – Oleksandr

답변

2

내가 당신의 질문에서 이해하는 것은 당신이 플러그인 만 문제가 있다는 것입니다, 우리는 프록시로 nexus을 사용하고

$USER_HOME/.m2/settings.xml 

아래 보여 pluginrepositories 섹션 구성을 확인하시기 바랍니다 구성했다.

<settings> 
    <mirrors> 
     <mirror> 
      <id>nexus</id> 
      <mirrorof>*</mirrorof> 
      <url>http://nexusurl/content/groups/public</url> 
     </mirror> 
    </mirrors> 
    <profiles> 
     <profile> 
      <id>nexus</id> 
      <repositories> 
       <repository> 
        <id>central</id> 
        <url>http://central</url> 
        <releases> 
         <enabled>true</enabled> 
        </releases> 
        <snapshots> 
         <enabled>true</enabled> 
        </snapshots> 
       </repository> 
      </repositories> 
      <pluginrepositories> 
       <pluginrepository> 
        <id>central</id> 
        <url>http://central</url> 
        <releases> 
         <enabled>true</enabled> 
        </releases> 
        <snapshots> 
         <enabled>true</enabled> 
        </snapshots> 
       </pluginrepository> 
      </pluginrepositories> 
     </profile> 
    </profiles> 
    <activeprofiles> 
     <activeprofile>nexus</activeprofile> 
    </activeprofiles> 
</settings> 
+0

고마워요. 내 pom.xml에 pluginRepositories를 추가하면 maven이 올바르게 시작됩니다. 하지만 난 주요 문제를 해결할 수 없습니다 : 왜 maven 다른 저장소에서 plubin의 부분을 dowload 시작 ... – Oleksandr

관련 문제