You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Patrick Aikens <pa...@gmail.com> on 2008/08/25 19:26:18 UTC

IvyDE and properties in ivy.xml files

I've asked this before and received no answers, so I want to try one more time
before giving in to maintaining a patch on top of ivy or ivyde...

We use ant properties in our ivy.xml files to point to an external file that
defines the configurations used in our modules and specify versions of
dependencies.  IvyDE doesn't know how to deal with these properties - is there
any way to make this work in Eclipse, or would we have to make IvyDE or ivy
itself evaluate the properties in Eclipse?  I can't imagine that we're the only
ones using properties for dependency versions since it wouldn't be trivial to
make sure that all ivy.xml files across a large set of projects keep the version
of, say, log4j they use in sync.




Re: IvyDE and properties in ivy.xml files

Posted by Xavier Hanin <xa...@gmail.com>.
On Tue, Aug 26, 2008 at 2:48 PM, Jing Xue <ji...@digizenstudio.com> wrote:

> On Tue, Aug 26, 2008 at 09:32:50AM +0200, Xavier Hanin wrote:
> > On Mon, Aug 25, 2008 at 9:50 PM, Patrick Aikens <pa...@gmail.com>
> wrote:
> >
> > > I'm not sure I understand the workaround you're talking about... what
> > > do you mean by "settings specific to IvyDE which merely include your
> > > usual settings + load the properties file in which you define your
> > > versions" - what settings would that be?
> >
> >
> > Something like:
> > ---8<---
> > <ivysettings>
> >   <properties file="/path/to/properties.to.load.properties" />
> >   <include file="/path/to/ivysettings-used-from-ant.xml"/>
> > </ivysettings>
> > ---8<---
>
> We have been having a similar problem but more complex in that some of
> the properties are determined at runtime in ant before ivy is invoked.
>
> So my personal wish list for IvyDE has it that we can somehow configure
> IvyDE to execute an ant "hook" target, which would allow basically the
> context to be set up the same as if it's a command line build.

Indeed, it can make sense for some  use cases. I suggest you file a JIRA.

Xavier


>
> Cheers.
> --
> Jing
>
> > If you find this useful, feel free to document it in Ivy wiki!
> >
> > Xavier
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: IvyDE and properties in ivy.xml files

Posted by Jing Xue <ji...@digizenstudio.com>.
On Tue, Aug 26, 2008 at 09:32:50AM +0200, Xavier Hanin wrote:
> On Mon, Aug 25, 2008 at 9:50 PM, Patrick Aikens <pa...@gmail.com> wrote:
> 
> > I'm not sure I understand the workaround you're talking about... what
> > do you mean by "settings specific to IvyDE which merely include your
> > usual settings + load the properties file in which you define your
> > versions" - what settings would that be?
> 
> 
> Something like:
> ---8<---
> <ivysettings>
>   <properties file="/path/to/properties.to.load.properties" />
>   <include file="/path/to/ivysettings-used-from-ant.xml"/>
> </ivysettings>
> ---8<---

We have been having a similar problem but more complex in that some of
the properties are determined at runtime in ant before ivy is invoked.

So my personal wish list for IvyDE has it that we can somehow configure
IvyDE to execute an ant "hook" target, which would allow basically the
context to be set up the same as if it's a command line build.

Cheers.
-- 
Jing

> If you find this useful, feel free to document it in Ivy wiki!
> 
> Xavier

Re: IvyDE and properties in ivy.xml files

Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Aug 25, 2008 at 9:50 PM, Patrick Aikens <pa...@gmail.com> wrote:

> I'm not sure I understand the workaround you're talking about... what
> do you mean by "settings specific to IvyDE which merely include your
> usual settings + load the properties file in which you define your
> versions" - what settings would that be?


Something like:
---8<---
<ivysettings>
  <properties file="/path/to/properties.to.load.properties" />
  <include file="/path/to/ivysettings-used-from-ant.xml"/>
</ivysettings>
---8<---

If you find this useful, feel free to document it in Ivy wiki!

Xavier

