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 Dieter Steinwedel <di...@wertron.de> on 2007/08/01 11:54:55 UTC

listmodules

Hi,

 

I'm currently doing my first steps with ivy. I wonder why no way is
described to find a library in the public repository. Thefore I have decided
to use the listmodules task from ivy. Unfortunally, I run in some trouble
using this task. Ivy returns a search result with version 1.4.1, but
[organisation] contains always the value "content.xsl". Using ivy version
2.0.0-alpha2 the listmodules task returns no result. I would prefer an
solution for version 2.0.0. I have to implement a dependency management
quickly. Therefore I would be very thankful about help. I don't want to
pom-inize the projects ;)

 

Btw, it would be great having an additional variable like [index] to
[organisation], [module] and [revision] for a better enumeration of the
result. Try following ant script:

 

<?xml version="1.0"  encoding="UTF-8"?>

 

<project name="ivy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">

            

            <target name="ivy-init">

                        <path id="ivy.lib.path">

                                   <fileset dir="${basedir}"
includes="*.jar"/>

                                   <fileset dir="${basedir}/lib"
includes="*.jar"/>

                        </path>

                        <taskdef 

                                   resource="fr/jayasoft/ivy/ant/antlib.xml"


                                   uri="antlib:org.apache.ivy.ant" 

                                   classpathref="ivy.lib.path"/>


            </target>

                                   

            <target name="list" depends="ivy-init">

                        <echo message="Please type search pattern:"/>

                        <input

                                   message="Organisation - default: "

                                   defaultvalue="*"

                                   addproperty="ivy.input.organisation"

                                   />

                        <input

                                   message="Module - default: "

                                   defaultvalue="hibernate"

                                   addproperty="ivy.input.module"

                                   />

                        <input

                                   message="Revision - default: "

                                   defaultvalue="*"

                                   addproperty="ivy.input.revision"

                                   />

                        <ivy:listmodules 

                                   organisation="${ivy.input.organisation}" 

                                   module="${ivy.input.module}" 

                                   revision="${ivy.input.revision}" 

 
property="ivy.list.[organisation].[module].[revision]" 

                                   value="   { [organisation] | [module] |
[revision] }"/>

 

                        <!-- More readable would be: -->

                        < !--ivy:listmodules 

                                   organisation="${ivy.input.organisation}" 

                                   module="${ivy.input.module}" 

                                   revision="${ivy.input.revision}" 

                                   property="ivy.list.[index]" 

                                   value="   { [organisation] | [module] |
[revision] }"/-->

                        <echoproperties regex="ivy.list.*"/>

            </target>

            

</project>

 

Thanks for helping!

D. Steinwedel


Re: listmodules

Posted by Gilles Scokart <gs...@gmail.com>.
To search dependencies, you should look at : http://mvnrepository.com

You should also check that the thing you have found really exist at:
http://repo1.maven.org/maven2

And for index, I'm not sure what would be the right value to give to it.

Gilles

2007/8/1, Dieter Steinwedel <di...@wertron.de>:
> Hi,
>
>
>
> I'm currently doing my first steps with ivy. I wonder why no way is
> described to find a library in the public repository. Thefore I have decided
> to use the listmodules task from ivy. Unfortunally, I run in some trouble
> using this task. Ivy returns a search result with version 1.4.1, but
> [organisation] contains always the value "content.xsl". Using ivy version
> 2.0.0-alpha2 the listmodules task returns no result. I would prefer an
> solution for version 2.0.0. I have to implement a dependency management
> quickly. Therefore I would be very thankful about help. I don't want to
> pom-inize the projects ;)
>
>
>
> Btw, it would be great having an additional variable like [index] to
> [organisation], [module] and [revision] for a better enumeration of the
> result. Try following ant script:
>
>
>
> <?xml version="1.0"  encoding="UTF-8"?>
>
>
>
> <project name="ivy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
>
>
>
>             <target name="ivy-init">
>
>                         <path id="ivy.lib.path">
>
>                                    <fileset dir="${basedir}"
> includes="*.jar"/>
>
>                                    <fileset dir="${basedir}/lib"
> includes="*.jar"/>
>
>                         </path>
>
>                         <taskdef
>
>                                    resource="fr/jayasoft/ivy/ant/antlib.xml"
>
>
>                                    uri="antlib:org.apache.ivy.ant"
>
>                                    classpathref="ivy.lib.path"/>
>
>
>             </target>
>
>
>
>             <target name="list" depends="ivy-init">
>
>                         <echo message="Please type search pattern:"/>
>
>                         <input
>
>                                    message="Organisation - default: "
>
>                                    defaultvalue="*"
>
>                                    addproperty="ivy.input.organisation"
>
>                                    />
>
>                         <input
>
>                                    message="Module - default: "
>
>                                    defaultvalue="hibernate"
>
>                                    addproperty="ivy.input.module"
>
>                                    />
>
>                         <input
>
>                                    message="Revision - default: "
>
>                                    defaultvalue="*"
>
>                                    addproperty="ivy.input.revision"
>
>                                    />
>
>                         <ivy:listmodules
>
>                                    organisation="${ivy.input.organisation}"
>
>                                    module="${ivy.input.module}"
>
>                                    revision="${ivy.input.revision}"
>
>
> property="ivy.list.[organisation].[module].[revision]"
>
>                                    value="   { [organisation] | [module] |
> [revision] }"/>
>
>
>
>                         <!-- More readable would be: -->
>
>                         < !--ivy:listmodules
>
>                                    organisation="${ivy.input.organisation}"
>
>                                    module="${ivy.input.module}"
>
>                                    revision="${ivy.input.revision}"
>
>                                    property="ivy.list.[index]"
>
>                                    value="   { [organisation] | [module] |
> [revision] }"/-->
>
>                         <echoproperties regex="ivy.list.*"/>
>
>             </target>
>
>
>
> </project>
>
>
>
> Thanks for helping!
>
> D. Steinwedel
>
>


-- 
Gilles SCOKART