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 sujeewanie weerakoon <su...@yahoo.com> on 2007/06/20 14:11:43 UTC

can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?


 I have a modular build structure based on Ant. each
 module having a separate build script. I want to
 have
 the ivy realted files also module wise.
 With ivy 1.0 this was possible. But when i upgraded
 to
 ivy 1.4 only the first configuration file seems to
 be
 reffered by all the modules.
Inorder to publish I say
<ivy:publish
artifactspattern="${dist.dir}\[artifact].[ext]"
    	    resolver="chain-resolver"
    	    pubrevision="${revision}" 
    	    status="release"
    	 />

 The [artifact] gets evaluated to module name as
defined in the first loaded ivy.xml

Is there a way to call ivy:configure multiple times
 with different configuration files?
 
 
  

____________________________________________________________________________________
> 8:00? 8:25? 8:40? Find a flick in no time 
> with the Yahoo! Search movie showtime shortcut.
> http://tools.search.yahoo.com/shortcuts/#news
> 



 
____________________________________________________________________________________
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Jeffrey Blattman <je...@gmail.com>.
thanks gilles, let me know if i should submit an issue ... and i'd be 
happy to test out a fix if you need. let me know.

Gilles Scokart wrote:
> In both case, it looks like the tasks that don't have a settingsRef
> use the first settings defined instead of the one with the
> "ivy.instance" id.
>
> I will have a look.
>
> Thanks,
>
> Gilles
>
> 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
>> gilles,
>>
>> i found that if i explicitly call out "ivy.instance" in the id= attr for
>> the step 2 ivy:settings task, i do see:
>>
>> resolve:
>> [ivy:resolve] :: loading settings :: file =
>> /home/jtb/src/portal/trunk/portal/buildutil/ivysettings.xml
>>
>> which the correct one resolve file, which i did not before ... but then
>> subsequently, i see this:
>>
>> [ivy:resolve] :: problems summary ::
>> [ivy:resolve] :::: ERRORS
>> [ivy:resolve]   unknown resolver portal-maven2
>>
>> portal-maven2 is a resolver defined in the step 1 ivysettings.xml file.
>>
>> the build fails (expectedly in this case) but i still see that weird
>> error message. and obviously, i didn't expect to have to call out a
>> non-default ID ...
>>
>> ?
>>
>> Jeffrey Blattman wrote:
>> > sorry gilles, i was looking at the configure task, which i now see is
>> > deprecated.
>> >
>> > 1. however, i am not getting the results i'm looking for ... what i
>> > want is this ... one module that has settings that define several
>> > external resolvers ... which "installs" them and builds local repo.
>> >
>> > 2. all other modules that use a different settings, that are define
>> > only a single resolver, that points to the locally built repo in 
>> step 1.
>> >
>> > in step 1 i do ...
>> >
>> >        <ivy:settings id="dependencies" file="[the many resolvers
>> > settings file]"/>
>> > then many
>> >
>> >        <ivy:install  .... settingsRef="dependencies" />
>> >
>> > that works fine ... but then in step 2 i do ...
>> >
>> >        <ivy:settings file="[one resolve file]"/>
>> >
>> > which uses the default id i assume. then
>> >
>> >       <ivy:retrieve/>
>> >
>> > the retrieve still finds the many resolves defined under the
>> > non-default it "dependencies".
>> >
>> > what am i missing?
>> > thanks.                     Gilles Scokart wrote:
>> >> I settings doc [1], you have the id field.
>> >> In all other tasks you have the settingsRef field.  Look for example
>> >> at [2], the field is described.
>> >>
>> >> It seems that I have a first feedback : the doc should be more
>> >> clear.  But how?
>> >>
>> >> [1] http://incubator.apache.org/ivy/doc/use/settings.html
>> >> [2] http://incubator.apache.org/ivy/doc/use/resolve.html
>> >>
>> >> Gilles
>> >>
>> >> 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
>> >>> sorry gilles, can you point me to the pages that explain the 
>> feature? i
>> >>> looked under ivy:settings and :configure  where i expected and 
>> didn't
>> >>> see anything about resolveId there.
>> >>>
>> >>> Gilles Scokart wrote:
>> >>> > It seems that the doc is already published on the website.  But 
>> the
>> >>> > code is only in the trunk in subversion.
>> >>> >
>> >>> > What you have to do is to declare your different settings a ant
>> >>> > datatype, then you can fill the settingsRef attribute of every ivy
>> >>> > task.
>> >>> >
>> >>> > Note that the ivy task will take by default the settings with 
>> the id
>> >>> > 'ivy.instance'.  So if you don't want to put a settingRef in 
>> all your
>> >>> > ivy task, you can set this id for the settings that ivy should 
>> use by
>> >>> > default.
>> >>> >
>> >>> > Please let me know if it works like you expect, if it is easy 
>> to use
>> >>> > or if there are are any problems.  I would be pleased to receive a
>> >>> > feedback on this new feature.
>> >>> >
>> >>> > Gilles
>> >>> >
>> >>> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
>> >>> >> hi gilles,
>> >>> >>
>> >>> >> is there documentation on how to use this feature? examples?
>> >>> >>
>> >>> >> thanks.
>> >>> >>
>> >>> >> Gilles Scokart wrote:
>> >>> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use 
>> multiple
>> >>> >> > configuration (named settings in 2.0). See [1].  To test it
>> >>> now, you
>> >>> >> > will have to make your own build of ivy (which is not very
>> >>> difficult).
>> >>> >> >
>> >>> >> > [1] https://issues.apache.org/jira/browse/IVY-366
>> >>> >> >
>> >>> >> >
>> >>> >> > Gilles
>> >>> >> >
>> >>> >> >
>> >>> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
>> >>> >> >>
>> >>> >> >>
>> >>> >> >>  I have a modular build structure based on Ant. each
>> >>> >> >>  module having a separate build script. I want to
>> >>> >> >>  have
>> >>> >> >>  the ivy realted files also module wise.
>> >>> >> >>  With ivy 1.0 this was possible. But when i upgraded
>> >>> >> >>  to
>> >>> >> >>  ivy 1.4 only the first configuration file seems to
>> >>> >> >>  be
>> >>> >> >>  reffered by all the modules.
>> >>> >> >> Inorder to publish I say
>> >>> >> >> <ivy:publish
>> >>> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
>> >>> >> >>             resolver="chain-resolver"
>> >>> >> >>             pubrevision="${revision}"
>> >>> >> >>             status="release"
>> >>> >> >>          />
>> >>> >> >>
>> >>> >> >>  The [artifact] gets evaluated to module name as
>> >>> >> >> defined in the first loaded ivy.xml
>> >>> >> >>
>> >>> >> >> Is there a way to call ivy:configure multiple times
>> >>> >> >>  with different configuration files?
>> >>> >> >
>> >>> >>
>> >>> >
>> >>>
>> >>
>> >>
>> >
>>
>
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Gilles Scokart <gs...@gmail.com>.
In both case, it looks like the tasks that don't have a settingsRef
use the first settings defined instead of the one with the
"ivy.instance" id.

I will have a look.

Thanks,

Gilles

