mirror of https://github.com/apache/ant-ivy
use highlightjs to put colors on the xml snipsets
This commit is contained in:
parent
25a67d80c6
commit
5bc940ca65
|
|
@ -23,7 +23,7 @@ If you use ant version *1.6.0* or superior, you just have to add Ivy's namespace
|
|||
|
||||
If you want to make your build handle ivy.jar in either ant lib dir or a local lib dir, you can use a taskdef like this:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<path id="ivy.lib.path">
|
||||
<fileset dir="path/to/dir/with/ivy/jar" includes="*.jar"/>
|
||||
|
|
@ -36,7 +36,7 @@ Combined with the antlib definition in the project namespace, it will load Ivy c
|
|||
|
||||
If you use ant *1.5.1* or superior, you have to define the tasks you use in your build file. For instance:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<taskdef name="ivy-configure" classname="org.apache.ivy.ant.IvyConfigure"/>
|
||||
<taskdef name="ivy-resolve" classname="org.apache.ivy.ant.IvyResolve"/>
|
||||
|
|
@ -55,14 +55,14 @@ If you use an ant version lower than 1.5.1, you can not use the ivy tasks... you
|
|||
|
||||
Once your build file is ok to call ivy tasks, the simplest way to use ivy is to call the ivy retrieve task with no parameters:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve />
|
||||
----
|
||||
|
||||
This calls ivy with default values, which might be ok in several projects. In fact, it is equivalent to:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<target name="resolve">
|
||||
<ivy:configure />
|
||||
|
|
@ -134,7 +134,7 @@ image::images/main-tasks.png[]
|
|||
|
||||
Here is a more complete example of build file using Ivy:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="sample" default="resolve">
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Ivy use is entirely based on _module descriptors_ known as "ivy files". Ivy file
|
|||
|
||||
Here is the simplest ivy file you can write:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<ivy-module version="2.0">
|
||||
|
|
@ -38,7 +38,7 @@ Before beginning the reference itself, it is required to have in mind the termin
|
|||
|
||||
For those familiar with xml schema, the schema used to validate ivy files can be found link:http://ant.apache.org/ivy/schemas/ivy.xsd[here]. For those using xsd aware IDE, you can declare the xsd in your ivy files to benefit from code completion / validation:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
|
|
|||
|
|
@ -29,13 +29,11 @@ Note that exclusion is always done AFTER inclusion has been done.
|
|||
|
||||
*__since 1.3__* This exclude feature can also be used not only to exclude artifacts but also to exclude whole modules. Indeed when you exclude artifacts, it doesn't avoid ivy to search for the module itself, and to resolve the dependencies of the module. But you can also exclude the whole module, which means that the module will not be downloaded at all, and so its own dependencies will not be resolved. For sure, this is usually done to exclude not a direct dependency but an indirect one. To exclude a whole module, you just have to not specify any artifact name, type and ext in your exclude rule. For instance:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency name="A" rev="1.0">
|
||||
<exclude module="B"/>
|
||||
</dependency>
|
||||
|
||||
----
|
||||
|
||||
*__since 2.0__* A link:../ivyfile/exclude.html[module wide exclude] can also be used to exclude dependencies for the whole module (and not only in the context of one dependency as it is the case here).
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ The configurations in which an artifact is published can be configured in two wa
|
|||
The two are equivalent, it is only a matter of preference. However, do not mix both for one artifact.
|
||||
|
||||
*__since 1.4__* The artifact element has default values for all its attributes, so if you want to declare a default artifact you can just declare it like that:
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<artifact />
|
||||
|
|
@ -76,7 +76,7 @@ If this is the only artifact declared, then it's equivalent to having no publica
|
|||
== Examples
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<artifact />
|
||||
|
|
@ -89,7 +89,7 @@ Declares an artifact with the name of the module as name, type and ext jar, and
|
|||
'''
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<artifact name="foo-src" type="source" ext="zip" conf="src" />
|
||||
|
|
@ -102,7 +102,7 @@ Declares an artifact foo-src, of type 'source' with extension 'zip', and publish
|
|||
'''
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<artifact name="foo" url="http://www.acme.com/repository/barbaz/foo-1.2-bar.jar" />
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ This is very useful to build a compile configuration, for instance, forcing the
|
|||
== Examples
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<conf name="core" visibility="private" />
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ See link:#defaultconfmapping[examples below] to clarify the behavior of these tw
|
|||
When Ivy parses your Ivy file, it will create (internally) modify the configuration mapping of your dependencies.
|
||||
For instance, say you have:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<configurations defaultconfmapping="conf1->other1;conf2->other2">
|
||||
|
|
@ -81,7 +81,7 @@ For instance, say you have:
|
|||
|
||||
When Ivy parses this file, it will construct the following dependency (in-memory only):
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<dependency name="other-module" conf="conf1->other1" />
|
||||
----
|
||||
|
|
@ -90,7 +90,7 @@ So, if you now resolve the conf2 configuration, you will only get the other1 dep
|
|||
|
||||
But when you set confmappingoverride to true, Ivy will construct the following dependency in memory:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<dependency name="other-module" conf="conf1->other1;conf2->other2" />
|
||||
----
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ For instance, imagine you have A, B & C master configurations. If you specify ar
|
|||
|
||||
Example:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="yourorg" name="yourmodule9" rev="9.1" conf="A,B->default">
|
||||
|
|
@ -75,7 +75,7 @@ Example:
|
|||
== Examples
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="foo" name="bar" rev="1.0">
|
||||
|
|
@ -90,7 +90,7 @@ Declares a dependency on module bar which only publish one artifact: baz.jar.
|
|||
'''
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="foo" name="bar" rev="1.0">
|
||||
|
|
@ -105,7 +105,7 @@ Same as above, except that if the artifact is not found at its standard location
|
|||
'''
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="foo" name="bar" rev="1.0">
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ For instance, imagine you have A, B & C master configurations. If you restrict t
|
|||
|
||||
Example:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="yourorg" name="yourmodule9" rev="9.1" conf="A,B->default">
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ where _att_ is the name of the attribute shared by the configurations of the gro
|
|||
|
||||
For instance, if you have:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<configurations>
|
||||
|
|
@ -195,7 +195,7 @@ For instance, if you have:
|
|||
|
||||
Then you can do:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="acme" name="foo" rev="2.0" conf="*[axis=platform]->default"/>
|
||||
|
|
@ -299,7 +299,7 @@ See link:../ivyfile/conflicts.html[conflicts manager] for details.
|
|||
== Examples
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="jayasoft" name="swtbinding" revision="0.2"/>
|
||||
|
|
@ -311,7 +311,7 @@ Declares a dependency on the module swtbinding from jayasoft in its revision 0.2
|
|||
'''
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="jayasoft" name="swtbinding" branch="fix-103" revision="latest.integration"/>
|
||||
|
|
@ -323,7 +323,7 @@ Same as above except that it will take the latest revision on the branch 'fix-10
|
|||
'''
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency name="mymodule" revision="latest.integration" conf="test->default"/>
|
||||
|
|
@ -341,7 +341,7 @@ from the same organisation as the module in which the dependency is declared. Th
|
|||
'''
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="apache" name="commons-lang" revision="2.0" force="true" conf="default"/>
|
||||
|
|
@ -395,7 +395,7 @@ from foo, in revision 3.0. The dependencies of bar will themselves not be includ
|
|||
'''
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<dependency org="foo" name="bar" revision="3.0" changing="true" conf="compile->runtime(default)"/>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ When delivering an ivy file with such an inclusion, the included configuration f
|
|||
== Examples
|
||||
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<ivy-module version="1.0">
|
||||
|
|
@ -62,7 +62,7 @@ When delivering an ivy file with such an inclusion, the included configuration f
|
|||
|
||||
with included-configurations.xml like this:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
|
||||
<configurations defaultconfmapping="*->@">
|
||||
|
|
|
|||
|
|
@ -25,8 +25,11 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
|
|||
link rel="stylesheet" type="text/css" href="#{page.relativeRoot}style/style.css"
|
||||
script src="#{page.relativeRoot}js/jquery.pack.js" type="text/javascript"
|
||||
script src="#{page.relativeRoot}js/jquery.treeview.js" type="text/javascript"
|
||||
link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"
|
||||
script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js" type="text/javascript"
|
||||
javascript:
|
||||
$(document).ready(function(){$("#treemenu").Treeview({speed: "fast",store: true});});
|
||||
hljs.initHighlightingOnLoad();
|
||||
body
|
||||
div id="body"
|
||||
table id="header" summary="Navigation elements." border="0" cellpadding="0" cellspacing="0" width="100%"
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ _WARNING_: Before 2.0, the behavior was to overwrite the properties. Since 2.0,
|
|||
Suppose we have one dependency called `mydep` in revision 1.0 publishing two artifacts: `foo.jar` and `bar.jar`.
|
||||
Then:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<artifactproperty conf="build"
|
||||
name="[module].[artifact]-[revision]"
|
||||
|
|
@ -58,7 +58,7 @@ Then:
|
|||
|
||||
will set two properties:
|
||||
|
||||
[source]
|
||||
[source,properties]
|
||||
----
|
||||
mydep.foo-1.0 = my/cache/dir/mydep/foo-1.0.jar
|
||||
mydep.bar-1.0 = my/cache/dir/mydep/bar-1.0.jar
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ See this link:http://www.jaya.free.fr/ivy/doc/articles/ease-multi-module.html[ar
|
|||
|
||||
Here is an example of generate file:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<modules>
|
||||
|
|
@ -74,14 +74,14 @@ Here is an example of generate file:
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:artifactreport tofile="${basedir}/path/to/myreport.xml" />
|
||||
----
|
||||
|
||||
Generates the artifact report for all configurations resolved during the last resolve call (in the same build).
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:artifactreport tofile="${basedir}/path/to/myreport.xml" conf="default"/>
|
||||
----
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ FileSets are used to select sets of files to order.
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildlist reference="build-path">
|
||||
<fileset dir="projects" includes="**/build.xml"/>
|
||||
|
|
@ -93,14 +93,14 @@ Builds a list of `build.xml` files sorted according to the `ivy.xml` files found
|
|||
|
||||
This list can then be used like that:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<subant target="build" buildpathref="build-path" />
|
||||
----
|
||||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" reverse="true">
|
||||
<fileset dir="projects" includes="**/build.xml"/>
|
||||
|
|
@ -111,7 +111,7 @@ Builds a list of `build.xml` files sorted according to the `ivy.xml` files found
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" root="myapp">
|
||||
<fileset dir="projects" includes="**/build.xml"/>
|
||||
|
|
@ -122,7 +122,7 @@ Builds a list of `build.xml` files sorted according to the `ivy.xml` files found
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildlist reference="build-path" ivyfilepath="ivy/ivy.xml" leaf="mymodule">
|
||||
<fileset dir="projects" includes="**/build.xml"/>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ Note that when asking for revision 1, you can get a revision 10.0. To avoid that
|
|||
|
||||
Here is how it can be used (suppose 1.3.1 is the latest version of ivy in the repository):
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildnumber organisation="apache" module="ivy" />
|
||||
----
|
||||
|
|
@ -82,7 +82,7 @@ will set 1.3.1 as revision, 1.3.2 as new revision, 1 as build number and 2 as ne
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildnumber organisation="apache" module="ivy" revision="1.3" />
|
||||
----
|
||||
|
|
@ -91,7 +91,7 @@ will set 1.3.1 as revision, 1.3.2 as new revision, 1 as build number and 2 as ne
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildnumber organisation="apache" module="ivy" revision="1.2" />
|
||||
----
|
||||
|
|
@ -100,7 +100,7 @@ will set 1.2 as revision, 1.2.1 as new revision, no build number and 1 as new bu
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildnumber organisation="apache" module="ivy" revision="1." />
|
||||
----
|
||||
|
|
@ -109,7 +109,7 @@ will set 1.3.1 as revision, 1.4 as new revision, 3 as build number and 4 as new
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildnumber organisation="apache" module="ivy" revision="3." />
|
||||
----
|
||||
|
|
@ -118,7 +118,7 @@ will set no revision, 3.0 as new revision, no build number and 0 as new build nu
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildnumber organisation="apache" module="ivy" revision="1.4-RC" defaultBuildNumber="1" revSep=""/>
|
||||
----
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ NB: among every listed files or artifacts, only the actually OSGi bundles will b
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:buildobr baseDir="${eclipse.home}" out="${basedir}/target/repo-eclipse.xml" indent="true" />
|
||||
----
|
||||
|
|
@ -56,7 +56,7 @@ Builds an indented OBR descriptor from an Eclipse install, with their path relat
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:configure file="ivysettings.xml" />
|
||||
<ivy:buildobr resolverName="my-file-resolver" out="${basedir}/target/repo-eclipse.xml" />
|
||||
|
|
@ -66,7 +66,7 @@ Configure an Ivy settings and builds an OBR descriptor from jars resolved by the
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:configure file="ivysettings.xml" />
|
||||
<ivy:buildobr cacheName="my-cache" out="${basedir}/target/repo-eclipse.xml" />
|
||||
|
|
@ -76,7 +76,7 @@ Configure an Ivy settings and builds an OBR descriptor from jars contained in th
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:configure file="ivysettings.xml" />
|
||||
<ivy:resolve file="ivy.xml" />
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ Built path is registered in ant with a given id, and can thus be used like any o
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<cachepath pathid="default.classpath" conf="default" />
|
||||
----
|
||||
|
|
@ -47,7 +47,7 @@ Construct an Ant path composed of all artifacts being part of the default config
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<cachepath pathid="default.classpath" conf="default" useOrigin="true" />
|
||||
----
|
||||
|
|
@ -56,7 +56,7 @@ Same as before but will use the original location for local artifacts, and the c
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:cachepath organisation="emma" module="emma" revision="2.0.4217" inline="true" conf="ant" pathid="emma.classpath"/>
|
||||
<taskdef resource="emma_ant.properties" classpathref="emma.classpath" />
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ __mydep__ has a transitive dependency on __mytransitivedependency__ in revision
|
|||
|
||||
Then:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<checkdepsupdate />
|
||||
----
|
||||
|
|
@ -57,7 +57,7 @@ Dependencies updates available :
|
|||
|
||||
Same example with transitive dependencies :
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<checkdepsupdate showTransitive="true" />
|
||||
----
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Cleans the Ivy cache.
|
|||
|
||||
This task is roughly equivalent to:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<delete dir="${ivy.cache.dir}" />
|
||||
----
|
||||
|
|
@ -41,14 +41,14 @@ This task loads the Ivy settings as any other post settings task, and allows eas
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:cleancache />
|
||||
----
|
||||
|
||||
Cleans the cache directory as defined in the loaded settings (by default `~/.ivy2/cache`)
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:cleancache settingsRef="mysettings"/>
|
||||
----
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ It's also possible to configure authentication settings for multiple urls. This
|
|||
|
||||
=== Simplest settings
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:configure />
|
||||
----
|
||||
|
|
@ -65,21 +65,21 @@ Use either `${ivy.settings.file}` if it exists, or the link:../samples/ivysettin
|
|||
|
||||
=== Configure with a file
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:configure file="myconffile.xml" />
|
||||
----
|
||||
|
||||
=== Configure with an url
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:configure url="http://mysite.com/myconffile.xml" />
|
||||
----
|
||||
|
||||
=== Configure multiple URLs which require autentication
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:configure file="path/to/my/ivysettings.xml">
|
||||
<credentials host="myhost.com" realm="My Realm" username="myuser" passwd="mypasswd" />
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:convertmanifest manifest="META-INF/MANIFEST.MF" ivyFile="ivy.xml" />
|
||||
----
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:convertpom pomFile="pom.xml" ivyFile="ivy.xml" />
|
||||
----
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ It can also be useful if you want to trigger a recursive delivery and then ensur
|
|||
|
||||
Deliver an ivy file without the private configurations:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<deliver conf="*(public)" />
|
||||
----
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ __mydep__ has a transitive dependency on __mytransitivedependency__ in revision
|
|||
|
||||
Then:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<dependencytree />
|
||||
----
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ If the module is not found the property is not set.
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:findrevision organisation="apache" module="ivy" revision="latest.integration"/>
|
||||
----
|
||||
|
|
@ -47,7 +47,7 @@ finds the latest version of ivy available in the repository and sets the propert
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:findrevision organisation="apache" module="ivy" revision="1.0+"/>
|
||||
----
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ These elements takes two attributes: +
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:fixdeps tofile="ivy-fixed.xml" />
|
||||
----
|
||||
|
|
@ -65,7 +65,7 @@ Simple fix of some dependencies.
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:fixdeps tofile="ivy-fixed.xml">
|
||||
<keep org="com.acme" module="mymodule" />
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ Yes, if you are retrieving information about a module from an ivy repository.
|
|||
|
||||
Given this `ivy.xml` file:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy-module version="1.0" xmlns:e="http://ant.apache.org/ivy/extra">
|
||||
<info organisation="apache"
|
||||
|
|
@ -103,14 +103,14 @@ Given this `ivy.xml` file:
|
|||
</ivy-module>
|
||||
----
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:info file="${basedir}/path/to/ivy.xml" />
|
||||
----
|
||||
|
||||
Parses `+++${basedir}/path/to/ivy.xml+++` and set properties as described above accordingly:
|
||||
|
||||
[source]
|
||||
[source,properties]
|
||||
----
|
||||
ivy.organisation=apache
|
||||
ivy.module=info-all
|
||||
|
|
@ -134,21 +134,21 @@ ivy.artifact.2.extra.data=client
|
|||
|
||||
Given the same ivy module in a repository:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:info organisation="apache" module="info-all" revision="1.0" />
|
||||
----
|
||||
|
||||
will set the exact same set of properties as above. Using:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:info organisation="apache" module="info-all" revision="1.0" property="infotest"/>
|
||||
----
|
||||
|
||||
will set:
|
||||
|
||||
[source]
|
||||
[source,properties]
|
||||
----
|
||||
infotest.organisation=apache
|
||||
infotest.module=info-all
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ For more details about this task and its usage see the link:../tutorial/build-re
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:install organisation="apache" module="commons-lang" revision="2.0" from="ivyrep" to="myfsresolver"/>
|
||||
----
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ To know if a module matches the criteria ivy will use the configured link:../con
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:listmodules organisation="apache" module="ivy" revision="*" property="ivy.[revision]" value="found"/>
|
||||
----
|
||||
|
|
@ -51,7 +51,7 @@ will find all revisions of the module ivy in the org apache, and create one prop
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:listmodules organisation="*" module="ivy*" revision="1.0" matcher="glob" property="modules.[module]" value="[organisation]"/>
|
||||
----
|
||||
|
|
@ -59,7 +59,7 @@ will find all revisions of the module ivy in the org apache, and create one prop
|
|||
use the glob matcher to find all modules which name starts with ivy with revision 1.0, and sets for each a property with module name found and organisation for value.
|
||||
|
||||
Example:
|
||||
[source]
|
||||
[source,properties]
|
||||
----
|
||||
modules.ivy=apache
|
||||
modules.ivyde=apache
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Note that each property can be given a value manually in the Ant build file. In
|
|||
|
||||
The default template that ships with Ivy looks like this:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
${ivy.pom.license}
|
||||
${ivy.pom.header}
|
||||
|
|
@ -104,7 +104,7 @@ These elements takes the following attributes: +
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:makepom ivyfile="${basedir}/path/to/ivy.xml" pomfile="${basedir}/path/to/module.pom" conf="default,runtime">
|
||||
<mapping conf="default" scope="compile"/>
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ There is one important difference with the ivy.xml's link:../ivyfile/dependencie
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:cachepath organisation="emma" module="emma" revision="2.0.4217" inline="true" conf="ant" pathid="emma.classpath"/>
|
||||
<taskdef resource="emma_ant.properties" classpathref="emma.classpath" />
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ The source artifact pattern can be specified either as an attribute on the task
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:publish resolver="local" pubrevision="1.0">
|
||||
<artifacts pattern="build/artifacts/jars/[artifact].[ext]" />
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ Then following a few link:../yed.html[simple steps] you can obtain a graph like
|
|||
|
||||
To generate a HTML and graphml report:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<report conf="compile" />
|
||||
----
|
||||
|
|
@ -61,7 +61,7 @@ To generate a HTML and graphml report:
|
|||
|
||||
To generate a HTML report only:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<report conf="compile" graph="false" />
|
||||
----
|
||||
|
|
@ -70,14 +70,14 @@ To generate a HTML report only:
|
|||
|
||||
To generate an XML report using a custom stylesheet:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<report conf="compile" xslfile="my-custom-stylesheet.xsl" xslext="xml" />
|
||||
----
|
||||
|
||||
To generate an XML report using a custom stylesheet which needs some parameters:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<report conf="compile" xslfile="my-custom-stylesheet.xsl" xslext="xml">
|
||||
<param name="param1" expression="value1" />
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ Moreover, to be able to list organizations, this task requires an [organisation]
|
|||
|
||||
To generate a xml report for all the latest versions of all the modules in your repository:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:repreport />
|
||||
----
|
||||
|
|
@ -63,7 +63,7 @@ To generate a xml report for all the latest versions of all the modules in your
|
|||
|
||||
To generate a graphml report for all the latest versions of all the modules in your repository:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:repreport xml="false" graph="true" />
|
||||
----
|
||||
|
|
@ -72,7 +72,7 @@ To generate a graphml report for all the latest versions of all the modules in y
|
|||
|
||||
To generate a xml report for all the latest versions of the modules from the organisation foo in your repository:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:repreport organisation="foo" />
|
||||
----
|
||||
|
|
@ -81,7 +81,7 @@ To generate a xml report for all the latest versions of the modules from the org
|
|||
|
||||
To generate a xml report for all the versions on the 1.x stream of the modules named bar* from the organisation foo in your repository:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:repreport organisation="foo" module="bar*" revision="1.+" matcher="glob" />
|
||||
----
|
||||
|
|
@ -90,7 +90,7 @@ To generate a xml report for all the versions on the 1.x stream of the modules n
|
|||
|
||||
To generate an XML report using a custom stylesheet:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:repreport xsl="true" xslfile="my-custom-stylesheet.xsl" xslext="xml" />
|
||||
----
|
||||
|
|
@ -99,7 +99,7 @@ To generate an XML report using a custom stylesheet:
|
|||
|
||||
To generate an XML report using a custom stylesheet which needs some parameters:
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:repreport xsl="true" xslfile="my-custom-stylesheet.xsl" xslext="xml">
|
||||
<param name="param1" expression="value1" />
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ There is one important difference with the ivy.xml's link:../ivyfile/dependencie
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resolve file="path/to/ivy.xml"/>
|
||||
----
|
||||
|
|
@ -162,7 +162,7 @@ Resolve all dependencies declared in path/to/ivy.xml file.
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resolve file="path/to/ivy.xml" transitive="false" />
|
||||
----
|
||||
|
|
@ -171,7 +171,7 @@ Same as above, but with transitive dependencies disabled.
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resolve file="path/to/ivy.xml" conf="default, test"/>
|
||||
----
|
||||
|
|
@ -180,7 +180,7 @@ Resolve the dependencies declared in the configuration `default` and `test` of t
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resolve file="path/to/ivy.xml" type="jar"/>
|
||||
----
|
||||
|
|
@ -189,7 +189,7 @@ Resolve all dependencies declared in `path/to/ivy.xml` file, but download only `
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resolve organisation="apache" module="commons-lang" revision="2+" inline="true" />
|
||||
----
|
||||
|
|
@ -198,7 +198,7 @@ Resolve the `commons-lang` module revision 2+ from the repository, with its depe
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resolve>
|
||||
<dependency org="apache" name="commons-lang" rev="2+" />
|
||||
|
|
@ -211,7 +211,7 @@ Resolve of both `commons-lang` and `commons-logging`, with their dependencies bu
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resolve>
|
||||
<dependency org="org.slf4j" module="slf4j" rev="1.6" conf="api,log4j" />
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ This datatype share the same attributes, child elements and behaviour of a link:
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resources file="path/to/ivy.xml"/>
|
||||
----
|
||||
|
|
@ -33,7 +33,7 @@ Build a resource collection of every artifacts of all dependencies declared in `
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resources file="path/to/ivy.xml" transitive="false" />
|
||||
----
|
||||
|
|
@ -42,7 +42,7 @@ Same as above, but with transitive dependencies disabled.
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resources file="path/to/ivy.xml" conf="default, test"/>
|
||||
----
|
||||
|
|
@ -51,7 +51,7 @@ Build a resource collection of every artifacts of the dependencies declared in t
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resources file="path/to/ivy.xml" type="jar"/>
|
||||
----
|
||||
|
|
@ -60,7 +60,7 @@ Build a resource collection of every `jar` artifact of all dependencies declared
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resources organisation="apache" module="commons-lang" revision="2+" inline="true" />
|
||||
----
|
||||
|
|
@ -69,7 +69,7 @@ Build a resource collection of every artifacts of `commons-lang` module revision
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resources>
|
||||
<dependency org="apache" module="commons-lang" rev="2+" />
|
||||
|
|
@ -82,7 +82,7 @@ Build a resource collection of every artifacts of both `commons-lang` and `commo
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:resources>
|
||||
<dependency org="org.slf4j" module="slf4j" rev="1.6" conf="api,log4j" />
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ Available options are the same as for link:../use/resolve.html[resolve] when use
|
|||
|
||||
== Examples
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve />
|
||||
----
|
||||
|
|
@ -80,7 +80,7 @@ Retrieves dependencies using default parameters. This usually retrieves all the
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]"/>
|
||||
----
|
||||
|
|
@ -102,7 +102,7 @@ Note that if a dependency is required in the two configurations, it will be copi
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve pattern="${lib.dir}/[conf]/[artifact].[ext]" sync="true" />
|
||||
----
|
||||
|
|
@ -136,7 +136,7 @@ With no synchronisation, commons-logging would not have been removed by the call
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve pattern="${lib.dir}/[type]/[artifact]-[revision].[ext]" conf="runtime"/>
|
||||
----
|
||||
|
|
@ -157,7 +157,7 @@ lib
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve pattern="${lib.dir}/[organisation]/[artifact]-[revision].[ext]" />
|
||||
----
|
||||
|
|
@ -174,7 +174,7 @@ lib
|
|||
junit-4.1.zip
|
||||
----
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve pattern="${lib.dir}/[orgPath]/[artifact]-[revision].[ext]" />
|
||||
----
|
||||
|
|
@ -194,7 +194,7 @@ lib
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve organisation="foo" module="bar" inline="true" pattern="${my.install.dir}/[artifact].[ext]"/>
|
||||
----
|
||||
|
|
@ -203,7 +203,7 @@ Resolves and retrieve the latest version of the module bar and its dependencies
|
|||
|
||||
'''
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:retrieve pattern="lib/[artifact]-[revision].[ext]">
|
||||
<firstmatchmapper>
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ All Ivy variables set during the settings are available in the Ant project as lo
|
|||
Moreover, the variables are exposed under two names: the variable name, and the variable name suffixed by dot + the settings id.
|
||||
|
||||
For instance, if you load a settings with the id `myid`, and define a variable `my.variable=my.value` in the Ivy settings, both `my.variable` and `my.variable.myid` will now be available as properties in Ant and equal to `my.value`. If you later load another settings with the id `yourid`, and in this settings assign the variable `my.variable` the value `your.value`, in the Ant project you will have:
|
||||
[source]
|
||||
[source,properties]
|
||||
----
|
||||
my.variable=my.value
|
||||
my.variable.myid=my.value
|
||||
|
|
@ -67,7 +67,7 @@ A special attention should be applied when you have a multi-project build with `
|
|||
|
||||
=== Simplest settings
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:settings />
|
||||
----
|
||||
|
|
@ -78,21 +78,21 @@ This simplest setting is implicit.
|
|||
|
||||
=== Configure with a file
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:settings file="mysettings.xml" />
|
||||
----
|
||||
|
||||
=== Configure with an url
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:settings url="http://mysite.com/mysettings.xml" />
|
||||
----
|
||||
|
||||
=== Configure multiple realms which require autentication
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:settings file="path/to/my/ivysettings.xml">
|
||||
<credentials host="myhost.com" realm="My Realm" username="myuser" passwd="mypasswd" />
|
||||
|
|
@ -104,7 +104,7 @@ This simplest setting is implicit.
|
|||
|
||||
You can use multiple ivy settings during a build. Then every ivy task should specify the settings it uses using the `settingsRef` attribute.
|
||||
|
||||
[source]
|
||||
[source,xml]
|
||||
----
|
||||
<ivy:settings id="ivy.normal.settings" file="normal_settings.xml" />
|
||||
<ivy:settings id="ivy.release.settings" file="release_settings.xml" />
|
||||
|
|
|
|||
|
|
@ -168,7 +168,9 @@
|
|||
<target name="generate-doc" depends="generate-tutorial-output,default-version">
|
||||
<ivy:cachepath pathid="asciidoctor.path" organisation="org.asciidoctor" module="asciidoctor-ant" revision="1.5.4" inline="true"/>
|
||||
<taskdef uri="antlib:org.asciidoctor.ant" resource="org/asciidoctor/ant/antlib.xml" classpathref="asciidoctor.path"/>
|
||||
<asciidoctor:convert sourceDirectory="${doc.src.dir}" outputDirectory="${doc.build.dir}" backend="xhtml5" templateDir="${doc.src.dir}/templates" preserveDirectories="true">
|
||||
<asciidoctor:convert sourceDirectory="${doc.src.dir}" outputDirectory="${doc.build.dir}" backend="xhtml5"
|
||||
templateDir="${doc.src.dir}/templates" preserveDirectories="true"
|
||||
sourceHighlighter="highlightjs">
|
||||
<attribute key="basedir" value="${doc.src.dir}"/>
|
||||
<attribute key="imagesdir" value=""/>
|
||||
<attribute key="version" value="${build.version}" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue