Skip navigation.

Standalone

In the case you want to call ivy as a standalone program (outside from ant), you have to put commons-cli 1.0 and its dependencies in your classpath.

Then here is how to call it:

java fr.jayasoft.ivy.Main -?

It will indicate you what can be given as argument.

since 1.3 System properties are included as ivy variables, so you can easily define an ivy variable like this:

java -Dmyivyvar=myvalue fr.jayasoft.ivy.Main [parameters]

Examples

java fr.jayasoft.ivy.Main

calls ivy with default configuration using ivy.xml in the current dir


java fr.jayasoft.ivy.Main -conf path/to/myivyconf.xml -ivy path/to/myivy.xml

calls ivy with given ivyconf file using given ivy file



since 1.3

java fr.jayasoft.ivy.Main -conf path/to/myivyconf.xml -dependency apache commons-lang 2.0

calls ivy with given ivyconf file and resolve apache commons-lang 2.0.

This is equivalent to:

java fr.jayasoft.ivy.Main -conf path/to/myivyconf.xml -ivy ivy.xml

with ivy.xml like this:

<ivy-module version="1.0">
  <info organisation="org"
      module="standalone"
      revision="working"
  />
  <dependencies>
    <dependency org="apache" name="commons-lang" rev="2.0" conf="default->*"/>
  </dependencies>
</ivy-module>



since 1.3

java fr.jayasoft.ivy.Main -conf path/to/myivyconf.xml -ivy path/to/myivy.xml -cachepath mycachefile.txt

calls ivy with given ivyconf file and resolve the dependencies found in the given ivy file, and then output the classpath of resolved artifacts in cache in a file. This file can then be used to define a classpath corresponding to all the resolved dependencies for any java program.



since 1.4

java fr.jayasoft.ivy.Main -conf path/to/myivyconf.xml -dependency bar foo 2.0 -main org.bar.foo.FooMain

calls ivy with given ivyconf file and resolve bar foo 2.0, and then run org.foo.FooMain class with the resolved artifacts as classpath