2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> gilles,
>
> i found that if i explicitly call out "ivy.instance" in the id= attr for
> the step 2 ivy:settings task, i do see:
>
> resolve:
> [ivy:resolve] :: loading settings :: file =
> /home/jtb/src/portal/trunk/portal/buildutil/ivysettings.xml
>
> which the correct one resolve file, which i did not before ... but then
> subsequently, i see this:
>
> [ivy:resolve] :: problems summary ::
> [ivy:resolve] :::: ERRORS
> [ivy:resolve]   unknown resolver portal-maven2
>
> portal-maven2 is a resolver defined in the step 1 ivysettings.xml file.
>
> the build fails (expectedly in this case) but i still see that weird
> error message. and obviously, i didn't expect to have to call out a
> non-default ID ...
>
> ?
>
> Jeffrey Blattman wrote:
> > sorry gilles, i was looking at the configure task, which i now see is
> > deprecated.
> >
> > 1. however, i am not getting the results i'm looking for ... what i
> > want is this ... one module that has settings that define several
> > external resolvers ... which "installs" them and builds local repo.
> >
> > 2. all other modules that use a different settings, that are define
> > only a single resolver, that points to the locally built repo in step 1.
> >
> > in step 1 i do ...
> >
> >        <ivy:settings id="dependencies" file="[the many resolvers
> > settings file]"/>
> > then many
> >
> >        <ivy:install  .... settingsRef="dependencies" />
> >
> > that works fine ... but then in step 2 i do ...
> >
> >        <ivy:settings file="[one resolve file]"/>
> >
> > which uses the default id i assume. then
> >
> >       <ivy:retrieve/>
> >
> > the retrieve still finds the many resolves defined under the
> > non-default it "dependencies".
> >
> > what am i missing?
> > thanks.                     Gilles Scokart wrote:
> >> I settings doc [1], you have the id field.
> >> In all other tasks you have the settingsRef field.  Look for example
> >> at [2], the field is described.
> >>
> >> It seems that I have a first feedback : the doc should be more
> >> clear.  But how?
> >>
> >> [1] http://incubator.apache.org/ivy/doc/use/settings.html
> >> [2] http://incubator.apache.org/ivy/doc/use/resolve.html
> >>
> >> Gilles
> >>
> >> 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> >>> sorry gilles, can you point me to the pages that explain the feature? i
> >>> looked under ivy:settings and :configure  where i expected and didn't
> >>> see anything about resolveId there.
> >>>
> >>> Gilles Scokart wrote:
> >>> > It seems that the doc is already published on the website.  But the
> >>> > code is only in the trunk in subversion.
> >>> >
> >>> > What you have to do is to declare your different settings a ant
> >>> > datatype, then you can fill the settingsRef attribute of every ivy
> >>> > task.
> >>> >
> >>> > Note that the ivy task will take by default the settings with the id
> >>> > 'ivy.instance'.  So if you don't want to put a settingRef in all your
> >>> > ivy task, you can set this id for the settings that ivy should use by
> >>> > default.
> >>> >
> >>> > Please let me know if it works like you expect, if it is easy to use
> >>> > or if there are are any problems.  I would be pleased to receive a
> >>> > feedback on this new feature.
> >>> >
> >>> > Gilles
> >>> >
> >>> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
> >>> >> hi gilles,
> >>> >>
> >>> >> is there documentation on how to use this feature? examples?
> >>> >>
> >>> >> thanks.
> >>> >>
> >>> >> Gilles Scokart wrote:
> >>> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
> >>> >> > configuration (named settings in 2.0). See [1].  To test it
> >>> now, you
> >>> >> > will have to make your own build of ivy (which is not very
> >>> difficult).
> >>> >> >
> >>> >> > [1] https://issues.apache.org/jira/browse/IVY-366
> >>> >> >
> >>> >> >
> >>> >> > Gilles
> >>> >> >
> >>> >> >
> >>> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
> >>> >> >>
> >>> >> >>
> >>> >> >>  I have a modular build structure based on Ant. each
> >>> >> >>  module having a separate build script. I want to
> >>> >> >>  have
> >>> >> >>  the ivy realted files also module wise.
> >>> >> >>  With ivy 1.0 this was possible. But when i upgraded
> >>> >> >>  to
> >>> >> >>  ivy 1.4 only the first configuration file seems to
> >>> >> >>  be
> >>> >> >>  reffered by all the modules.
> >>> >> >> Inorder to publish I say
> >>> >> >> <ivy:publish
> >>> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
> >>> >> >>             resolver="chain-resolver"
> >>> >> >>             pubrevision="${revision}"
> >>> >> >>             status="release"
> >>> >> >>          />
> >>> >> >>
> >>> >> >>  The [artifact] gets evaluated to module name as
> >>> >> >> defined in the first loaded ivy.xml
> >>> >> >>
> >>> >> >> Is there a way to call ivy:configure multiple times
> >>> >> >>  with different configuration files?
> >>> >> >
> >>> >>
> >>> >
> >>>
> >>
> >>
> >
>


-- 
Gilles SCOKART

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Gilles Scokart <gs...@gmail.com>.
I think that it might also be a caching issue here.


2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> gilles,
>
> i found that if i explicitly call out "ivy.instance" in the id= attr for
> the step 2 ivy:settings task, i do see:
>
> resolve:
> [ivy:resolve] :: loading settings :: file =
> /home/jtb/src/portal/trunk/portal/buildutil/ivysettings.xml
>
> which the correct one resolve file, which i did not before ... but then
> subsequently, i see this:
>
> [ivy:resolve] :: problems summary ::
> [ivy:resolve] :::: ERRORS
> [ivy:resolve]   unknown resolver portal-maven2
>
> portal-maven2 is a resolver defined in the step 1 ivysettings.xml file.
>
> the build fails (expectedly in this case) but i still see that weird
> error message. and obviously, i didn't expect to have to call out a
> non-default ID ...
>
> ?
>
> Jeffrey Blattman wrote:
> > sorry gilles, i was looking at the configure task, which i now see is
> > deprecated.
> >
> > 1. however, i am not getting the results i'm looking for ... what i
> > want is this ... one module that has settings that define several
> > external resolvers ... which "installs" them and builds local repo.
> >
> > 2. all other modules that use a different settings, that are define
> > only a single resolver, that points to the locally built repo in step 1.
> >
> > in step 1 i do ...
> >
> >        <ivy:settings id="dependencies" file="[the many resolvers
> > settings file]"/>
> > then many
> >
> >        <ivy:install  .... settingsRef="dependencies" />
> >
> > that works fine ... but then in step 2 i do ...
> >
> >        <ivy:settings file="[one resolve file]"/>
> >
> > which uses the default id i assume. then
> >
> >       <ivy:retrieve/>
> >
> > the retrieve still finds the many resolves defined under the
> > non-default it "dependencies".
> >
> > what am i missing?
> > thanks.                     Gilles Scokart wrote:
> >> I settings doc [1], you have the id field.
> >> In all other tasks you have the settingsRef field.  Look for example
> >> at [2], the field is described.
> >>
> >> It seems that I have a first feedback : the doc should be more
> >> clear.  But how?
> >>
> >> [1] http://incubator.apache.org/ivy/doc/use/settings.html
> >> [2] http://incubator.apache.org/ivy/doc/use/resolve.html
> >>
> >> Gilles
> >>
> >> 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> >>> sorry gilles, can you point me to the pages that explain the feature? i
> >>> looked under ivy:settings and :configure  where i expected and didn't
> >>> see anything about resolveId there.
> >>>
> >>> Gilles Scokart wrote:
> >>> > It seems that the doc is already published on the website.  But the
> >>> > code is only in the trunk in subversion.
> >>> >
> >>> > What you have to do is to declare your different settings a ant
> >>> > datatype, then you can fill the settingsRef attribute of every ivy
> >>> > task.
> >>> >
> >>> > Note that the ivy task will take by default the settings with the id
> >>> > 'ivy.instance'.  So if you don't want to put a settingRef in all your
> >>> > ivy task, you can set this id for the settings that ivy should use by
> >>> > default.
> >>> >
> >>> > Please let me know if it works like you expect, if it is easy to use
> >>> > or if there are are any problems.  I would be pleased to receive a
> >>> > feedback on this new feature.
> >>> >
> >>> > Gilles
> >>> >
> >>> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
> >>> >> hi gilles,
> >>> >>
> >>> >> is there documentation on how to use this feature? examples?
> >>> >>
> >>> >> thanks.
> >>> >>
> >>> >> Gilles Scokart wrote:
> >>> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
> >>> >> > configuration (named settings in 2.0). See [1].  To test it
> >>> now, you
> >>> >> > will have to make your own build of ivy (which is not very
> >>> difficult).
> >>> >> >
> >>> >> > [1] https://issues.apache.org/jira/browse/IVY-366
> >>> >> >
> >>> >> >
> >>> >> > Gilles
> >>> >> >
> >>> >> >
> >>> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
> >>> >> >>
> >>> >> >>
> >>> >> >>  I have a modular build structure based on Ant. each
> >>> >> >>  module having a separate build script. I want to
> >>> >> >>  have
> >>> >> >>  the ivy realted files also module wise.
> >>> >> >>  With ivy 1.0 this was possible. But when i upgraded
> >>> >> >>  to
> >>> >> >>  ivy 1.4 only the first configuration file seems to
> >>> >> >>  be
> >>> >> >>  reffered by all the modules.
> >>> >> >> Inorder to publish I say
> >>> >> >> <ivy:publish
> >>> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
> >>> >> >>             resolver="chain-resolver"
> >>> >> >>             pubrevision="${revision}"
> >>> >> >>             status="release"
> >>> >> >>          />
> >>> >> >>
> >>> >> >>  The [artifact] gets evaluated to module name as
> >>> >> >> defined in the first loaded ivy.xml
> >>> >> >>
> >>> >> >> Is there a way to call ivy:configure multiple times
> >>> >> >>  with different configuration files?
> >>> >> >
> >>> >>
> >>> >
> >>>
> >>
> >>
> >
>


