Possible Duplicate:
where do you put ivysettings.xml?
I have set up Artifactory to be running locally on my machine at:
http://localhost:8080/artifactory/myRepo
That repo currently has only 1 dependency it is managing for me, Google Guice (3.0):
myRepo/
google/
guice/
3.0/
guice-3.0/
guice-3.0.jar
guive-3.0-ivy.xml
I have now configured my Ant build to kick off an Ivy resolve right up front:
<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>
I've also written an ivy.xml
descriptor for my module.
What I am struggling with is the ivysettings.xml
file, specifically:
- Where do I put it (on my file system), or does Artifactory "upload" it somehow? If so, where/how?
- The username/password stuff (provided in the
<ivy:settings>
task) is for basic HTTP authentication, and I assume Artifactory reuses these credentials?
Basically, I need to know where to put the settings file, and how all the login URLs/credentials defined in <ivy:settings>
relates to my Artifactory config.
Thanks in advance!