1
votes

i am used to maven builds and typicaly define library versions in the parent pom files (or in a company parent pom) dependencyManagement section. So updating minor versions is just a edit and deploy of one file.

Now i have to deal with ant/ivy and manage multiple projects with numerous modules that should in general share the same library/dependency versions, but need be able to override them if needed.

I read about the extends mechanism (as mentioned here) in ivy but that adds all the dependencies to the childs and not only it s version.

Using open revision definitions doesn't help me either cause i need to maintain different branches of all projects that must not update beyond specific versions.

I hope some of you experienced ivy users can tell me if ivy is able to do this or how you manage this task.

1
Another ivy feature are dynamic revisions. Not supported in Maven to my knowledge. See: ant.apache.org/ivy/history/latest-milestone/ivyfile/…Mark O'Connor
@MarkO'Connor i found this question a bit later and already liked it above, but the mentioned extends feature does not allow to inherit dependency versions but only the full dependency, as it is added to the "child" ivy.xml, wich is not what i want. This is the same as if i define a parent dependency in maven and not a dependencyManagement.dag
@MarkO'Connor the dynamic revisions won't help me because i have to maintain at least 3 branches of every project that use different dependency versions. The latest aproach is only working for the trunk. This is what i meant with "open revision definitions".dag
I'm not a fan of parent child relationships in Maven so the "extends" feature in ivy is something I'd be equally suspicious of. My suggestion is to go with properties defined in the ivysettings file.Mark O'Connor

1 Answers

-1
votes

Like mentioned in the linked answer from @MarkO'Connor it seems that properties are the way to go.

Here is a related Question/Answer (again from @MarkO'Connor) on how to handle those Properties

https://stackoverflow.com/a/3079655/1756183

So i will distribute a common version.properties file together with the already common ivysettings.xml to all Projects. This way the default ref will be filled with the version property placeholder and can be overriden with a specific version if needed.

It's not as charming as the dependencyManagement from maven (where i just can omit the version) but i don't see other solutions, do you?