[Notifications] [Ticket] #101: publish merged version of Ivy descriptor with <extends>
easyant
trac at easyant.org
Sun Feb 21 21:12:17 CET 2010
#101: publish merged version of Ivy descriptor with <extends>
---------------------------------------------+------------------------------
Reporter: tormp | Owner: tormp
Type: enhancement | Status: new
Priority: critical | Milestone: easyant-0.8
Component: core | Version:
Keywords: ivy publish extends inheritance |
---------------------------------------------+------------------------------
This is a requirement for the acceptance of our Ivy patch.
When an Ivy module inherits from a parent module, it should be possible to
publish a merged version of that descriptor which includes the data from
parent directly. For example,
Child module:
{{{
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
<info module="baz">
<extends organisation="net.foo" module="bar"
revision="latest.revision"/>
</info>
<dependencies>
<dependency org="commons-logging" name="commons-logging"
rev="1.1.1"/>
</dependencies>
</ivy-module>
}}}
Parent module:
{{{
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
<info organisation="net.foo" module="bar" revision="1.0">
<description>Some complicated project.</description>
</info>
<configurations>
<conf name="default"/>
<conf name="test"/>
</configurations>
<dependencies>
<dependency org="junit" name="junit" rev="4.7"
conf="test"/>
</dependencies>
</ivy-module>
}}}
Merged module:
{{{
<ivy-module version="2.0" xmlns:ea="http://www.easyant.org">
<info organisation="net.foo" module="baz" revision="1.0">
<!-- <extends organisation="net.foo" module="bar"
revision="latest.revision"/> -->
<description>Some complicated project.</description>
</info>
<configurations>
<!-- configurations imported from net.foo#bar;1.0 -->
<conf name="default"/>
<conf name="test"/>
</configurations>
<dependencies>
<dependency org="commons-logging" name="commons-logging"
rev="1.1.1"/>
<!-- dependencies imported from net.foo#bar;1.0 -->
<dependency org="junit" name="junit" rev="4.7"
conf="test"/>
</dependencies>
</ivy-module>
}}}
Note the use of XML comments to record the source of merged data.
The ivy:publish task currently defines an "update" attribute, see
http://ant.apache.org/ivy/history/latest-milestone/use/publish.html.
update=true implies that the published descriptor should be updated with
new revision info and so on. Our feature is similar in nature.
We'll define a new attribute, 'merge=[boolean]', which defines whether the
published descriptor should merge parent data. 'merge' will have the same
value as 'update' by default. So for example,
{{{
<!-- merges parent data -->
<ivy:publish update="true"/>
<!-- does not merge parent data -->
<ivy:publish update="false"/>
<!-- merges parent data -->
<ivy:publish update="false" merge="true"/>
<!-- does not merge parent data -->
<ivy:publish update="true" merge="false"/>
}}}
--
Ticket URL: <http://easyant.org/trac/ticket/101>
easyant <http://www.easyant.org/trac>
easyant
More information about the Notifications
mailing list