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 steve neo <st...@gmail.com> on 2007/03/01 14:22:12 UTC

how can I use maven2 repository?

My basic idea is create ivy.xml file to get artifact from maven2
repository. For example, for hibernate, I create a ivy.xml

<ivy-module version="1.1">
<info organization="hibernate" module="hibernate" revision="3.2">
<dependencies>
....
</dependencies>
</ivy-module>


I will put this ivy.xml to my private server, e.g.,
"www.myserver.com/ivyrep/hibernate/hibernate/3.2/ivy-3.2.xml"

I don't want to put hibernate-3.2.jar file into my repository. I hope
ivy could get hibernate jar file from lbiblio maven2 repository  as
well, like its dependencies.

But, whatever I tried, ivy always try to get hibernate jar file from
my server. It is quite frustrated.

So, my questions are,  could ivy use maven2 repository seamless? How?
Does ivy.xml file must be deployed with a corresponding jar file?

Best,
Steve Ni

Re: how can I use maven2 repository?

Posted by Xavier Hanin <xa...@gmail.com>.
On 3/1/07, steve neo <st...@gmail.com> wrote:
> My basic idea is create ivy.xml file to get artifact from maven2
> repository. For example, for hibernate, I create a ivy.xml
>
> <ivy-module version="1.1">
> <info organization="hibernate" module="hibernate" revision="3.2">
> <dependencies>
> ....
> </dependencies>
> </ivy-module>
>
>
> I will put this ivy.xml to my private server, e.g.,
> "www.myserver.com/ivyrep/hibernate/hibernate/3.2/ivy-3.2.xml"
>
> I don't want to put hibernate-3.2.jar file into my repository. I hope
> ivy could get hibernate jar file from lbiblio maven2 repository  as
> well, like its dependencies.
>
> But, whatever I tried, ivy always try to get hibernate jar file from
> my server. It is quite frustrated.
Did you follow the dual resolver tutorial
(http://incubator.apache.org/ivy/doc/tutorial/dual.html) ? It should
give you a good idea of how to use your repository for ivy files and
another for artifacts.

>
> So, my questions are,  could ivy use maven2 repository seamless? How?
Ivy is able to use maven2 repositories, but it still suffer from some
pom incompatibilities. The easiest is to use <ibilio
m2compatible="true"/> as your resolver, and it should be enough.

> Does ivy.xml file must be deployed with a corresponding jar file?
Ivy can use m2 poms, even if it's not always the best thing to do,
since many poms are wrong or give you too much dependencies. But you
can work with ivy files for some projects and poms for others, this
works pretty well. The most difficult is if the metadata you use do
not have the same naming conventions (org.apache vs apache for
instance). In this case you can use Ivy namespaces to deal with that
issue (there's a good tutorial for that).

HTH,

Xavier

>
> Best,
> Steve Ni
>