mirror of https://github.com/apache/ant-ivy
95 lines
3.3 KiB
HTML
95 lines
3.3 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
<html>
|
|
<head>
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
|
<script type="text/javascript">var xookiConfig = {level: 0};</script>
|
|
<script type="text/javascript" src="xooki/xooki.js"></script>
|
|
</head>
|
|
<body>
|
|
<textarea id="xooki-source">
|
|
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:
|
|
<code>
|
|
java org.apache.ivy.Main -?
|
|
</code>
|
|
It will indicate you what can be given as argument.
|
|
|
|
|
|
<span class="since">since 1.3</span> System properties are included as ivy variables, so you can easily define an ivy variable like this:
|
|
<code>
|
|
java -Dmyivyvar=myvalue org.apache.ivy.Main [parameters]
|
|
</code>
|
|
|
|
|
|
<h1>Examples</h1>
|
|
<code>
|
|
java org.apache.ivy.Main
|
|
</code>
|
|
calls ivy with default configuration using ivy.xml in the current dir
|
|
<hr/>
|
|
<code>
|
|
java org.apache.ivy.Main -conf path/to/myivysettings.xml -ivy path/to/myivy.xml
|
|
</code>
|
|
calls ivy with given ivysettings file using given ivy file
|
|
<hr/>
|
|
<span class="since">since 1.3</span>
|
|
<code>
|
|
java org.apache.ivy.Main -conf path/to/myivysettings.xml -dependency apache commons-lang 2.0
|
|
</code>
|
|
calls ivy with given ivysettings file and resolve apache commons-lang 2.0.
|
|
|
|
This is equivalent to:
|
|
<code>
|
|
java org.apache.ivy.Main -conf path/to/myivysettings.xml -ivy ivy.xml
|
|
</code>
|
|
with ivy.xml like this:
|
|
<code type="xml">
|
|
<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>
|
|
</code>
|
|
<hr/>
|
|
<span class="since">since 1.3</span>
|
|
<code>
|
|
java org.apache.ivy.Main -conf path/to/myivysettings.xml -ivy path/to/myivy.xml -cachepath mycachefile.txt
|
|
</code>
|
|
calls ivy with given ivysettings 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.
|
|
|
|
<hr/>
|
|
<span class="since">since 1.4</span>
|
|
<code>
|
|
java org.apache.ivy.Main -conf path/to/myivysettings.xml -dependency bar foo 2.0 -main org.bar.foo.FooMain
|
|
</code>
|
|
calls ivy with given ivysettings file and resolve bar foo 2.0, and then run org.foo.FooMain class with the resolved artifacts as classpath
|
|
|
|
|
|
</textarea>
|
|
<script type="text/javascript">xooki.postProcess();</script>
|
|
</body>
|
|
</html>
|