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 Xavier Hanin <xa...@gmail.com> on 2007/03/01 09:32:00 UTC

Re: Help! Help me use a Maven repository!

On 2/28/07, Eric Crahen <er...@gmail.com> wrote:
> I'm writing some code that is a plugin for this Maven oriented project. I
> tried to use Maven, I really did. But it turns out I would rather drink a
> glass of lye than use Maven.
>
> So, I want to create an Ivy resolver that talks to this Maven repository. I
> can understand very little about how maven works due to is stellar
> documentation, so maybe some of you can help me translate this into an Ivy
> resolver. Please help me make sense of this.
>
> The pom for my project has this stuff in it.
>
>   <dependencies>
>     <dependency>
>       <groupId>org.jvnet.hudson.main</groupId>
>       <artifactId>hudson-core</artifactId>
>       <version>1.77</version>
>       <scope>provided</scope>
>     </dependency>
>   </dependencies>
>
>   <repositories>
>     <repository>
>       <id>java.net</id>
>       <url>https://maven-repository.dev.java.net/nonav/repository</url>
>       <layout>legacy</layout>
>     </repository>
>     <repository>
>       <id>java.net2</id>
>       <url>https://maven2-repository.dev.java.net/nonav/repository</url>
>     </repository>
>     <repository>
>       <id>hudson-libs</id>
>       <url>
> https://hudson.dev.java.net/source/browse/*checkout*/hudson/hudson/main/lib
> </url>
>       <layout>legacy</layout>
>     </repository>
>
>   </repositories>
>
> I tried to run mvn -X to get some idea of the URLs it hits, and I say this
> float by
> https://maven2-repository.dev.java.net/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-core-1.77.pom
>
> The https://maven2-repository.dev.java.net/nonav/repository/ isn't browsable
> so I'm not sure what the layout is.
> Can anyone help me turn this insanity into ivy?!
I'm not sure, because I'm far from being a maven expert, but I think
that repositories with legacy layout are maven 1 repos and the one
without the legacy layout is maven 2. So if you use a chain of three
ibiblio rep, configured with the proper root, and turn m2compatible
only for the good one, it may work... But I haven't tried myself!

HTH,
Xavier

>
> --
>
> - Eric
>

Re: Help! Help me use a Maven repository!

Posted by Xavier Hanin <xa...@gmail.com>.
Ok, I think you've run in an Ivy bug. The warnings for cookies are
only warnings, what is actually causing the error is that Ivy badly
parse the pom, and use group and artifact id from a plugin instead of
the good ones. Which version of Ivy do you use? I think some bugs like
that have already been fixed, but pom support still needs improvements
and fixes. Search for similar issues in JIRA and if you don't find the
same problem submit your own, and mark it to be resolved in 1.5, maven
2 compatibility is very important for us.

- Xavier

