2010-07-01 1 views
2

여기에서, 우리는 Sonatype Maven 저장소를 사용합니다. 이것은 우리의 Maven 프로젝트에 유쾌하지만, Maven에서 dep가 필요한 의존성 관리를 위해 Ant + IVY를 사용하는 레거시 애플리케이션이 있습니다.내부 메이븐 저장소에 액세스 IVY

내 IVY 설정 파일과 같이 보인다 :

<ivysettings> 
    <property name="dsnexus-root" value="http://internal-url/" override="false"/> 

    <credentials host="hostname" username="username" passwd="XXXX"/> 

    <!-- ... --> 

    <resolvers> 
     <chain name="shared"> 
      <url name="shared-default"> 
       <!-- ... --> 
      </url> 
      <url name="dsnexus-public" m2compatible="true"> 
       <artifact pattern="${dsnexus-root}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/> 
      </url> 
     </chain> 
    </resolvers> 

    <modules> 
     <module organisation=".*" name=".*" resolver="shared"/> 
    </modules> 

    <!-- ... --> 
</ivysettings> 

하지만 내 deps를 해결하려고 할 때 내부의 repo

예를 들어, 아무것도 찾을 수 없습니다

module not found: xerces#xercesImpl;2.9.1 
==== shared-default: tried 
... 
==== dsnexus-public: tried 
-- artifact xerces#xercesImpl;2.9.1!xercesImpl.jar: 
http://internal-url/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar 

물론 해당 URL에는 dep가 있습니다.

또한

<ibiblio name="dsnexus-public" 
    root="${dsnexus-root}" 
    m2compatible="true" 
    namespace="maven2"/> 

시도와 같은 결과를 가지고있다.

내 생각 엔 내가 잘못한 자격 증명에 관한 것이 있습니다.

답변

3

당신은 또한이 같은 자격 증명 뭔가를 영역을 지정해야합니다 :

여기
<credentials host="hostname" realm="Sonatype Nexus Repository Manager" username="username" passwd="xxx"/> 
+0

흠, 나는 이것을 시도 할 것이다. 내가 궁금해하는 영역의 실제 이름을 어떻게 발견 할 수 있습니까? –

0

나는 보통 넥서스와 대화 할 때 ibiblio 해결 프로그램을 사용합니다.

<ibiblio name="reponame" m2compatible="true" root="http://nexus-url/reponame"/> 
+0

나는 이것을 시험해 보았는데 같은 결과가 두려웠다. –

+0

프록시 서버 뒤에 있습니까? 내 부분에 순수한 추측. 아이비가 웹 브라우저를 통해 존재하는 URL을 검색하지 못하는 이유를 설명하려고합니다. ANT를 자세한 정보 표시 모드로 실행 해보면 오류에 대한 정보를 얻을 수 있습니다. –

1

는,이 시도 :

<ivysettings> 
    <settings defaultResolver="nexus" 
      checkUpToDate="true" /> 

    <credentials host="localhost" 
      realm="Sonatype Nexus Repository Manager" 
      username="admin" 
      passwd="admin123"/> 
    <resolvers> 
    <ibiblio name="nexus" m2compatible="true" 
      root="http://localhost:8081/nexus/content/groups/public/"/> 
    <url name="releases" m2compatible="true"> 
     <artifact pattern="http://localhost:8081/nexus/content/repositories/releases/[organization]/[module]/[revision]/[artifact]-[revision].[ext]"/> 
     <ivy pattern="http://localhost:8081/nexus/content/repositories/releases/[organization]/[module]/[revision]/ivy-[revision].xml"/> 
    </url> 
    </resolvers> 
</ivysettings> 

작품 완벽하게 나를 위해 넥서스 1.7.1와 함께. 문제가 있으면 알려주세요.