File: ivyfile.html

package info (click to toggle)
sbt-ivy 2.4.0~rc1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 27,784 kB
  • sloc: xml: 217,953; java: 72,172; makefile: 21
file content (137 lines) | stat: -rw-r--r-- 7,321 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!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">
Ivy use is entirely based on <em>module descriptors</em> known as "ivy files". Ivy files are xml files, usually called ivy.xml, containing the description of the dependencies of a module, its published artifacts and its configurations.

Here is the simplest ivy file you can write:
<code type="xml">
<ivy-module version="2.0">
  <info organisation="myorg"
        module="mymodule"
        />
</ivy-module>
</code>

If you want to see a sample module descriptor using almost all possibilities of ivy files, check this one, <a href="samples/ivy-sample-xslt.xml">with</a> or <a href="samples/ivy-sample.xml">without</a> xslt.

Before beginning the reference itself, it is required to have in mind the terminology defined in the <a href="reference.html">main page</a> of this reference documentation.

For those familiar with xml schema, the schema used to validate ivy files can be found <a href="http://ant.apache.org/ivy/schemas/ivy.xsd">here</a>. For those using xsd aware IDE, you can declare the xsd in your ivy files to benefit from code completion / validation:
<code type="xml">
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation=
                   "http://ant.apache.org/ivy/schemas/ivy.xsd">
  <info organisation="myorg"
        module="mymodule"
        />
</ivy-module>
</code>

<h2>Dynamic and <a name="resolved">resolved</a> ivy files</h2>

A module descriptor (ivy file) is needed both before and after the publication of each revision of the module. Depending on the case, a module descriptor can be either <em>dynamic</em> or <em>resolved</em>:

<h3>Dynamic descriptor for module development</h3>

During the module development time, between publications, the descriptor helps in managing all the possibly changing dependencies of the module. For that purpose, development time ivy files can declare dynamic dependencies to allow for a greater flexibility of use. <a href="ivyfile/dependency.html#revision">Dynamic revision</a> references like "latest.integration" or "1.0.+" are possible and may resolve to different artifacts at different times. Variables can be used for even more flexibility. Development time ivy files are hence called "dynamic", because they can produce different results over time. The dynamic ivy files are normally considered source files and kept with them (under SCM control).

<h3>Resolved descriptors for publishing</h3>

At each publication, another kind of a module descriptor is needed to document the dependencies of the particular published revision of the module. For that purpose, the descriptor usually needs to be fixed as its dependencies should no longer change. In doing so, the published module revision gets fixed, explicitly resolved dependencies. No variables are allowed either. Such publication-friendly, static ivy files are called "resolved", because they should always produce the same results. The resolved ivy files are comparable to published artifacts and are kept with them in a repository.

Resolved ivy files are generated from their original dynamic ivy files via the <a href="use/deliver.html">deliver</a> task.

Note that although it is technically possible to publish module revisions with dynamic ivy files, it is not a generally recommended practice.

<h1>Hierarchical Index</h1>
<pre>
ivy-module
    <a href="ivyfile/info.html">info</a>
        <a href="ivyfile/license.html">license</a>
        <a href="ivyfile/ivyauthor.html">ivyauthor</a>
        <a href="ivyfile/repository.html">repository</a>
        <a href="ivyfile/description.html">description</a>
    <a href="ivyfile/configurations.html">configurations</a>
        <a href="ivyfile/conf.html">conf</a>
    <a href="ivyfile/publications.html">publications</a>
        <a href="ivyfile/artifact.html">artifact</a>
            <a href="ivyfile/artifact-conf.html">conf</a>
    <a href="ivyfile/dependencies.html">dependencies</a>
        <a href="ivyfile/dependency.html">dependency</a>
            <a href="ivyfile/dependency-conf.html">conf</a>
                <a href="ivyfile/mapped.html">mapped</a>
            <a href="ivyfile/dependency-artifact.html">artifact</a>
                <a href="ivyfile/dependency-artifact-conf.html">conf</a>
            <a href="ivyfile/dependency-artifact.html">include</a>
                <a href="ivyfile/dependency-artifact-conf.html">conf</a>
            <a href="ivyfile/artifact-exclude.html">exclude</a>
                <a href="ivyfile/artifact-exclude-conf.html">conf</a>
        <a href="ivyfile/exclude.html">exclude</a>
        <a href="ivyfile/override.html">override</a>
        <a href="ivyfile/conflict.html">conflict</a>
    <a href="ivyfile/conflicts.html">conflicts</a>
        <a href="ivyfile/manager.html">manager</a>
</pre>

<h1>ivy-module</h1>
<b>Tag:</b> ivy-module

The root tag of any ivy file (module descriptor).
<h2>Attributes</h2>
<table class="ivy-attributes">
<thead>
    <tr><th class="ivy-att">Attribute</th><th class="ivy-att-desc">Description</th><th class="ivy-att-req">Required</th></tr>
</thead>
<tbody>
    <tr><td>version</td><td>the version of the ivy file specification - should be '2.0' with current version of ivy</td>
        <td>Yes</td></tr>
</tbody>
</table>
<h2>Child elements</h2>
<table class="ivy-children">
<thead>
    <tr><th class="ivy-chld">Element</th><th class="ivy-chld-desc">Description</th><th class="ivy-chld-card">Cardinality</th></tr>
</thead>
<tbody>
    <tr><td>info</td><td>contains information about the described module</td>
        <td>1</td></tr>
    <tr><td>configurations</td><td>container for configuration elements</td>
        <td>0..1</td></tr>
    <tr><td>publications</td><td>container for published artifact elements</td>
        <td>0..1</td></tr>
    <tr><td>dependencies</td><td>container for dependency elements</td>
        <td>0..1</td></tr>
    <tr><td>conflicts</td><td>section to configure the conflict managers to use</td>
        <td>0..1</td></tr>
</tbody>
</table>
	</textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>