Good idea using properties, I might try that out.
My main motivation for eliminating the duplication is that we have hundreds
of modules that I am convincing teams to convert to Ivy. If I can move all
the imperative logic to a common core of Ant imports, then all we need in
each project is the ivy.xml and maybe a tiny build.xml stub. Works with Ant,
and works with IvyDE and IntelliJ. A very easy sell if I can pull it off :)
I think I will try my hands at an Ivy plugin to add an extended info task.
Mitch Gitman wrote:
>
> Carl, interesting use case. I can't think of any existing Ivy task that
> accomplishes what you're looking for.
>
> And I can't say I'd be motivated myself to go to the lengths you're going
> to
> to avoid redundancy. However, I can attest that I have run into trouble
> where I've changed the name of an artifact I'm publishing but I forgot to
> change the name in the ivy.xml. Then I'd be poring over an error message
> like:
> impossible to publish artifacts for [module]: java.io.IOException: missing
> artifact [artifact]
>
> This problem is strictly a matter of keeping track of the same name in two
> places. And the straightforward solution is to use a ${} Ant property
> placeholder for the artifact name in the ivy.xml--since property
> substitutions are allowed in source (unpublished) ivy.xml files.
>
> On Tue, Feb 9, 2010 at 7:54 PM, Carl Quinn <[email protected]> wrote:
>
>>
>> Yes, I've had that part all figured out for awhile. I can build and
>> publish
>> all my simple projects now.
>>
>> What I would like to do next is to remove all knowledge of specific
>> artifacts from my Ant files, and derive the artifact build actions from
>> the
>> metadata already available in the ivy.xml file. (I don't like redundancy)
>>
>> So, I would like to have something like Ivy:info that also gave me the
>> artifact declarations from my module's ivy file, including extra
>> attributes
>> if possible. All of that this is well before publish. I could then know
>> what
>> to build and put into the dist dir and then invoke publish on all of
>> that.
>>
>> Ideas? Or should I write a new Ivy Ant task?
>>
>>
>>
>
>
--
View this message in context:
http://old.nabble.com/Getting-a-module%27s-artifacts-for-build-tp27525526p27526318.html
Sent from the ivy-user mailing list archive at Nabble.com.