[
https://issues.apache.org/jira/browse/IVY-742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852714#action_12852714
]
Jason Trump edited comment on IVY-742 at 4/2/10 5:27 AM:
---------------------------------------------------------
Hey everybody,
Jean-Louis and I have been working on this patch a little bit to implement the
"merge-on-publish" behavior that was last discussed by Maarten and Xavier. It
was a little tricky. I'll attach an updated version of the patch, which
includes a number of tests.
The merged descriptor comments out the <extends> element, and adds descriptive
comments to imported elements. so a merged descriptor looks something like
this:
{{<ivy-module version="2.0">
<info organisation="net.foo" module="baz" revision="1.0">
<!-- <extends organisation="net.foo" module="bar"
revision="1.0"/> -->
<description>Some complicated project.</description>
</info>
<configurations>
<conf name="extra" description="not defined on parent"/>
<!-- configurations inherited 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 inherited from net.foo#bar;1.0 -->
<dependency org="junit" name="junit" rev="4.7" conf="test"/>
</dependencies>
</ivy-module>}}
What do you think?
jt
was (Author: tormp):
Hey everybody,
Jean-Louis and I have been working on this patch a little bit to implement the
"merge-on-publish" behavior that was last discussed by Maarten and Xavier. It
was a little tricky. I'll attach an updated version of the patch, which
includes a number of tests.
The merged descriptor comments out the <extends> element, and adds descriptive
comments to imported elements. so a merged descriptor looks something like
this:
{{
<ivy-module version="2.0">
<info organisation="net.foo" module="baz" revision="1.0">
<!-- <extends organisation="net.foo" module="bar"
revision="1.0"/> -->
<description>Some complicated project.</description>
</info>
<configurations>
<conf name="extra" description="not defined on parent"/>
<!-- configurations inherited 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 inherited from net.foo#bar;1.0 -->
<dependency org="junit" name="junit" rev="4.7" conf="test"/>
</dependencies>
</ivy-module>
}}
What do you think?
jt
> Support ivy.xml parent mechanism
> --------------------------------
>
> Key: IVY-742
> URL: https://issues.apache.org/jira/browse/IVY-742
> Project: Ivy
> Issue Type: New Feature
> Components: Core
> Environment: Any
> Reporter: Neil Lott
> Attachments: extendsIvyFile-ivy-r709181.patch
>
>
> Here's the email that details this feature:
> On Thu, Feb 21, 2008 at 11:22 PM, Neil Lott <[email protected]>
> wrote:
> Let's say I have multiple modules each with their own ivy.xml
> <ivy-module version="2.0">
> <info organisation="${organization.name}" module="$
> {interface.jar.prefix}"/>
> <configurations>
> <conf name="interface" description="dependencies for
> interface"/>
> <include file="path/to/included-configurations.xml"/>
> </configurations>
> <publications>
> <artifact name="${interface.jar.prefix}" type="jar"
> conf="interface" ext="jar"/>
> </publications>
> <dependencies>
> <dependency org="twc" name="mas-core" rev="${mas.version}"
> conf="interface->server"/>
> </dependencies>
> </ivy-module>
> and I want them all to share an inherited configuration found in a
> file: included-configurations.xml
> <configuration>
> <conf name="test"/>
> </configuration>
> <dependencies>
> <dependency name="testng" rev="5.7" conf="test"/>
> </dependencies>
> so in the inherited configurations file I'd also like to include a
> dependency that goes along with that configuration.
> Is something like this possible?
> No, this is not possible in Ivy, but you can use text or xml processing
> tools to recompose your Ivy file before asking Ivy to resolve the
> dependencies of your module.
> Alternatively, since what you ask is close to maven 2 parent mechanism, I
> think it could be a nice addition to Ivy feature set. So feel free to open
> an issue, and even provide a patch :-)
> Xavier
> Thanks,
> Neil
> --
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.