mirror of https://github.com/apache/ant-ivy
59 lines
2.8 KiB
HTML
59 lines
2.8 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>
|
|
<script type="text/javascript">var xookiConfig = {level: 1};</script>
|
|
<script type="text/javascript" src="../xooki/xooki.js"></script>
|
|
</head>
|
|
<body>
|
|
<textarea id="xooki-source">
|
|
<b>Tag:</b> namespaces
|
|
|
|
<span class="tagdoc" id="ivysettings.namespaces">Namespaces are an advanced feature of Ivy which let you use resolvers in which module names and organisations are not consistent between each other.</span>
|
|
|
|
For instance, if you want to use both a maven2 repository and an ivyrep, you will face some naming issues. For example, all apache commons projects are declared to be part of the organisation <i>apache</i> in ivyrep whereas in maven2 ibiblio repository, their organisation is same as the module.
|
|
|
|
So if you try to use both maven2 and ivyrep repositories, you will face some issues like:
|
|
<quote>
|
|
How do I declare a dependency on commons-lang?
|
|
I have an error while trying to resolve module xxx. It says that it depends on [commons-httpclient commons-httpclient] and that it isn't available.
|
|
...
|
|
</quote>
|
|
|
|
Ivy's answer to this issue is called namespaces. In short, you can attach a namespace to each dependency resolver in Ivy, and each namespace defines rules to convert names from the system namespace to the defined namespace itself, and vice versa.
|
|
|
|
This very powerful feature is thoroughly used in the <a href="../tutorial/build-repository/advanced.html">build your own repository tutorial</a>, so is the best place to see an example of what can be done with namespaces.
|
|
|
|
<h1>Child elements</h1>
|
|
<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>[[settings/namespace]]</td><td>defines a new namespace</td>
|
|
<td>0..n</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
</textarea>
|
|
<script type="text/javascript">xooki.postProcess();</script>
|
|
</body>
|
|
</html>
|