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 Vladimir Ritz Bossicard <vl...@ritz-bossicard.com> on 2009/01/07 00:43:04 UTC

local roundup resolver

All,

I've been using Ivy for the last 3 years and I've until now worked  
with local repositories and configuration files.

I would like to publish some Java project and use Roundup for the ivy  
configuration.  Since Roundup doesn't yet contain all the ivy  
configuration I need, I would like to first work with local packagers  
(filesystem) and contribute these files to the Roundup project once  
they are clean and dusted.

My problem is that when I define the following packager

<packager name="roundup-local" buildRoot="${ivy.build.dir}"
         resourceCache="${ivy.cache.dir}">
     <ivy  
pattern="c:/roundup-local/ivy/[organisation]/[module]/[revision]/ivy.xml"/>
     <artifact  
pattern="c:/roundup-local/ivy/[organisation]/[module]/[revision]/packager.xml"/>
</packager>

I have the error:

roundup-local: unable to get resource for [...]  
java.net.MalformedURLException: unknown protocol: c

Since I use the <ivy patter="c:/..." successfully in other ivy  
configuration files, it is possible that the packager only work with  
http:// patterns?

Or am I missing something stupid here?

Thanks and regards,

-Vladimir



Re: local roundup resolver

Posted by Vladimir Ritz Bossicard <vl...@ritz-bossicard.com>.
Niklas,

>Here "c:" will be interpreted as host "c" with a default port number.
>You need to write "file:///c:/home/" or "file://localhost/c:/home/".
>  
>
Right on!  Thanks for the tip (I feel a bit stupid to have missed it but 
alas...).

-Vladimir



Re: local roundup resolver

Posted by Niklas Matthies <ml...@nmhq.net>.
On Thu 2009-01-08 at 22:38h, Vladimir Ritz Bossicard wrote on ivy-user:
:
> Ivy still doesn't find the dependency.
:
> pattern="file://c:/home/projects/roundup/[organisation]/[module]/[revision]/ivy.xml 
> <file://c:/home/projects/roundup/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/ivy.xml>"/>

Here "c:" will be interpreted as host "c" with a default port number.
You need to write "file:///c:/home/" or "file://localhost/c:/home/".

-- Niklas Matthies

Re: local roundup resolver

Posted by Vladimir Ritz Bossicard <vl...@ritz-bossicard.com>.
Archie,

>You probably need the "file://" prefix for URLs that are file pathnames.
>  
>
Thanks for the proposition. The results are a little bit different, but 
Ivy still doesn't find the dependency.

[ivy:retrieve]                 module not found: 
org.apache.commons#commons-lang;2.4
[ivy:retrieve]         ==== roundup: tried
[ivy:retrieve]           
file://c:/home/projects/roundup/org.apache.commons/commons-lang/2.4/ivy.xml 
<ci...@ritz-bossicard.com>
[ivy:retrieve]           -- artifact 
org.apache.commons#commons-lang;2.4!commons-lang.jar:
[ivy:retrieve]           
file://c:/home/projects/roundup/org.apache.commons/commons-lang/2.4/packager.xml 
<ci...@ritz-bossicard.com>

I'm using Ivy 2.0.0-rc2 and JDK 1.5.0_17/1.6.0_3.  Here's a test case:

   * the Ivy roundup has been checked-out onto c:/home/projects/roundup 
from
         http://ivyroundup.googlecode.com/svn/trunk/src/modules
     but also tried with
         http://ivyroundup.googlecode.com/svn/trunk/repo/modules

   * the ivysettings.xml

<ivysettings>
        <settings defaultResolver="roundup"/>
        <caches>
                <cache name="default-cache" basedir="c:/temp/ivycache"/>
        </caches>
        <resolvers>
                <packager name="roundup" buildRoot="c:/temp/packager-build"
resourceCache="c:/temp/packager-cache">
                        <ivy
pattern="file://c:/home/projects/roundup/[organisation]/[module]/[revision]/ivy.xml 
<file://c:/home/projects/roundup/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/ivy.xml>"/>
                        <artifact
pattern="file://c:/home/projects/roundup/[organisation]/[module]/[revision]/packager.xml 
<file://c:/home/projects/roundup/%5Borganisation%5D/%5Bmodule%5D/%5Brevision%5D/packager.xml>"/>
                </packager>
        </resolvers>
</ivysettings>

   * the Ivy file

<ivy-module version="1.0">
    <info organisation="roundup"
        module="roundup"
        revision="alpha"
        status="integration">
    </info>
    <configurations>
        <conf name="distributed"/>
    </configurations>
    <dependencies>
            <dependency org="org.apache.commons" name="commons-lang" 
rev="2.4"
conf="distributed->default"/>
    </dependencies>