-- 
Gilles SCOKART

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Jeffrey Blattman <je...@gmail.com>.
gilles,

i found that if i explicitly call out "ivy.instance" in the id= attr for 
the step 2 ivy:settings task, i do see:

resolve:
[ivy:resolve] :: loading settings :: file = 
/home/jtb/src/portal/trunk/portal/buildutil/ivysettings.xml

which the correct one resolve file, which i did not before ... but then 
subsequently, i see this:

[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: ERRORS
[ivy:resolve]   unknown resolver portal-maven2

portal-maven2 is a resolver defined in the step 1 ivysettings.xml file.

the build fails (expectedly in this case) but i still see that weird 
error message. and obviously, i didn't expect to have to call out a 
non-default ID ...

?

Jeffrey Blattman wrote:
> sorry gilles, i was looking at the configure task, which i now see is 
> deprecated.
>
> 1. however, i am not getting the results i'm looking for ... what i 
> want is this ... one module that has settings that define several 
> external resolvers ... which "installs" them and builds local repo.
>
> 2. all other modules that use a different settings, that are define 
> only a single resolver, that points to the locally built repo in step 1.
>
> in step 1 i do ...
>
>        <ivy:settings id="dependencies" file="[the many resolvers 
> settings file]"/>              
> then many
>
>        <ivy:install  .... settingsRef="dependencies" />
>
> that works fine ... but then in step 2 i do ...
>
>        <ivy:settings file="[one resolve file]"/>
>
> which uses the default id i assume. then
>
>       <ivy:retrieve/>
>
> the retrieve still finds the many resolves defined under the 
> non-default it "dependencies".
>
> what am i missing?
> thanks.                     Gilles Scokart wrote:
>> I settings doc [1], you have the id field.
>> In all other tasks you have the settingsRef field.  Look for example
>> at [2], the field is described.
>>
>> It seems that I have a first feedback : the doc should be more 
>> clear.  But how?
>>
>> [1] http://incubator.apache.org/ivy/doc/use/settings.html
>> [2] http://incubator.apache.org/ivy/doc/use/resolve.html
>>
>> Gilles
>>
>> 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
>>> sorry gilles, can you point me to the pages that explain the feature? i
>>> looked under ivy:settings and :configure  where i expected and didn't
>>> see anything about resolveId there.
>>>
>>> Gilles Scokart wrote:
>>> > It seems that the doc is already published on the website.  But the
>>> > code is only in the trunk in subversion.
>>> >
>>> > What you have to do is to declare your different settings a ant
>>> > datatype, then you can fill the settingsRef attribute of every ivy
>>> > task.
>>> >
>>> > Note that the ivy task will take by default the settings with the id
>>> > 'ivy.instance'.  So if you don't want to put a settingRef in all your
>>> > ivy task, you can set this id for the settings that ivy should use by
>>> > default.
>>> >
>>> > Please let me know if it works like you expect, if it is easy to use
>>> > or if there are are any problems.  I would be pleased to receive a
>>> > feedback on this new feature.
>>> >
>>> > Gilles
>>> >
>>> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
>>> >> hi gilles,
>>> >>
>>> >> is there documentation on how to use this feature? examples?
>>> >>
>>> >> thanks.
>>> >>
>>> >> Gilles Scokart wrote:
>>> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
>>> >> > configuration (named settings in 2.0). See [1].  To test it 
>>> now, you
>>> >> > will have to make your own build of ivy (which is not very 
>>> difficult).
>>> >> >
>>> >> > [1] https://issues.apache.org/jira/browse/IVY-366
>>> >> >
>>> >> >
>>> >> > Gilles
>>> >> >
>>> >> >
>>> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
>>> >> >>
>>> >> >>
>>> >> >>  I have a modular build structure based on Ant. each
>>> >> >>  module having a separate build script. I want to
>>> >> >>  have
>>> >> >>  the ivy realted files also module wise.
>>> >> >>  With ivy 1.0 this was possible. But when i upgraded
>>> >> >>  to
>>> >> >>  ivy 1.4 only the first configuration file seems to
>>> >> >>  be
>>> >> >>  reffered by all the modules.
>>> >> >> Inorder to publish I say
>>> >> >> <ivy:publish
>>> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
>>> >> >>             resolver="chain-resolver"
>>> >> >>             pubrevision="${revision}"
>>> >> >>             status="release"
>>> >> >>          />
>>> >> >>
>>> >> >>  The [artifact] gets evaluated to module name as
>>> >> >> defined in the first loaded ivy.xml
>>> >> >>
>>> >> >> Is there a way to call ivy:configure multiple times
>>> >> >>  with different configuration files?
>>> >> >
>>> >>
>>> >
>>>
>>
>>
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Gilles Scokart <gs...@gmail.com>.
2007/6/25, Xavier Hanin <xa...@gmail.com>:
>
> By the way, note that writting <ivy:settings/> actually doesn't do
> > anything.  Your resolve will indeed use the default settings, but not
> > because of your declaration of <ivy:settings/>.  What will happen in
> > the resolve is that the task will search for the default id
> > "ivy.instance", and will not found anything.  In that case, it creates
> > this default settings and will use it.
>
>
> I think this is counter intuitive. Why the <ivy:settings /> doesn't use the
> default id used by the resolve? Or maybe I'm missing something?
>
> Xavier
>

It is counter intuitive for people migrating from 1.4, I agree.

It's because ivy:settings is a ant datatype, and there is no way to
way to hook the code that register himself with a default id.

A work around might be to make it a Task instead of a dataype.  That
would allow to implement what you describe.

-- 
Gilles SCOKART

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Xavier Hanin <xa...@gmail.com>.
On 6/23/07, Gilles Scokart <gs...@gmail.com> wrote:
>
> The name of the resolver used to download an artefact is kept in the
> cache, yes.  But it's only its name.  The resolver itself is not
> known.
>
> When you make your resolve, Ivy will first look in the cache.  If you
> are asking for a a fixed version and that version is in the cache,
> it's that version that will be used.  In that case, Ivy will even tell
> you in the console that this dependency has been found using the non
> standard resolver because its name was kept in the cache.
>
> I really think that we should review that, because it is not very
> intuitive.  I agree.


I agree too, this makes the cache less reusable and is not intuitive at all.


By the way, note that writting <ivy:settings/> actually doesn't do
> anything.  Your resolve will indeed use the default settings, but not
> because of your declaration of <ivy:settings/>.  What will happen in
> the resolve is that the task will search for the default id
> "ivy.instance", and will not found anything.  In that case, it creates
> this default settings and will use it.


I think this is counter intuitive. Why the <ivy:settings /> doesn't use the
default id used by the resolve? Or maybe I'm missing something?

Xavier