>
>
>
> On Mon, Aug 25, 2008 at 2:28 PM, Xavier Hanin <xa...@gmail.com>
> wrote:
> > On Mon, Aug 25, 2008 at 7:26 PM, Patrick Aikens <pa...@gmail.com>
> wrote:
> >
> >> I've asked this before and received no answers, so I want to try one
> more
> >> time
> >> before giving in to maintaining a patch on top of ivy or ivyde...
> >>
> >> We use ant properties in our ivy.xml files to point to an external file
> >> that
> >> defines the configurations used in our modules and specify versions of
> >> dependencies.  IvyDE doesn't know how to deal with these properties - is
> >> there
> >> any way to make this work in Eclipse, or would we have to make IvyDE or
> ivy
> >> itself evaluate the properties in Eclipse?  I can't imagine that we're
> the
> >> only
> >> ones using properties for dependency versions since it wouldn't be
> trivial
> >> to
> >> make sure that all ivy.xml files across a large set of projects keep the
> >> version
> >> of, say, log4j they use in sync.
> >
> > The workaround is to use settings specific to IvyDE which merely include
> > your usual settings + load the properties file in which you define your
> > versions. But I think there's an open issue in IvyDE JIRA asking to
> support
> > properties loading in IvyDE directly to avoid this 'trick', feel free to
> > submit a patch.
> >
> > Xavier
> >
> >
> >
> > --
> > Xavier Hanin - Independent Java Consultant
> > http://xhab.blogspot.com/
> > http://ant.apache.org/ivy/
> > http://www.xoocode.org/
> >
>
>
>
> --
> SELECT * FROM users WHERE clue > 0
>



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: IvyDE and properties in ivy.xml files

Posted by Patrick Aikens <pa...@gmail.com>.
I'm not sure I understand the workaround you're talking about... what
do you mean by "settings specific to IvyDE which merely include your
usual settings + load the properties file in which you define your
versions" - what settings would that be?


On Mon, Aug 25, 2008 at 2:28 PM, Xavier Hanin <xa...@gmail.com> wrote:
> On Mon, Aug 25, 2008 at 7:26 PM, Patrick Aikens <pa...@gmail.com> wrote:
>
>> I've asked this before and received no answers, so I want to try one more
>> time
>> before giving in to maintaining a patch on top of ivy or ivyde...
>>
>> We use ant properties in our ivy.xml files to point to an external file
>> that
>> defines the configurations used in our modules and specify versions of
>> dependencies.  IvyDE doesn't know how to deal with these properties - is
>> there
>> any way to make this work in Eclipse, or would we have to make IvyDE or ivy
>> itself evaluate the properties in Eclipse?  I can't imagine that we're the
>> only
>> ones using properties for dependency versions since it wouldn't be trivial
>> to
>> make sure that all ivy.xml files across a large set of projects keep the
>> version
>> of, say, log4j they use in sync.
>
> The workaround is to use settings specific to IvyDE which merely include
> your usual settings + load the properties file in which you define your
> versions. But I think there's an open issue in IvyDE JIRA asking to support
> properties loading in IvyDE directly to avoid this 'trick', feel free to
> submit a patch.
>
> Xavier
>
>
>
> --
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/
>



-- 
SELECT * FROM users WHERE clue > 0

Re: IvyDE and properties in ivy.xml files

Posted by Xavier Hanin <xa...@gmail.com>.
On Mon, Aug 25, 2008 at 7:26 PM, Patrick Aikens <pa...@gmail.com> wrote:

> I've asked this before and received no answers, so I want to try one more
> time
> before giving in to maintaining a patch on top of ivy or ivyde...
>
> We use ant properties in our ivy.xml files to point to an external file
> that
> defines the configurations used in our modules and specify versions of
> dependencies.  IvyDE doesn't know how to deal with these properties - is
> there
> any way to make this work in Eclipse, or would we have to make IvyDE or ivy
> itself evaluate the properties in Eclipse?  I can't imagine that we're the
> only
> ones using properties for dependency versions since it wouldn't be trivial
> to
> make sure that all ivy.xml files across a large set of projects keep the
> version
> of, say, log4j they use in sync.

The workaround is to use settings specific to IvyDE which merely include
your usual settings + load the properties file in which you define your
versions. But I think there's an open issue in IvyDE JIRA asking to support
properties loading in IvyDE directly to avoid this 'trick', feel free to
submit a patch.

Xavier



-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/