</ivy-module>

   * and the build file

<project name="roundup test" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
    <target name="init">
        <ivy:settings file="ivysettings.xml"/>
        <ivy:retrieve 
pattern="lib/[conf]/[type]s/[module]/[artifact]-[revision].[ext]"/>
    </target>
</project>

If you have some time, could you try to reproduce the problem?  Being 
able to access
packagers via the file system would be a great help in writing new ones 
for the Roundup
repository.

Many thanks,

-Vladimir

Re: local roundup resolver

Posted by vb...@scdi.org.
Archie,

> You probably need the "file://" prefix for URLs that are file pathnames.

Thanks for the proposition. The results are a little bit different,  
but Ivy still doesn't find the dependency.

[ivy:retrieve] 		module not found: org.apache.commons#commons-lang;2.4
[ivy:retrieve] 	==== roundup: tried
[ivy:retrieve] 	   
file://c:/home/projects/roundup/org.apache.commons/commons-lang/2.4/ivy.xml
[ivy:retrieve] 	  -- artifact  
org.apache.commons#commons-lang;2.4!commons-lang.jar:
[ivy:retrieve] 	   
file://c:/home/projects/roundup/org.apache.commons/commons-lang/2.4/packager.xml

I'm using Ivy 2.0.0-rc2 and JDK 1.5.0_17/1.6.0_3.  Here's a test case:

    * the Ivy roundup has been checked-out onto  
c:/home/projects/roundup from  
http://ivyroundup.googlecode.com/svn/trunk/src/modules

    * the ivysettings.xml

<ivysettings>
	<settings defaultResolver="roundup"/>
	<caches>
		<cache name="default-cache" basedir="c:/temp/ivycache"/>
	</caches>
	<resolvers>
		<packager name="roundup" buildRoot="c:/temp/packager-build"  
resourceCache="c:/temp/packager-cache">
			<ivy  
pattern="file://c:/home/projects/roundup/[organisation]/[module]/[revision]/ivy.xml"/>
			<artifact  
pattern="file://c:/home/projects/roundup/[organisation]/[module]/[revision]/packager.xml"/>
		</packager>
	</resolvers>
</ivysettings>

    * the Ivy file

<ivy-module version="1.0">
     <info organisation="roundup"
         module="roundup"
         revision="alpha"
         status="integration">
     </info>
     <configurations>
         <conf name="distributed"/>
     </configurations>
     <dependencies>
     	<dependency org="org.apache.commons" name="commons-lang"  
rev="2.4" conf="distributed->default"/>
     </dependencies>

</ivy-module>

    * and the build file

<project name="roundup test" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
     <target name="init">
         <ivy:settings file="ivysettings.xml"/>
         <ivy:retrieve  
pattern="lib/[conf]/[type]s/[module]/[artifact]-[revision].[ext]"/>
     </target>
</project>

If you have some time, could you try to reproduce the problem?  Being  
able to access packagers via the file system would be a great help in  
writing new ones for the Roundup repository.

Many thanks,

-Vladimir



Re: local roundup resolver

Posted by Archie Cobbs <ar...@gmail.com>.
You probably need the "file://" prefix for URLs that are file pathnames.

Not sure how many slashes you need or whether they are forward or back
though...

By the way, the URL resolver should have the same behavior, i.e., I don't
think this is specific to the packager resolver.

-Archie

On Tue, Jan 6, 2009 at 5:43 PM, Vladimir Ritz Bossicard <
vladimir@ritz-bossicard.com> wrote:

> All,
>
> I've been using Ivy for the last 3 years and I've until now worked with
> local repositories and configuration files.
>
> I would like to publish some Java project and use Roundup for the ivy
> configuration.  Since Roundup doesn't yet contain all the ivy configuration
> I need, I would like to first work with local packagers (filesystem) and
> contribute these files to the Roundup project once they are clean and
> dusted.
>
> My problem is that when I define the following packager
>
> <packager name="roundup-local" buildRoot="${ivy.build.dir}"
>        resourceCache="${ivy.cache.dir}">
>    <ivy
> pattern="c:/roundup-local/ivy/[organisation]/[module]/[revision]/ivy.xml"/>
>    <artifact
> pattern="c:/roundup-local/ivy/[organisation]/[module]/[revision]/packager.xml"/>
> </packager>
>
> I have the error:
>
> roundup-local: unable to get resource for [...]
> java.net.MalformedURLException: unknown protocol: c
>
> Since I use the <ivy patter="c:/..." successfully in other ivy
> configuration files, it is possible that the packager only work with http://patterns?
>
> Or am I missing something stupid here?
>
> Thanks and regards,
>
> -Vladimir
>
>
>


-- 
Archie L. Cobbs