On 3/1/07, Eric Crahen <er...@gmail.com> wrote:
> I tried the ibiblio resolver, but I get some wierd error:
>
> :: Ivy non official version :: http://ivy.jayasoft.org/ ::
> :: configuring :: file = ivyconf.xml
> :: resolving dependencies :: [ amazon.legacy | ${ant.project.name} | 1.0 ]
>         confs: [java.compile]
> Mar 1, 2007 1:03:20 AM
> org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
> WARNING: Cookie rejected: "$Version=0;
> JSESSIONID=F6C8CC6C28DACDF5B995C2D56A4255A3; $Path=/servlets". Illegal path
> attribute "/servlets". Path of origin:
> "/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
> core-1.77.pom"
> Mar 1, 2007 1:03:21 AM
> org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
> WARNING: Cookie rejected: "$Version=0;
> JSESSIONID=23817014601FD0BBD4D2F41C021BDB38; $Path=/servlets". Illegal path
> attribute "/servlets". Path of origin:
> "/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
> core-1.77.pom"
> Mar 1, 2007 1:03:21 AM
> org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
> WARNING: Cookie rejected: "$Version=0;
> JSESSIONID=276F92800A94A7BAA19DFEC73A4F3219; $Path=/servlets". Illegal path
> attribute "/servlets". Path of origin:
> "/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
> core-1.77.pom.sha1"
> Mar 1, 2007 1:03:22 AM
> org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
> WARNING: Cookie rejected: "$Version=0;
> JSESSIONID=E9F48EBFB8A74D4B6C457A2B4DD848D0; $Path=/servlets". Illegal path
> attribute "/servlets". Path of origin:
> "/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
> core-1.77.pom.sha1"
> Mar 1, 2007 1:03:22 AM
> org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
> WARNING: Cookie rejected: "$Version=0;
> JSESSIONID=5F15F70EC125084EE217DD8C69FBB990; $Path=/servlets". Illegal path
> attribute "/servlets". Path of origin:
> "/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
> core-1.77.pom.sha1"
> :: resolution report ::
>
> ---------------------------------------------------------------------
>         |                  |            modules            ||   artifacts
> |
>         |       conf       | number| search|dwnlded|evicted||
> number|dwnlded|
>
> ---------------------------------------------------------------------
>         |   java.compile   |   1   |   0   |   0   |   0   ||   0   |   0
> |
>
> ---------------------------------------------------------------------
>
> :: problems summary ::
> :::: WARNINGS
>                 ::::::::::::::::::::::::::::::::::::::::::::::
>
>                 ::          UNRESOLVED DEPENDENCIES         ::
>
>                 ::::::::::::::::::::::::::::::::::::::::::::::
>
>                 :: [ org.jvnet.hudson.main | hudson-core | 1.77 ]:
> inconsistent module descriptor file found in '
> https://maven2-repository.dev.java.net/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-core-1.77.pom':
> bad organisation: expected='org.jvnet.hudson.main' found='org.codehaus.mojo';
> bad module name: expected='hudson-core' found='build-helper-maven-plugin';
>
> ---
>
> <ivyconf>
>   <conf defaultResolver="test"/>
>   <resolvers>
>     <ibiblio name="test" root="
> https://maven2-repository.dev.java.net/nonav/repository/"
> m2compatible="true"/>
>   </resolvers>
> </ivyconf>
>
> <?xml version="1.0" encoding="utf-8"?>
> <ivy-module version="1.0">
>
>   <info organisation="test" module="test" revision="1.0" status="release"/>
>
>   <configurations>
>     <conf name="java.compile" visibility="public"/>
>   </configurations>
>
>   <publications>
>   </publications>
>
>   <dependencies>
>     <dependency org="org.jvnet.hudson.main" name="hudson-core" rev="1.77"
> conf="java.compile->*"/>
>   </dependencies>
>
> </ivy-module>
>
> On 3/1/07, Xavier Hanin <xa...@gmail.com> wrote:
> >
> > On 2/28/07, Eric Crahen <er...@gmail.com> wrote:
> > > I'm writing some code that is a plugin for this Maven oriented project.
> > I
> > > tried to use Maven, I really did. But it turns out I would rather drink
> > a
> > > glass of lye than use Maven.
> > >
> > > So, I want to create an Ivy resolver that talks to this Maven
> > repository. I
> > > can understand very little about how maven works due to is stellar
> > > documentation, so maybe some of you can help me translate this into an
> > Ivy
> > > resolver. Please help me make sense of this.
> > >
> > > The pom for my project has this stuff in it.
> > >
> > >   <dependencies>
> > >     <dependency>
> > >       <groupId>org.jvnet.hudson.main</groupId>
> > >       <artifactId>hudson-core</artifactId>
> > >       <version>1.77</version>
> > >       <scope>provided</scope>
> > >     </dependency>
> > >   </dependencies>
> > >
> > >   <repositories>
> > >     <repository>
> > >       <id>java.net</id>
> > >       <url>https://maven-repository.dev.java.net/nonav/repository</url>
> > >       <layout>legacy</layout>
> > >     </repository>
> > >     <repository>
> > >       <id>java.net2</id>
> > >       <url>https://maven2-repository.dev.java.net/nonav/repository</url>
> > >     </repository>
> > >     <repository>
> > >       <id>hudson-libs</id>
> > >       <url>
> > >
> > https://hudson.dev.java.net/source/browse/*checkout*/hudson/hudson/main/lib
> > > </url>
> > >       <layout>legacy</layout>
> > >     </repository>
> > >
> > >   </repositories>
> > >
> > > I tried to run mvn -X to get some idea of the URLs it hits, and I say
> > this
> > > float by
> > >
> > https://maven2-repository.dev.java.net/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-core-1.77.pom
> > >
> > > The https://maven2-repository.dev.java.net/nonav/repository/ isn't
> > browsable
> > > so I'm not sure what the layout is.
> > > Can anyone help me turn this insanity into ivy?!
> > I'm not sure, because I'm far from being a maven expert, but I think
> > that repositories with legacy layout are maven 1 repos and the one
> > without the legacy layout is maven 2. So if you use a chain of three
> > ibiblio rep, configured with the proper root, and turn m2compatible
> > only for the good one, it may work... But I haven't tried myself!
> >
> > HTH,
> > Xavier
> >
> > >
> > > --
> > >
> > > - Eric
> > >
> >
>
>
>
> --
>
> - Eric
>

Re: Help! Help me use a Maven repository!

Posted by Eric Crahen <er...@gmail.com>.
I tried the ibiblio resolver, but I get some wierd error:

:: Ivy non official version :: http://ivy.jayasoft.org/ ::
:: configuring :: file = ivyconf.xml
:: resolving dependencies :: [ amazon.legacy | ${ant.project.name} | 1.0 ]
        confs: [java.compile]