That also means that if your use <ivy:settings file
> 'otherSettings.xml"/>, this "otherSettings will never be used.  To be
> used by default, you have to write <ivy:settings id="ivy.instance"
> file 'otherSettings.xml"/>.
>
> Gilles
>
> 2007/6/23, Jeffrey Blattman <je...@gmail.com>:
> > i don't think this has anything to do w/ the cache. the problem is that
> > when i do:
> >
> > a) <ivy:settings id="..." file="..."/>
> >
> > then:
> >
> > b) <ivy:settings/>
> >
> > then i do:
> >
> > <ivy:resolve/>
> >
> > it uses the non-default settings loaded in step a). this is not what i
> > expect, i expect it to use the default settings loaded in step b).
> >
> > does that make sense? or am i misunderstanding how the settings id
> works?
> >
> > are you saying that the artifacts in the cache resolved w/ the
> > non-default settings between steps a) and b) somehow remember where they
> > came from? the resolvers are encoded into the cache?
> >
> > Gilles Scokart wrote:
> > > Isn't it related to the cache?  If some dependencies (coming from the
> > > "many resolvers used in step 1") are already in the cache, your
> > > retrieve of step 2 will found it there.  Ivy wil even say that it
> > > comes from those repositories.
> > >
> > > Is it what you have?
> > >
> > > In 2.1 (or 2.0) we will review our cache.  As a workaround, you could
> > > specify a different cache location in your 2 settings.
> > >
> > > Please, tell us if that solve your problem or if there is still an
> > > error with the scoping of the settings.  And if you want, add a
> > > comment to [1].
> > >
> > > [1] https://issues.apache.org/jira/browse/IVY-399
> > >
> > >
> > > Gilles
> > >
> > >
> > >
> > > 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> > >> sorry gilles, i was looking at the configure task, which i now see is
> > >> deprecated.
> > >>
> > >> 1. however, i am not getting the results i'm looking for ... what i
> want
> > >> is this ... one module that has settings that define several external
> > >> resolvers ... which "installs" them and builds local repo.
> > >>
> > >> 2. all other modules that use a different settings, that are define
> only
> > >> a single resolver, that points to the locally built repo in step 1.
> > >>
> > >> in step 1 i do ...
> > >>
> > >>         <ivy:settings id="dependencies" file="[the many resolvers
> > >> settings file]"/>
> > >>
> > >> then many
> > >>
> > >>         <ivy:install  .... settingsRef="dependencies" />
> > >>
> > >> that works fine ... but then in step 2 i do ...
> > >>
> > >>         <ivy:settings file="[one resolve file]"/>
> > >>
> > >> which uses the default id i assume. then
> > >>
> > >>        <ivy:retrieve/>
> > >>
> > >> the retrieve still finds the many resolves defined under the
> non-default
> > >> it "dependencies".
> > >>
> > >> what am i missing?
> > >> thanks.
> > >> Gilles Scokart wrote:
> > >> > I settings doc [1], you have the id field.
> > >> > In all other tasks you have the settingsRef field.  Look for
> example
> > >> > at [2], the field is described.
> > >> >
> > >> > It seems that I have a first feedback : the doc should be more
> clear.
> > >> > But how?
> > >> >
> > >> > [1] http://incubator.apache.org/ivy/doc/use/settings.html
> > >> > [2] http://incubator.apache.org/ivy/doc/use/resolve.html
> > >> >
> > >> > Gilles
> > >> >
> > >> > 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> > >> >> sorry gilles, can you point me to the pages that explain the
> > >> feature? i
> > >> >> looked under ivy:settings and :configure  where i expected and
> didn't
> > >> >> see anything about resolveId there.
> > >> >>
> > >> >> Gilles Scokart wrote:
> > >> >> > It seems that the doc is already published on the website.  But
> the
> > >> >> > code is only in the trunk in subversion.
> > >> >> >
> > >> >> > What you have to do is to declare your different settings a ant
> > >> >> > datatype, then you can fill the settingsRef attribute of every
> ivy
> > >> >> > task.
> > >> >> >
> > >> >> > Note that the ivy task will take by default the settings with
> > >> the id
> > >> >> > 'ivy.instance'.  So if you don't want to put a settingRef in all
> > >> your
> > >> >> > ivy task, you can set this id for the settings that ivy should
> > >> use by
> > >> >> > default.
> > >> >> >
> > >> >> > Please let me know if it works like you expect, if it is easy to
> > >> use
> > >> >> > or if there are are any problems.  I would be pleased to receive
> a
> > >> >> > feedback on this new feature.
> > >> >> >
> > >> >> > Gilles
> > >> >> >
> > >> >> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
> > >> >> >> hi gilles,
> > >> >> >>
> > >> >> >> is there documentation on how to use this feature? examples?
> > >> >> >>
> > >> >> >> thanks.
> > >> >> >>
> > >> >> >> Gilles Scokart wrote:
> > >> >> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use
> > >> multiple
> > >> >> >> > configuration (named settings in 2.0). See [1].  To test it
> now,
> > >> >> you
> > >> >> >> > will have to make your own build of ivy (which is not very
> > >> >> difficult).
> > >> >> >> >
> > >> >> >> > [1] https://issues.apache.org/jira/browse/IVY-366
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > Gilles
> > >> >> >> >
> > >> >> >> >
> > >> >> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
> > >> >> >> >>
> > >> >> >> >>
> > >> >> >> >>  I have a modular build structure based on Ant. each
> > >> >> >> >>  module having a separate build script. I want to
> > >> >> >> >>  have
> > >> >> >> >>  the ivy realted files also module wise.
> > >> >> >> >>  With ivy 1.0 this was possible. But when i upgraded
> > >> >> >> >>  to
> > >> >> >> >>  ivy 1.4 only the first configuration file seems to
> > >> >> >> >>  be
> > >> >> >> >>  reffered by all the modules.
> > >> >> >> >> Inorder to publish I say
> > >> >> >> >> <ivy:publish
> > >> >> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
> > >> >> >> >>             resolver="chain-resolver"
> > >> >> >> >>             pubrevision="${revision}"
> > >> >> >> >>             status="release"
> > >> >> >> >>          />
> > >> >> >> >>
> > >> >> >> >>  The [artifact] gets evaluated to module name as
> > >> >> >> >> defined in the first loaded ivy.xml
> > >> >> >> >>
> > >> >> >> >> Is there a way to call ivy:configure multiple times
> > >> >> >> >>  with different configuration files?
> > >> >> >> >
> > >> >> >>
> > >> >> >
> > >> >>
> > >> >
> > >> >
> > >>
> > >
> > >
> >
>



-- 
Xavier Hanin - Independent Java Consultant
Manage your dependencies with Ivy!
http://incubator.apache.org/ivy/

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Jeffrey Blattman <je...@gmail.com>.
gilles,

after updating to the latest trunk, i was able to achieve what i was 
looking for. i still see the misleading errors about unknown resolvers, 
but that's a minor issue.

thanks for looking into this.

