2012-09-13 3 views
2

가능한 중복을 파일 어떻게 개미 :
where do you put ivysettings.xml?, 설정 아이비와 Artifactory 작업은

전에서 내 컴퓨터에서 로컬로 실행되는 Artifactory을 설정 한 :

http://localhost:8080/artifactory/myRepo 

해당 repo는 현재 나를 위해 관리하는 의존성이 1 개 밖에 없습니다. Google Guice (3.0) :

myRepo/ 
    google/ 
     guice/ 
      3.0/ 
       guice-3.0/ 
        guice-3.0.jar 
        guive-3.0-ivy.xml 

는 지금 아이비가 바로 앞까지 해결 킥오프 내 Ant 빌드를 구성한 : 나는 또한 내 모듈에 대한 ivy.xml 설명을 서면으로 작성했습니다

<project name="myapp-build default="audit" basedir=".." xmlns:ivy="antlib:org.apache.ivy.ant"> 
    <path id="ant.lib.path"> 
     <fileset dir="${env.ANT_HOME}/lib" includes="*.jar"/> 
    </path> 

    <!-- I have ivy.jar and its dependencies installed under ${ANT_HOME}lib. --> 
    <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ant.lib.path"/> 
    <target name="resolve"> 
     <!-- Initialize Ivy and connect to host repository. --> 
     <echo message="Initializing Apache Ivy and connecting to the host repository."/> 
     <ivy:settings url="${ivy.std.repo.settings.url}" realm="${ivy.std.repo.realm}" 
username="${ivy.std.repo.username}" passwd="${ivy.std.repo.password}"/> 

     <!-- Clear/flush the Ivy cache. --> 
     <echo message="Cleaning the local Ivy cache for the current build."/> 
     <ivy:cleancache/> 

     <!-- Resolve ivy.xml against the standard repository (all configurations) --> 
     <echo message="Resolving ivy.xml dependencies against the host repository."/> 
     <ivy:resolve file="./ivy.xml"/> 

     <!-- Retrieve compile dependencies from local Ivy cache and place them into the gen/lib/main. --> 
     <echo message="Retrieving compile-time dependencies."/> 
     <ivy:retrieve ivypattern="${gen.lib.main.dir}/[artifact].[ext]" conf="compile"/> 

     <!-- Retrieve test dependencies from local Ivy cache and place them into the gen/lib/test. --> 
     <echo message="Retrieving testing dependencies."/> 
     <ivy:retrieve ivypattern="${gen.lib.test.dir}/[artifact].[ext]" conf="test"/> 
    </target> 

... 

</project> 

.

  • 가 어디에서 (내 파일 시스템)를 배치해야합니까, 또는 Artifactory는 어떻게 든 그것을 "업로드"않습니다

    내가 고민하고 구체적으로는 ivysettings.xml 파일? 그렇다면 어디에서/어떻게?

  • 사용자 이름/암호 항목 (<ivy:settings> 작업에서 제공)은 기본 HTTP 인증 용이며 으로 가정합니다. 이러한 자격 증명은 Artifactory에서 다시 사용됩니까?

기본적으로 설정 파일을 넣을 위치와 <ivy:settings>에 정의 된 모든 로그인 URL/자격증 명은 내 Artifactory 설정과 관련이 있습니다.

미리 감사드립니다.

+0

감사합니다. @oers (+1) - noamt의 답변 아래 내 의견을 참조하십시오. - 나는 당신과 같은 질문을 가지고 있습니다! – IAmYourFaja

답변

2

이것은 부분적으로 where do you put ivysettings.xml? 과 중복됩니다. 인증과 관련하여 Artifactory default scheme은 기본 HTTP 인증과 함께 작동합니다.

+0

감사합니다. @noamt (+1) - 그래서'build.xml' 바로 옆에 넣어야한다고 말하고 있습니까? 내 전화 끊김은 두 가지에서 오는 것 같아요 : (1) 어떤 시점에서 나는 Artifactory에 연결하기 위해 사용자 이름/암호를 제공해야합니다. '''태스크를 통해 될 것이라고 생각했다. (태스크는 이미'username','passwd' 속성 등을 가지고 있기 때문에). 나 맞아? 그렇지 않다면, 내 Artifactory repo의 자격 증명을 어디서 'resolver'정의에 넣을까요? (2) 연결해야하는 저장소가 여러 개인 경우 다른 자격 증명이 있으면 어떻게됩니까? ''는 충분하지 않을 것입니다 ... – IAmYourFaja

+0

@ 4herpsand7derpsago 1) 예, 신임장을 통해 2) 각 저장소 (호스트 속성)에 대한 신임을 정의하십시오. – oers

+0

고마워요.하지만,''태스크를 위해서 오직 하나의'host' 속성 만 정의 할 수 있습니다. 구체적인 예를 들어 설명해 주시겠습니까? 다시 한 번 감사드립니다! – IAmYourFaja