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 Ross Camara <rm...@us.ibm.com> on 2008/03/04 00:13:00 UTC

Problem with ListModule

I'm trying to use the ant task 'listmodule' to retrieve a listing of all
the modules in my repository in my build scripts. However upon execution of
the task only a portion of all the modules are listed. I'm wondering if
anyone one has some suggestions why I'm seeing this strange behavior.

This is my ant task:
<target name="ml" >
      <ivy:listmodules module="*" organisation="*" revision="*" property=
"ips.[module]" value="found"/>
      <echoproperties prefix="ips"></echoproperties>
</target>

Resolvers:
<resolvers>
      <filesystem name="Central" allownomd="no"
            local="false" >
            <ivy
                  pattern="${ivy.repository.enterprise.root}/
[organisation]/[revision]/[module]/component.xml"/>
            <artifact
                  pattern="${ivy.repository.enterprise.root}/
[organisation]/[revision]/[module]/[type]s/[artifact].[ext]"/>
      </filesystem>]
      <filesystem name="3rdParty" allownomd="no"
            local="false">
            <ivy
                  pattern="${ivy.repository.3rdParty.root}/]
[organisation]/[module]/[revision]/component.xml"/>
            <artifact
                  pattern="${ivy.repository.3rdParty.root}/]
[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>
      </filesystem>]
</resolvers>>]

File Structure:
RepositoryA\
      org.eclipse\
            sdk\
                  3.2\
                        compeonent.xml
                        libs\
                              sdk.zip
RepositoryB\
      com.ibm\
            1.0\
                  CompA\
                        component.xml
                        libs\
                              compa.zip
                  CompB
                        component.xml
                        libs\
                              compb.zip

The output i am receiving is:
[echoproperties] #Ant properties
[echoproperties] #Mon Mar 03 18:00:26 EST 2008
[echoproperties] ips.sdk=found

All the modules in 'Central' are not being listed. Am I missing something
of have something incorrectly?

Ross Camara
Software Developer
rmcamara@us.ibm.com


Re: Problem with ListModule

Posted by Xavier Hanin <xa...@gmail.com>.
OK, I was confused by the reverse order of repositories (RepositoryB is
central repo). So I think you hit a limitation/bug in Ivy: the order of
tokens (org, module rev) for repreport to work is hard coded. We have two
open issues related to this (IVY-528 and IVY-716), which should be addressed
at once to support any order of tokens, as suggested by Maarten:
https://issues.apache.org/jira/browse/IVY-716?focusedCommentId=12565568#action_12565568

Feel free to either vote/comment on these bugs, or open a new one with a
link to others.

Xavier

On Tue, Mar 4, 2008 at 4:16 PM, Ross Camara <rm...@us.ibm.com> wrote:

>
> No the pattern for the central repository is correct. For the stuff being
> built locally we want them grouped by version number on the file system.
> For
> our third party dependencies we want them to be grouped on the module.
>
> Ross
>
>
> Xavier Hanin wrote:
> >
> > On Tue, Mar 4, 2008 at 12:13 AM, Ross Camara <rm...@us.ibm.com>
> wrote:
> >
> >>
> >> I'm trying to use the ant task 'listmodule' to retrieve a listing of
> all
> >> the modules in my repository in my build scripts. However upon
> execution
> >> of
> >> the task only a portion of all the modules are listed. I'm wondering if
> >> anyone one has some suggestions why I'm seeing this strange behavior.
> >>
> >> This is my ant task:
> >> <target name="ml" >
> >>      <ivy:listmodules module="*" organisation="*" revision="*"
> property=
> >> "ips.[module]" value="found"/>
> >>      <echoproperties prefix="ips"></echoproperties>
> >> </target>
> >>
> >> Resolvers:
> >> <resolvers>
> >>      <filesystem name="Central" allownomd="no"
> >>            local="false" >
> >>            <ivy
> >>                  pattern="${ivy.repository.enterprise.root}/
> >> [organisation]/[revision]/[module]/component.xml"/>
> >>            <artifact
> >>                  pattern="${ivy.repository.enterprise.root}/
> >> [organisation]/[revision]/[module]/[type]s/[artifact].[ext]"/>
> >>      </filesystem>]
> >>      <filesystem name="3rdParty" allownomd="no"
> >>            local="false">
> >>            <ivy
> >>                  pattern="${ivy.repository.3rdParty.root}/]
> >> [organisation]/[module]/[revision]/component.xml"/>
> >>            <artifact
> >>                  pattern="${ivy.repository.3rdParty.root}/]
> >> [organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>
> >>      </filesystem>]
> >> </resolvers>>]
> >>
> >> File Structure:
> >> RepositoryA\
> >>      org.eclipse\
> >>            sdk\
> >>                  3.2\
> >>                        compeonent.xml
> >>                        libs\
> >>                              sdk.zip
> >> RepositoryB\
> >>      com.ibm\
> >>            1.0\
> >>                  CompA\
> >>                        component.xml
> >>                        libs\
> >>                              compa.zip
> >>                  CompB
> >>                        component.xml
> >>                        libs\
> >>                              compb.zip
> >>
> >> The output i am receiving is:
> >> [echoproperties] #Ant properties
> >> [echoproperties] #Mon Mar 03 18:00:26 EST 2008
> >> [echoproperties] ips.sdk=found
> >>
> >> All the modules in 'Central' are not being listed. Am I missing
> something
> >> of have something incorrectly?
> >
> > Not sure if it's a copy paste error or not, but your pattern for central
> > seems incorrect according to what you seem to have in your repo:
> revision
> > token should be after module token in your patterns.
> >
> > Xavier
> >
> >>
> >>
> >> Ross Camara
> >> Software Developer
> >> rmcamara@us.ibm.com
> >>
> >>
> >
> >
> > --
> > Xavier Hanin - Independent Java Consultant
> > http://xhab.blogspot.com/
> > http://ant.apache.org/ivy/
> > http://www.xoocode.org/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Problem-with-ListModule-tp15820353p15829425.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


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