Gilles Scokart wrote:
> The name of the resolver used to download an artefact is kept in the
> cache, yes.  But it's only its name.  The resolver itself is not
> known.
>
> When you make your resolve, Ivy will first look in the cache.  If you
> are asking for a a fixed version and that version is in the cache,
> it's that version that will be used.  In that case, Ivy will even tell
> you in the console that this dependency has been found using the non
> standard resolver because its name was kept in the cache.
>
> I really think that we should review that, because it is not very
> intuitive.  I agree.
>
> By the way, note that writting <ivy:settings/> actually doesn't do
> anything.  Your resolve will indeed use the default settings, but not
> because of your declaration of <ivy:settings/>.  What will happen in
> the resolve is that the task will search for the default id
> "ivy.instance", and will not found anything.  In that case, it creates
> this default settings and will use it.
>
> That also means that if your use <ivy:settings file
> 'otherSettings.xml"/>, this "otherSettings will never be used.  To be
> used by default, you have to write <ivy:settings id="ivy.instance"
> file 'otherSettings.xml"/>.
>
> Gilles
>
> 2007/6/23, Jeffrey Blattman <je...@gmail.com>:
>> i don't think this has anything to do w/ the cache. the problem is that
>> when i do:
>>
>> a) <ivy:settings id="..." file="..."/>
>>
>> then:
>>
>> b) <ivy:settings/>
>>
>> then i do:
>>
>> <ivy:resolve/>
>>
>> it uses the non-default settings loaded in step a). this is not what i
>> expect, i expect it to use the default settings loaded in step b).
>>
>> does that make sense? or am i misunderstanding how the settings id 
>> works?
>>
>> are you saying that the artifacts in the cache resolved w/ the
>> non-default settings between steps a) and b) somehow remember where they
>> came from? the resolvers are encoded into the cache?
>>
>> Gilles Scokart wrote:
>> > Isn't it related to the cache?  If some dependencies (coming from the
>> > "many resolvers used in step 1") are already in the cache, your
>> > retrieve of step 2 will found it there.  Ivy wil even say that it
>> > comes from those repositories.
>> >
>> > Is it what you have?
>> >
>> > In 2.1 (or 2.0) we will review our cache.  As a workaround, you could
>> > specify a different cache location in your 2 settings.
>> >
>> > Please, tell us if that solve your problem or if there is still an
>> > error with the scoping of the settings.  And if you want, add a
>> > comment to [1].
>> >
>> > [1] https://issues.apache.org/jira/browse/IVY-399
>> >
>> >
>> > Gilles
>> >
>> >
>> >
>> > 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
>> >> sorry gilles, i was looking at the configure task, which i now see is
>> >> deprecated.
>> >>
>> >> 1. however, i am not getting the results i'm looking for ... what 
>> i want
>> >> is this ... one module that has settings that define several external
>> >> resolvers ... which "installs" them and builds local repo.
>> >>
>> >> 2. all other modules that use a different settings, that are 
>> define only
>> >> a single resolver, that points to the locally built repo in step 1.
>> >>
>> >> in step 1 i do ...
>> >>
>> >>         <ivy:settings id="dependencies" file="[the many resolvers
>> >> settings file]"/>
>> >>
>> >> then many
>> >>
>> >>         <ivy:install  .... settingsRef="dependencies" />
>> >>
>> >> that works fine ... but then in step 2 i do ...
>> >>
>> >>         <ivy:settings file="[one resolve file]"/>
>> >>
>> >> which uses the default id i assume. then
>> >>
>> >>        <ivy:retrieve/>
>> >>
>> >> the retrieve still finds the many resolves defined under the 
>> non-default
>> >> it "dependencies".
>> >>
>> >> what am i missing?
>> >> thanks.
>> >> Gilles Scokart wrote:
>> >> > I settings doc [1], you have the id field.
>> >> > In all other tasks you have the settingsRef field.  Look for 
>> example
>> >> > at [2], the field is described.
>> >> >
>> >> > It seems that I have a first feedback : the doc should be more 
>> clear.
>> >> > But how?
>> >> >
>> >> > [1] http://incubator.apache.org/ivy/doc/use/settings.html
>> >> > [2] http://incubator.apache.org/ivy/doc/use/resolve.html
>> >> >
>> >> > Gilles
>> >> >
>> >> > 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
>> >> >> sorry gilles, can you point me to the pages that explain the
>> >> feature? i
>> >> >> looked under ivy:settings and :configure  where i expected and 
>> didn't
>> >> >> see anything about resolveId there.
>> >> >>
>> >> >> Gilles Scokart wrote:
>> >> >> > It seems that the doc is already published on the website.  
>> But the
>> >> >> > code is only in the trunk in subversion.
>> >> >> >
>> >> >> > What you have to do is to declare your different settings a ant
>> >> >> > datatype, then you can fill the settingsRef attribute of 
>> every ivy
>> >> >> > task.
>> >> >> >
>> >> >> > Note that the ivy task will take by default the settings with
>> >> the id
>> >> >> > 'ivy.instance'.  So if you don't want to put a settingRef in all
>> >> your
>> >> >> > ivy task, you can set this id for the settings that ivy should
>> >> use by
>> >> >> > default.
>> >> >> >
>> >> >> > Please let me know if it works like you expect, if it is easy to
>> >> use
>> >> >> > or if there are are any problems.  I would be pleased to 
>> receive a
>> >> >> > feedback on this new feature.
>> >> >> >
>> >> >> > Gilles
>> >> >> >
>> >> >> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
>> >> >> >> hi gilles,
>> >> >> >>
>> >> >> >> is there documentation on how to use this feature? examples?
>> >> >> >>
>> >> >> >> thanks.
>> >> >> >>
>> >> >> >> Gilles Scokart wrote:
>> >> >> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use
>> >> multiple
>> >> >> >> > configuration (named settings in 2.0). See [1].  To test 
>> it now,
>> >> >> you
>> >> >> >> > will have to make your own build of ivy (which is not very
>> >> >> difficult).
>> >> >> >> >
>> >> >> >> > [1] https://issues.apache.org/jira/browse/IVY-366
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > Gilles
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>  I have a modular build structure based on Ant. each
>> >> >> >> >>  module having a separate build script. I want to
>> >> >> >> >>  have
>> >> >> >> >>  the ivy realted files also module wise.
>> >> >> >> >>  With ivy 1.0 this was possible. But when i upgraded
>> >> >> >> >>  to
>> >> >> >> >>  ivy 1.4 only the first configuration file seems to
>> >> >> >> >>  be
>> >> >> >> >>  reffered by all the modules.
>> >> >> >> >> Inorder to publish I say
>> >> >> >> >> <ivy:publish
>> >> >> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
>> >> >> >> >>             resolver="chain-resolver"
>> >> >> >> >>             pubrevision="${revision}"
>> >> >> >> >>             status="release"
>> >> >> >> >>          />
>> >> >> >> >>
>> >> >> >> >>  The [artifact] gets evaluated to module name as
>> >> >> >> >> defined in the first loaded ivy.xml
>> >> >> >> >>
>> >> >> >> >> Is there a way to call ivy:configure multiple times
>> >> >> >> >>  with different configuration files?
>> >> >> >> >
>> >> >> >>
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >>
>> >
>> >
>>
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Gilles Scokart <gs...@gmail.com>.
The name of the resolver used to download an artefact is kept in the
cache, yes.  But it's only its name.  The resolver itself is not
known.

When you make your resolve, Ivy will first look in the cache.  If you
are asking for a a fixed version and that version is in the cache,
it's that version that will be used.  In that case, Ivy will even tell
you in the console that this dependency has been found using the non
standard resolver because its name was kept in the cache.

I really think that we should review that, because it is not very
intuitive.  I agree.

By the way, note that writting <ivy:settings/> actually doesn't do
anything.  Your resolve will indeed use the default settings, but not
because of your declaration of <ivy:settings/>.  What will happen in
the resolve is that the task will search for the default id
"ivy.instance", and will not found anything.  In that case, it creates
this default settings and will use it.

That also means that if your use <ivy:settings file
'otherSettings.xml"/>, this "otherSettings will never be used.  To be
used by default, you have to write <ivy:settings id="ivy.instance"
file 'otherSettings.xml"/>.

Gilles

2007/6/23, Jeffrey Blattman <je...@gmail.com>:
> i don't think this has anything to do w/ the cache. the problem is that
> when i do:
>
> a) <ivy:settings id="..." file="..."/>
>
> then:
>
> b) <ivy:settings/>
>
> then i do:
>
> <ivy:resolve/>
>
> it uses the non-default settings loaded in step a). this is not what i
> expect, i expect it to use the default settings loaded in step b).
>
> does that make sense? or am i misunderstanding how the settings id works?
>
> are you saying that the artifacts in the cache resolved w/ the
> non-default settings between steps a) and b) somehow remember where they
> came from? the resolvers are encoded into the cache?
>
> Gilles Scokart wrote:
> > Isn't it related to the cache?  If some dependencies (coming from the
> > "many resolvers used in step 1") are already in the cache, your
> > retrieve of step 2 will found it there.  Ivy wil even say that it
> > comes from those repositories.
> >
> > Is it what you have?
> >
> > In 2.1 (or 2.0) we will review our cache.  As a workaround, you could
> > specify a different cache location in your 2 settings.
> >
> > Please, tell us if that solve your problem or if there is still an
> > error with the scoping of the settings.  And if you want, add a
> > comment to [1].
> >
> > [1] https://issues.apache.org/jira/browse/IVY-399
> >
> >
> > Gilles
> >
> >
> >
> > 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> >> sorry gilles, i was looking at the configure task, which i now see is
> >> deprecated.
> >>
> >> 1. however, i am not getting the results i'm looking for ... what i want
> >> is this ... one module that has settings that define several external
> >> resolvers ... which "installs" them and builds local repo.
> >>
> >> 2. all other modules that use a different settings, that are define only
> >> a single resolver, that points to the locally built repo in step 1.
> >>
> >> in step 1 i do ...
> >>
> >>         <ivy:settings id="dependencies" file="[the many resolvers
> >> settings file]"/>
> >>
> >> then many
> >>
> >>         <ivy:install  .... settingsRef="dependencies" />
> >>
> >> that works fine ... but then in step 2 i do ...
> >>
> >>         <ivy:settings file="[one resolve file]"/>
> >>
> >> which uses the default id i assume. then
> >>
> >>        <ivy:retrieve/>
> >>
> >> the retrieve still finds the many resolves defined under the non-default
> >> it "dependencies".
> >>
> >> what am i missing?
> >> thanks.
> >> Gilles Scokart wrote:
> >> > I settings doc [1], you have the id field.
> >> > In all other tasks you have the settingsRef field.  Look for example
> >> > at [2], the field is described.
> >> >
> >> > It seems that I have a first feedback : the doc should be more clear.
> >> > But how?
> >> >
> >> > [1] http://incubator.apache.org/ivy/doc/use/settings.html
> >> > [2] http://incubator.apache.org/ivy/doc/use/resolve.html
> >> >
> >> > Gilles
> >> >
> >> > 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> >> >> sorry gilles, can you point me to the pages that explain the
> >> feature? i
> >> >> looked under ivy:settings and :configure  where i expected and didn't
> >> >> see anything about resolveId there.
> >> >>
> >> >> Gilles Scokart wrote:
> >> >> > It seems that the doc is already published on the website.  But the
> >> >> > code is only in the trunk in subversion.
> >> >> >
> >> >> > What you have to do is to declare your different settings a ant
> >> >> > datatype, then you can fill the settingsRef attribute of every ivy
> >> >> > task.
> >> >> >
> >> >> > Note that the ivy task will take by default the settings with
> >> the id
> >> >> > 'ivy.instance'.  So if you don't want to put a settingRef in all
> >> your
> >> >> > ivy task, you can set this id for the settings that ivy should
> >> use by
> >> >> > default.
> >> >> >
> >> >> > Please let me know if it works like you expect, if it is easy to
> >> use
> >> >> > or if there are are any problems.  I would be pleased to receive a
> >> >> > feedback on this new feature.
> >> >> >
> >> >> > Gilles
> >> >> >
> >> >> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
> >> >> >> hi gilles,
> >> >> >>
> >> >> >> is there documentation on how to use this feature? examples?
> >> >> >>
> >> >> >> thanks.
> >> >> >>
> >> >> >> Gilles Scokart wrote:
> >> >> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use
> >> multiple
> >> >> >> > configuration (named settings in 2.0). See [1].  To test it now,
> >> >> you
> >> >> >> > will have to make your own build of ivy (which is not very
> >> >> difficult).
> >> >> >> >
> >> >> >> > [1] https://issues.apache.org/jira/browse/IVY-366
> >> >> >> >
> >> >> >> >
> >> >> >> > Gilles
> >> >> >> >
> >> >> >> >
> >> >> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>  I have a modular build structure based on Ant. each
> >> >> >> >>  module having a separate build script. I want to
> >> >> >> >>  have
> >> >> >> >>  the ivy realted files also module wise.
> >> >> >> >>  With ivy 1.0 this was possible. But when i upgraded
> >> >> >> >>  to
> >> >> >> >>  ivy 1.4 only the first configuration file seems to
> >> >> >> >>  be
> >> >> >> >>  reffered by all the modules.
> >> >> >> >> Inorder to publish I say
> >> >> >> >> <ivy:publish
> >> >> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
> >> >> >> >>             resolver="chain-resolver"
> >> >> >> >>             pubrevision="${revision}"
> >> >> >> >>             status="release"
> >> >> >> >>          />
> >> >> >> >>
> >> >> >> >>  The [artifact] gets evaluated to module name as
> >> >> >> >> defined in the first loaded ivy.xml
> >> >> >> >>
> >> >> >> >> Is there a way to call ivy:configure multiple times
> >> >> >> >>  with different configuration files?
> >> >> >> >
> >> >> >>
> >> >> >
> >> >>
> >> >
> >> >
> >>
> >
> >
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Jeffrey Blattman <je...@gmail.com>.
i don't think this has anything to do w/ the cache. the problem is that 
when i do:

a) <ivy:settings id="..." file="..."/>

then:

b) <ivy:settings/>

then i do:

<ivy:resolve/>

it uses the non-default settings loaded in step a). this is not what i 
expect, i expect it to use the default settings loaded in step b).

does that make sense? or am i misunderstanding how the settings id works?

are you saying that the artifacts in the cache resolved w/ the 
non-default settings between steps a) and b) somehow remember where they 
came from? the resolvers are encoded into the cache?

Gilles Scokart wrote:
> Isn't it related to the cache?  If some dependencies (coming from the
> "many resolvers used in step 1") are already in the cache, your
> retrieve of step 2 will found it there.  Ivy wil even say that it
> comes from those repositories.
>
> Is it what you have?
>
> In 2.1 (or 2.0) we will review our cache.  As a workaround, you could
> specify a different cache location in your 2 settings.
>
> Please, tell us if that solve your problem or if there is still an
> error with the scoping of the settings.  And if you want, add a
> comment to [1].
>
> [1] https://issues.apache.org/jira/browse/IVY-399
>
>
> Gilles
>
>
>
> 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
>> sorry gilles, i was looking at the configure task, which i now see is
>> deprecated.
>>
>> 1. however, i am not getting the results i'm looking for ... what i want
>> is this ... one module that has settings that define several external
>> resolvers ... which "installs" them and builds local repo.
>>
>> 2. all other modules that use a different settings, that are define only
>> a single resolver, that points to the locally built repo in step 1.
>>
>> in step 1 i do ...
>>
>>         <ivy:settings id="dependencies" file="[the many resolvers
>> settings file]"/>
>>
>> then many
>>
>>         <ivy:install  .... settingsRef="dependencies" />
>>
>> that works fine ... but then in step 2 i do ...
>>
>>         <ivy:settings file="[one resolve file]"/>
>>
>> which uses the default id i assume. then
>>
>>        <ivy:retrieve/>
>>
>> the retrieve still finds the many resolves defined under the non-default
>> it "dependencies".
>>
>> what am i missing?
>> thanks.
>> Gilles Scokart wrote:
>> > I settings doc [1], you have the id field.
>> > In all other tasks you have the settingsRef field.  Look for example
>> > at [2], the field is described.
>> >
>> > It seems that I have a first feedback : the doc should be more clear.
>> > But how?
>> >
>> > [1] http://incubator.apache.org/ivy/doc/use/settings.html
>> > [2] http://incubator.apache.org/ivy/doc/use/resolve.html
>> >
>> > Gilles
>> >
>> > 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
>> >> sorry gilles, can you point me to the pages that explain the 
>> feature? i
>> >> looked under ivy:settings and :configure  where i expected and didn't
>> >> see anything about resolveId there.
>> >>
>> >> Gilles Scokart wrote:
>> >> > It seems that the doc is already published on the website.  But the
>> >> > code is only in the trunk in subversion.
>> >> >
>> >> > What you have to do is to declare your different settings a ant
>> >> > datatype, then you can fill the settingsRef attribute of every ivy
>> >> > task.
>> >> >
>> >> > Note that the ivy task will take by default the settings with 
>> the id
>> >> > 'ivy.instance'.  So if you don't want to put a settingRef in all 
>> your
>> >> > ivy task, you can set this id for the settings that ivy should 
>> use by
>> >> > default.
>> >> >
>> >> > Please let me know if it works like you expect, if it is easy to 
>> use
>> >> > or if there are are any problems.  I would be pleased to receive a
>> >> > feedback on this new feature.
>> >> >
>> >> > Gilles
>> >> >
>> >> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
>> >> >> hi gilles,
>> >> >>
>> >> >> is there documentation on how to use this feature? examples?
>> >> >>
>> >> >> thanks.
>> >> >>
>> >> >> Gilles Scokart wrote:
>> >> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use 
>> multiple
>> >> >> > configuration (named settings in 2.0). See [1].  To test it now,
>> >> you
>> >> >> > will have to make your own build of ivy (which is not very
>> >> difficult).
>> >> >> >
>> >> >> > [1] https://issues.apache.org/jira/browse/IVY-366
>> >> >> >
>> >> >> >
>> >> >> > Gilles
>> >> >> >
>> >> >> >
>> >> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
>> >> >> >>
>> >> >> >>
>> >> >> >>  I have a modular build structure based on Ant. each
>> >> >> >>  module having a separate build script. I want to
>> >> >> >>  have
>> >> >> >>  the ivy realted files also module wise.
>> >> >> >>  With ivy 1.0 this was possible. But when i upgraded
>> >> >> >>  to
>> >> >> >>  ivy 1.4 only the first configuration file seems to
>> >> >> >>  be
>> >> >> >>  reffered by all the modules.
>> >> >> >> Inorder to publish I say
>> >> >> >> <ivy:publish
>> >> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
>> >> >> >>             resolver="chain-resolver"
>> >> >> >>             pubrevision="${revision}"
>> >> >> >>             status="release"
>> >> >> >>          />
>> >> >> >>
>> >> >> >>  The [artifact] gets evaluated to module name as
>> >> >> >> defined in the first loaded ivy.xml
>> >> >> >>
>> >> >> >> Is there a way to call ivy:configure multiple times
>> >> >> >>  with different configuration files?
>> >> >> >
>> >> >>
>> >> >
>> >>
>> >
>> >
>>
>
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Gilles Scokart <gs...@gmail.com>.
Isn't it related to the cache?  If some dependencies (coming from the
"many resolvers used in step 1") are already in the cache, your
retrieve of step 2 will found it there.  Ivy wil even say that it
comes from those repositories.

Is it what you have?

In 2.1 (or 2.0) we will review our cache.  As a workaround, you could
specify a different cache location in your 2 settings.

