可能重複:
where do you put ivysettings.xml?如何螞蟻,用設置Ivy和Artifactory的工作文件
我已經設置了Artifactory的是在我的機器上本地運行:
http://localhost:8080/artifactory/myRepo
該回購目前只有1個依賴它爲我管理,Google Guice(3.0):
myRepo/
google/
guice/
3.0/
guice-3.0/
guice-3.0.jar
guive-3.0-ivy.xml
我現在已經配置了我的Ant構建揭開序幕常春藤解決擺在最前頭:
<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>
我也寫一個ivy.xml
描述我模塊。
什麼我掙扎是ivysettings.xml
文件,具體爲:
- 我在哪裏把它(我的文件系統上),還是Artifactory的「上傳」不知何故?如果是的話,在哪裏/如何?
- 用戶名/密碼的東西(在
<ivy:settings>
任務中提供)用於基本HTTP身份驗證,並且I 假定 Artifactory會重用這些憑據?
基本上,我需要知道在哪裏放置設置文件,所有的登錄URL /憑據<ivy:settings>
如何定義涉及到我的Artifactory的配置。
在此先感謝!
謝謝@oers(+1) - 請在noamt的回答下看到我的評論 - 我對你有同樣的問題! – IAmYourFaja