Re: Problem with ListModule

Posted by Ross Camara <rm...@us.ibm.com>.
No the pattern for the central repository is correct. For the stuff being
built locally we want them grouped by version number on the file system. For
our third party dependencies we want them to be grouped on the module. 

Ross


Xavier Hanin wrote:
> 
> On Tue, Mar 4, 2008 at 12:13 AM, Ross Camara <rm...@us.ibm.com> wrote:
> 
>>
>> I'm trying to use the ant task 'listmodule' to retrieve a listing of all
>> the modules in my repository in my build scripts. However upon execution
>> of
>> the task only a portion of all the modules are listed. I'm wondering if
>> anyone one has some suggestions why I'm seeing this strange behavior.
>>
>> This is my ant task:
>> <target name="ml" >
>>      <ivy:listmodules module="*" organisation="*" revision="*" property=
>> "ips.[module]" value="found"/>
>>      <echoproperties prefix="ips"></echoproperties>
>> </target>
>>
>> Resolvers:
>> <resolvers>
>>      <filesystem name="Central" allownomd="no"
>>            local="false" >
>>            <ivy
>>                  pattern="${ivy.repository.enterprise.root}/
>> [organisation]/[revision]/[module]/component.xml"/>
>>            <artifact
>>                  pattern="${ivy.repository.enterprise.root}/
>> [organisation]/[revision]/[module]/[type]s/[artifact].[ext]"/>
>>      </filesystem>]
>>      <filesystem name="3rdParty" allownomd="no"
>>            local="false">
>>            <ivy
>>                  pattern="${ivy.repository.3rdParty.root}/]
>> [organisation]/[module]/[revision]/component.xml"/>
>>            <artifact
>>                  pattern="${ivy.repository.3rdParty.root}/]
>> [organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>
>>      </filesystem>]
>> </resolvers>>]
>>
>> File Structure:
>> RepositoryA\
>>      org.eclipse\
>>            sdk\
>>                  3.2\
>>                        compeonent.xml
>>                        libs\
>>                              sdk.zip
>> RepositoryB\
>>      com.ibm\
>>            1.0\
>>                  CompA\
>>                        component.xml
>>                        libs\
>>                              compa.zip
>>                  CompB
>>                        component.xml
>>                        libs\
>>                              compb.zip
>>
>> The output i am receiving is:
>> [echoproperties] #Ant properties
>> [echoproperties] #Mon Mar 03 18:00:26 EST 2008
>> [echoproperties] ips.sdk=found
>>
>> All the modules in 'Central' are not being listed. Am I missing something
>> of have something incorrectly?
> 
> Not sure if it's a copy paste error or not, but your pattern for central
> seems incorrect according to what you seem to have in your repo: revision
> token should be after module token in your patterns.
> 
> Xavier
> 
>>
>>
>> Ross Camara
>> Software Developer
>> rmcamara@us.ibm.com
>>
>>
> 
> 
> -- 
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://ant.apache.org/ivy/
> http://www.xoocode.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-ListModule-tp15820353p15829425.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: Problem with ListModule

Posted by Xavier Hanin <xa...@gmail.com>.
On Tue, Mar 4, 2008 at 12:13 AM, Ross Camara <rm...@us.ibm.com> wrote:

>
> I'm trying to use the ant task 'listmodule' to retrieve a listing of all
> the modules in my repository in my build scripts. However upon execution
> of
> the task only a portion of all the modules are listed. I'm wondering if
> anyone one has some suggestions why I'm seeing this strange behavior.
>
> This is my ant task:
> <target name="ml" >
>      <ivy:listmodules module="*" organisation="*" revision="*" property=
> "ips.[module]" value="found"/>
>      <echoproperties prefix="ips"></echoproperties>
> </target>
>
> Resolvers:
> <resolvers>
>      <filesystem name="Central" allownomd="no"
>            local="false" >
>            <ivy
>                  pattern="${ivy.repository.enterprise.root}/
> [organisation]/[revision]/[module]/component.xml"/>
>            <artifact
>                  pattern="${ivy.repository.enterprise.root}/
> [organisation]/[revision]/[module]/[type]s/[artifact].[ext]"/>
>      </filesystem>]
>      <filesystem name="3rdParty" allownomd="no"
>            local="false">
>            <ivy
>                  pattern="${ivy.repository.3rdParty.root}/]
> [organisation]/[module]/[revision]/component.xml"/>
>            <artifact
>                  pattern="${ivy.repository.3rdParty.root}/]
> [organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>
>      </filesystem>]
> </resolvers>>]
>
> File Structure:
> RepositoryA\
>      org.eclipse\
>            sdk\
>                  3.2\
>                        compeonent.xml
>                        libs\
>                              sdk.zip
> RepositoryB\
>      com.ibm\
>            1.0\
>                  CompA\
>                        component.xml
>                        libs\
>                              compa.zip
>                  CompB
>                        component.xml
>                        libs\
>                              compb.zip
>
> The output i am receiving is:
> [echoproperties] #Ant properties
> [echoproperties] #Mon Mar 03 18:00:26 EST 2008
> [echoproperties] ips.sdk=found
>
> All the modules in 'Central' are not being listed. Am I missing something
> of have something incorrectly?

Not sure if it's a copy paste error or not, but your pattern for central
seems incorrect according to what you seem to have in your repo: revision
token should be after module token in your patterns.

Xavier

>
>
> Ross Camara
> Software Developer
> rmcamara@us.ibm.com
>
>


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