Please, tell us if that solve your problem or if there is still an
error with the scoping of the settings.  And if you want, add a
comment to [1].

[1] https://issues.apache.org/jira/browse/IVY-399


Gilles



2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> sorry gilles, i was looking at the configure task, which i now see is
> deprecated.
>
> 1. however, i am not getting the results i'm looking for ... what i want
> is this ... one module that has settings that define several external
> resolvers ... which "installs" them and builds local repo.
>
> 2. all other modules that use a different settings, that are define only
> a single resolver, that points to the locally built repo in step 1.
>
> in step 1 i do ...
>
>         <ivy:settings id="dependencies" file="[the many resolvers
> settings file]"/>
>
> then many
>
>         <ivy:install  .... settingsRef="dependencies" />
>
> that works fine ... but then in step 2 i do ...
>
>         <ivy:settings file="[one resolve file]"/>
>
> which uses the default id i assume. then
>
>        <ivy:retrieve/>
>
> the retrieve still finds the many resolves defined under the non-default
> it "dependencies".
>
> what am i missing?
> thanks.
> Gilles Scokart wrote:
> > I settings doc [1], you have the id field.
> > In all other tasks you have the settingsRef field.  Look for example
> > at [2], the field is described.
> >
> > It seems that I have a first feedback : the doc should be more clear.
> > But how?
> >
> > [1] http://incubator.apache.org/ivy/doc/use/settings.html
> > [2] http://incubator.apache.org/ivy/doc/use/resolve.html
> >
> > Gilles
> >
> > 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> >> sorry gilles, can you point me to the pages that explain the feature? i
> >> looked under ivy:settings and :configure  where i expected and didn't
> >> see anything about resolveId there.
> >>
> >> Gilles Scokart wrote:
> >> > It seems that the doc is already published on the website.  But the
> >> > code is only in the trunk in subversion.
> >> >
> >> > What you have to do is to declare your different settings a ant
> >> > datatype, then you can fill the settingsRef attribute of every ivy
> >> > task.
> >> >
> >> > Note that the ivy task will take by default the settings with the id
> >> > 'ivy.instance'.  So if you don't want to put a settingRef in all your
> >> > ivy task, you can set this id for the settings that ivy should use by
> >> > default.
> >> >
> >> > Please let me know if it works like you expect, if it is easy to use
> >> > or if there are are any problems.  I would be pleased to receive a
> >> > feedback on this new feature.
> >> >
> >> > Gilles
> >> >
> >> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
> >> >> hi gilles,
> >> >>
> >> >> is there documentation on how to use this feature? examples?
> >> >>
> >> >> thanks.
> >> >>
> >> >> Gilles Scokart wrote:
> >> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
> >> >> > configuration (named settings in 2.0). See [1].  To test it now,
> >> you
> >> >> > will have to make your own build of ivy (which is not very
> >> difficult).
> >> >> >
> >> >> > [1] https://issues.apache.org/jira/browse/IVY-366
> >> >> >
> >> >> >
> >> >> > Gilles
> >> >> >
> >> >> >
> >> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
> >> >> >>
> >> >> >>
> >> >> >>  I have a modular build structure based on Ant. each
> >> >> >>  module having a separate build script. I want to
> >> >> >>  have
> >> >> >>  the ivy realted files also module wise.
> >> >> >>  With ivy 1.0 this was possible. But when i upgraded
> >> >> >>  to
> >> >> >>  ivy 1.4 only the first configuration file seems to
> >> >> >>  be
> >> >> >>  reffered by all the modules.
> >> >> >> Inorder to publish I say
> >> >> >> <ivy:publish
> >> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
> >> >> >>             resolver="chain-resolver"
> >> >> >>             pubrevision="${revision}"
> >> >> >>             status="release"
> >> >> >>          />
> >> >> >>
> >> >> >>  The [artifact] gets evaluated to module name as
> >> >> >> defined in the first loaded ivy.xml
> >> >> >>
> >> >> >> Is there a way to call ivy:configure multiple times
> >> >> >>  with different configuration files?
> >> >> >
> >> >>
> >> >
> >>
> >
> >
>


-- 
Gilles SCOKART

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Jeffrey Blattman <je...@gmail.com>.
sorry gilles, i was looking at the configure task, which i now see is 
deprecated.

1. however, i am not getting the results i'm looking for ... what i want 
is this ... one module that has settings that define several external 
resolvers ... which "installs" them and builds local repo.

2. all other modules that use a different settings, that are define only 
a single resolver, that points to the locally built repo in step 1.

in step 1 i do ...

        <ivy:settings id="dependencies" file="[the many resolvers 
settings file]"/>               

then many

        <ivy:install  .... settingsRef="dependencies" />

that works fine ... but then in step 2 i do ...

        <ivy:settings file="[one resolve file]"/>

which uses the default id i assume. then

       <ivy:retrieve/>

the retrieve still finds the many resolves defined under the non-default 
it "dependencies".

what am i missing?
thanks.                     
Gilles Scokart wrote:
> I settings doc [1], you have the id field.
> In all other tasks you have the settingsRef field.  Look for example
> at [2], the field is described.
>
> It seems that I have a first feedback : the doc should be more clear.  
> But how?
>
> [1] http://incubator.apache.org/ivy/doc/use/settings.html
> [2] http://incubator.apache.org/ivy/doc/use/resolve.html
>
> Gilles
>
> 2007/6/21, Jeffrey Blattman <je...@gmail.com>:
>> sorry gilles, can you point me to the pages that explain the feature? i
>> looked under ivy:settings and :configure  where i expected and didn't
>> see anything about resolveId there.
>>
>> Gilles Scokart wrote:
>> > It seems that the doc is already published on the website.  But the
>> > code is only in the trunk in subversion.
>> >
>> > What you have to do is to declare your different settings a ant
>> > datatype, then you can fill the settingsRef attribute of every ivy
>> > task.
>> >
>> > Note that the ivy task will take by default the settings with the id
>> > 'ivy.instance'.  So if you don't want to put a settingRef in all your
>> > ivy task, you can set this id for the settings that ivy should use by
>> > default.
>> >
>> > Please let me know if it works like you expect, if it is easy to use
>> > or if there are are any problems.  I would be pleased to receive a
>> > feedback on this new feature.
>> >
>> > Gilles
>> >
>> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
>> >> hi gilles,
>> >>
>> >> is there documentation on how to use this feature? examples?
>> >>
>> >> thanks.
>> >>
>> >> Gilles Scokart wrote:
>> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
>> >> > configuration (named settings in 2.0). See [1].  To test it now, 
>> you
>> >> > will have to make your own build of ivy (which is not very 
>> difficult).
>> >> >
>> >> > [1] https://issues.apache.org/jira/browse/IVY-366
>> >> >
>> >> >
>> >> > Gilles
>> >> >
>> >> >
>> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
>> >> >>
>> >> >>
>> >> >>  I have a modular build structure based on Ant. each
>> >> >>  module having a separate build script. I want to
>> >> >>  have
>> >> >>  the ivy realted files also module wise.
>> >> >>  With ivy 1.0 this was possible. But when i upgraded
>> >> >>  to
>> >> >>  ivy 1.4 only the first configuration file seems to
>> >> >>  be
>> >> >>  reffered by all the modules.
>> >> >> Inorder to publish I say
>> >> >> <ivy:publish
>> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
>> >> >>             resolver="chain-resolver"
>> >> >>             pubrevision="${revision}"
>> >> >>             status="release"
>> >> >>          />
>> >> >>
>> >> >>  The [artifact] gets evaluated to module name as
>> >> >> defined in the first loaded ivy.xml
>> >> >>
>> >> >> Is there a way to call ivy:configure multiple times
>> >> >>  with different configuration files?
>> >> >
>> >>
>> >
>>
>
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Gilles Scokart <gs...@gmail.com>.
I settings doc [1], you have the id field.
In all other tasks you have the settingsRef field.  Look for example
at [2], the field is described.

It seems that I have a first feedback : the doc should be more clear.  But how?

[1] http://incubator.apache.org/ivy/doc/use/settings.html
[2] http://incubator.apache.org/ivy/doc/use/resolve.html

Gilles