Mar 1, 2007 1:03:20 AM
org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
WARNING: Cookie rejected: "$Version=0;
JSESSIONID=F6C8CC6C28DACDF5B995C2D56A4255A3; $Path=/servlets". Illegal path
attribute "/servlets". Path of origin:
"/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
core-1.77.pom"
Mar 1, 2007 1:03:21 AM
org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
WARNING: Cookie rejected: "$Version=0;
JSESSIONID=23817014601FD0BBD4D2F41C021BDB38; $Path=/servlets". Illegal path
attribute "/servlets". Path of origin:
"/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
core-1.77.pom"
Mar 1, 2007 1:03:21 AM
org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
WARNING: Cookie rejected: "$Version=0;
JSESSIONID=276F92800A94A7BAA19DFEC73A4F3219; $Path=/servlets". Illegal path
attribute "/servlets". Path of origin:
"/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
core-1.77.pom.sha1"
Mar 1, 2007 1:03:22 AM
org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
WARNING: Cookie rejected: "$Version=0;
JSESSIONID=E9F48EBFB8A74D4B6C457A2B4DD848D0; $Path=/servlets". Illegal path
attribute "/servlets". Path of origin:
"/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
core-1.77.pom.sha1"
Mar 1, 2007 1:03:22 AM
org.apache.commons.httpclient.HttpMethodBaseprocessResponseHeaders
WARNING: Cookie rejected: "$Version=0;
JSESSIONID=5F15F70EC125084EE217DD8C69FBB990; $Path=/servlets". Illegal path
attribute "/servlets". Path of origin:
"/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-
core-1.77.pom.sha1"
:: resolution report ::

---------------------------------------------------------------------
        |                  |            modules            ||   artifacts
|
        |       conf       | number| search|dwnlded|evicted||
number|dwnlded|

---------------------------------------------------------------------
        |   java.compile   |   1   |   0   |   0   |   0   ||   0   |   0
|

---------------------------------------------------------------------

:: problems summary ::
:::: WARNINGS
                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: [ org.jvnet.hudson.main | hudson-core | 1.77 ]:
inconsistent module descriptor file found in '
https://maven2-repository.dev.java.net/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-core-1.77.pom':
bad organisation: expected='org.jvnet.hudson.main' found='org.codehaus.mojo';
bad module name: expected='hudson-core' found='build-helper-maven-plugin';

---

<ivyconf>
  <conf defaultResolver="test"/>
  <resolvers>
    <ibiblio name="test" root="
https://maven2-repository.dev.java.net/nonav/repository/"
m2compatible="true"/>
  </resolvers>
</ivyconf>

<?xml version="1.0" encoding="utf-8"?>
<ivy-module version="1.0">

  <info organisation="test" module="test" revision="1.0" status="release"/>

  <configurations>
    <conf name="java.compile" visibility="public"/>
  </configurations>

  <publications>
  </publications>

  <dependencies>
    <dependency org="org.jvnet.hudson.main" name="hudson-core" rev="1.77"
conf="java.compile->*"/>
  </dependencies>

</ivy-module>

On 3/1/07, Xavier Hanin <xa...@gmail.com> wrote:
>
> On 2/28/07, Eric Crahen <er...@gmail.com> wrote:
> > I'm writing some code that is a plugin for this Maven oriented project.
> I
> > tried to use Maven, I really did. But it turns out I would rather drink
> a
> > glass of lye than use Maven.
> >
> > So, I want to create an Ivy resolver that talks to this Maven
> repository. I
> > can understand very little about how maven works due to is stellar
> > documentation, so maybe some of you can help me translate this into an
> Ivy
> > resolver. Please help me make sense of this.
> >
> > The pom for my project has this stuff in it.
> >
> >   <dependencies>
> >     <dependency>
> >       <groupId>org.jvnet.hudson.main</groupId>
> >       <artifactId>hudson-core</artifactId>
> >       <version>1.77</version>
> >       <scope>provided</scope>
> >     </dependency>
> >   </dependencies>
> >
> >   <repositories>
> >     <repository>
> >       <id>java.net</id>
> >       <url>https://maven-repository.dev.java.net/nonav/repository</url>
> >       <layout>legacy</layout>
> >     </repository>
> >     <repository>
> >       <id>java.net2</id>
> >       <url>https://maven2-repository.dev.java.net/nonav/repository</url>
> >     </repository>
> >     <repository>
> >       <id>hudson-libs</id>
> >       <url>
> >
> https://hudson.dev.java.net/source/browse/*checkout*/hudson/hudson/main/lib
> > </url>
> >       <layout>legacy</layout>
> >     </repository>
> >
> >   </repositories>
> >
> > I tried to run mvn -X to get some idea of the URLs it hits, and I say
> this
> > float by
> >
> https://maven2-repository.dev.java.net/nonav/repository/org/jvnet/hudson/main/hudson-core/1.77/hudson-core-1.77.pom
> >
> > The https://maven2-repository.dev.java.net/nonav/repository/ isn't
> browsable
> > so I'm not sure what the layout is.
> > Can anyone help me turn this insanity into ivy?!
> I'm not sure, because I'm far from being a maven expert, but I think
> that repositories with legacy layout are maven 1 repos and the one
> without the legacy layout is maven 2. So if you use a chain of three
> ibiblio rep, configured with the proper root, and turn m2compatible
> only for the good one, it may work... But I haven't tried myself!
>
> HTH,
> Xavier
>
> >
> > --
> >
> > - Eric
> >
>



-- 

- Eric