2007/6/21, Jeffrey Blattman <je...@gmail.com>:
> sorry gilles, can you point me to the pages that explain the feature? i
> looked under ivy:settings and :configure  where i expected and didn't
> see anything about resolveId there.
>
> Gilles Scokart wrote:
> > It seems that the doc is already published on the website.  But the
> > code is only in the trunk in subversion.
> >
> > What you have to do is to declare your different settings a ant
> > datatype, then you can fill the settingsRef attribute of every ivy
> > task.
> >
> > Note that the ivy task will take by default the settings with the id
> > 'ivy.instance'.  So if you don't want to put a settingRef in all your
> > ivy task, you can set this id for the settings that ivy should use by
> > default.
> >
> > Please let me know if it works like you expect, if it is easy to use
> > or if there are are any problems.  I would be pleased to receive a
> > feedback on this new feature.
> >
> > Gilles
> >
> > 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
> >> hi gilles,
> >>
> >> is there documentation on how to use this feature? examples?
> >>
> >> thanks.
> >>
> >> Gilles Scokart wrote:
> >> > This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
> >> > configuration (named settings in 2.0). See [1].  To test it now, you
> >> > will have to make your own build of ivy (which is not very difficult).
> >> >
> >> > [1] https://issues.apache.org/jira/browse/IVY-366
> >> >
> >> >
> >> > Gilles
> >> >
> >> >
> >> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
> >> >>
> >> >>
> >> >>  I have a modular build structure based on Ant. each
> >> >>  module having a separate build script. I want to
> >> >>  have
> >> >>  the ivy realted files also module wise.
> >> >>  With ivy 1.0 this was possible. But when i upgraded
> >> >>  to
> >> >>  ivy 1.4 only the first configuration file seems to
> >> >>  be
> >> >>  reffered by all the modules.
> >> >> Inorder to publish I say
> >> >> <ivy:publish
> >> >> artifactspattern="${dist.dir}\[artifact].[ext]"
> >> >>             resolver="chain-resolver"
> >> >>             pubrevision="${revision}"
> >> >>             status="release"
> >> >>          />
> >> >>
> >> >>  The [artifact] gets evaluated to module name as
> >> >> defined in the first loaded ivy.xml
> >> >>
> >> >> Is there a way to call ivy:configure multiple times
> >> >>  with different configuration files?
> >> >
> >>
> >
>


-- 
Gilles SCOKART

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Jeffrey Blattman <je...@gmail.com>.
sorry gilles, can you point me to the pages that explain the feature? i 
looked under ivy:settings and :configure  where i expected and didn't 
see anything about resolveId there.

Gilles Scokart wrote:
> It seems that the doc is already published on the website.  But the
> code is only in the trunk in subversion.
>
> What you have to do is to declare your different settings a ant
> datatype, then you can fill the settingsRef attribute of every ivy
> task.
>
> Note that the ivy task will take by default the settings with the id
> 'ivy.instance'.  So if you don't want to put a settingRef in all your
> ivy task, you can set this id for the settings that ivy should use by
> default.
>
> Please let me know if it works like you expect, if it is easy to use
> or if there are are any problems.  I would be pleased to receive a
> feedback on this new feature.
>
> Gilles
>
> 2007/6/20, Jeffrey Blattman <je...@gmail.com>:
>> hi gilles,
>>
>> is there documentation on how to use this feature? examples?
>>
>> thanks.
>>
>> Gilles Scokart wrote:
>> > This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
>> > configuration (named settings in 2.0). See [1].  To test it now, you
>> > will have to make your own build of ivy (which is not very difficult).
>> >
>> > [1] https://issues.apache.org/jira/browse/IVY-366
>> >
>> >
>> > Gilles
>> >
>> >
>> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
>> >>
>> >>
>> >>  I have a modular build structure based on Ant. each
>> >>  module having a separate build script. I want to
>> >>  have
>> >>  the ivy realted files also module wise.
>> >>  With ivy 1.0 this was possible. But when i upgraded
>> >>  to
>> >>  ivy 1.4 only the first configuration file seems to
>> >>  be
>> >>  reffered by all the modules.
>> >> Inorder to publish I say
>> >> <ivy:publish
>> >> artifactspattern="${dist.dir}\[artifact].[ext]"
>> >>             resolver="chain-resolver"
>> >>             pubrevision="${revision}"
>> >>             status="release"
>> >>          />
>> >>
>> >>  The [artifact] gets evaluated to module name as
>> >> defined in the first loaded ivy.xml
>> >>
>> >> Is there a way to call ivy:configure multiple times
>> >>  with different configuration files?
>> >
>>
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Gilles Scokart <gs...@gmail.com>.
It seems that the doc is already published on the website.  But the
code is only in the trunk in subversion.

What you have to do is to declare your different settings a ant
datatype, then you can fill the settingsRef attribute of every ivy
task.

Note that the ivy task will take by default the settings with the id
'ivy.instance'.  So if you don't want to put a settingRef in all your
ivy task, you can set this id for the settings that ivy should use by
default.

Please let me know if it works like you expect, if it is easy to use
or if there are are any problems.  I would be pleased to receive a
feedback on this new feature.

Gilles

2007/6/20, Jeffrey Blattman <je...@gmail.com>:
> hi gilles,
>
> is there documentation on how to use this feature? examples?
>
> thanks.
>
> Gilles Scokart wrote:
> > This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
> > configuration (named settings in 2.0). See [1].  To test it now, you
> > will have to make your own build of ivy (which is not very difficult).
> >
> > [1] https://issues.apache.org/jira/browse/IVY-366
> >
> >
> > Gilles
> >
> >
> > 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
> >>
> >>
> >>  I have a modular build structure based on Ant. each
> >>  module having a separate build script. I want to
> >>  have
> >>  the ivy realted files also module wise.
> >>  With ivy 1.0 this was possible. But when i upgraded
> >>  to
> >>  ivy 1.4 only the first configuration file seems to
> >>  be
> >>  reffered by all the modules.
> >> Inorder to publish I say
> >> <ivy:publish
> >> artifactspattern="${dist.dir}\[artifact].[ext]"
> >>             resolver="chain-resolver"
> >>             pubrevision="${revision}"
> >>             status="release"
> >>          />
> >>
> >>  The [artifact] gets evaluated to module name as
> >> defined in the first loaded ivy.xml
> >>
> >> Is there a way to call ivy:configure multiple times
> >>  with different configuration files?
> >
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Jeffrey Blattman <je...@gmail.com>.
hi gilles,

is there documentation on how to use this feature? examples?

thanks.

Gilles Scokart wrote:
> This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
> configuration (named settings in 2.0). See [1].  To test it now, you
> will have to make your own build of ivy (which is not very difficult).
>
> [1] https://issues.apache.org/jira/browse/IVY-366
>
>
> Gilles
>
>
> 2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
>>
>>
>>  I have a modular build structure based on Ant. each
>>  module having a separate build script. I want to
>>  have
>>  the ivy realted files also module wise.
>>  With ivy 1.0 this was possible. But when i upgraded
>>  to
>>  ivy 1.4 only the first configuration file seems to
>>  be
>>  reffered by all the modules.
>> Inorder to publish I say
>> <ivy:publish
>> artifactspattern="${dist.dir}\[artifact].[ext]"
>>             resolver="chain-resolver"
>>             pubrevision="${revision}"
>>             status="release"
>>          />
>>
>>  The [artifact] gets evaluated to module name as
>> defined in the first loaded ivy.xml
>>
>> Is there a way to call ivy:configure multiple times
>>  with different configuration files?
>

Re: can i call ivy:configure multiple times with different configuration files(which in turn refers different ivy.xmls)?

Posted by Gilles Scokart <gs...@gmail.com>.
This should be fixed in 2.0-alpha2. Ivy will allow to use multiple
configuration (named settings in 2.0). See [1].  To test it now, you
will have to make your own build of ivy (which is not very difficult).

[1] https://issues.apache.org/jira/browse/IVY-366


Gilles


2007/6/20, sujeewanie weerakoon <su...@yahoo.com>:
>
>
>  I have a modular build structure based on Ant. each
>  module having a separate build script. I want to
>  have
>  the ivy realted files also module wise.
>  With ivy 1.0 this was possible. But when i upgraded
>  to
>  ivy 1.4 only the first configuration file seems to
>  be
>  reffered by all the modules.
> Inorder to publish I say
> <ivy:publish
> artifactspattern="${dist.dir}\[artifact].[ext]"
>             resolver="chain-resolver"
>             pubrevision="${revision}"
>             status="release"
>          />
>
>  The [artifact] gets evaluated to module name as
> defined in the first loaded ivy.xml
>
> Is there a way to call ivy:configure multiple times
>  with different configuration files?