ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Lalevée <nicolas.lale...@hibnet.org>
Subject Re: Add a maven repository to ivy
Date Sun, 27 Feb 2011 00:16:54 GMT

Le 26 févr. 2011 à 21:06, Filipe Sousa a écrit :

> Nicolas Thanks for the quick response. I was about to give up on ivy.
> 
> It works but now I have another problem. Before that I could get
> guava, now I'm just able get the iText.
> 
> <ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
> 	<info organisation="pt.ipb" module="foo" status="integration"
> revision="1.0.0"/>
> 	<dependencies>
> 		<dependency org="com.google.guava" name="guava" rev="r08" />
> 		<dependency org="com.itextpdf" name="itextpdf" rev="5.0.6" />
> 	</dependencies>
> </ivy-module>
> 
> ...
> [ivy:retrieve] :::: WARNINGS
> [ivy:retrieve] 		module not found: com.google.guava#guava;r08
> ...


I assume you want the guava from the main maven repository. Then you'll need to use a chain
resolver which resolve on both maven repository:

<ivysettings>
 <settings defaultResolver="maven-chain" />
 <resolvers>
   <ibiblio name="maven" />
   <ibiblio name="maven-itextpdf" root="http://maven.itextpdf.com/" m2compatible="true"
/>
   <chain name="maven-chain" returnFirst="true">
    <resolver ref="maven" />
    <resolver ref="maven-itextpdf" />
   </chain>
 </resolvers>
</ivysettings>

Nicolas


> 
> 2011/2/26 Nicolas Lalevée <nicolas.lalevee@hibnet.org>:
>> 
>> Le 26 févr. 2011 à 20:04, Filipe Sousa a écrit :
>> 
>>> Since no one knows how to do it and I have not found a way to do it,
>>> I'll assume that ivy-2.2.0 does not support it.
>> 
>> It does support maven repositories but not OSGi dependencies.
>> 
>> I think that this piece of xml should work:
>> 
>> <ivysettings>
>>  <settings defaultResolver="maven-itextpdf" />
>>  <resolvers>
>>    <ibiblio name="maven-itextpdf" root="http://maven.itextpdf.com/" m2compatible="true"
/>
>>  </resolvers>
>> </ivysettings>
>> 
>> Nicolas
>> 
>> 
>>> 
>>> Thanks.
>>> 
>>> On Sat, Jan 29, 2011 at 12:12 PM, Filipe Sousa <natros@gmail.com> wrote:
>>>> Hi,
>>>> 
>>>> I'm trying ivy for eclipse. It's very easy to use, however I do not
>>>> know how to use a different maven repository. The repository I'm
>>>> interesting is the http://maven.itextpdf.com
>>>> 
>>>> It seems that I have to create a ivysesstings.xml to use this
>>>> repository, but I do not know how.
>>>> 
>>>> At the root of the eclipse project, I have a ivy.xml and an empty
>>>> ivysettings.xml.
>>>> What should I put in ivysettings.xml?
>>>> 
>>>> ---------- pom.xml ----------
>>>> <project [..default xml namespace details..]>
>>>> 
>>>>  [..project-details..]
>>>> 
>>>>  <repositories>
>>>>    <repository>
>>>>      <id>itextpdf.com</id>
>>>>      <name>Maven Repository for iText</name>
>>>>      <url>http://maven.itextpdf.com/</url>
>>>>    </repository>
>>>>    [..other repository locations..]
>>>>  </repositories>
>>>> 
>>>>  <dependencies>
>>>>    <dependency>
>>>>      <groupId>com.itextpdf</groupId>
>>>>      <artifactId>itextpdf</artifactId>
>>>>      <version>5.0.2</version>
>>>>      <scope>compile</scope>
>>>>    </dependency>
>>>>    [..other package dependency..]
>>>>  </dependencies>
>>>> </project>
>>>> -----------------------------
>>>> 
>>>> Thanks
>>>> --
>>>> Filipe Sousa
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Filipe Sousa
>> 
>> 
> 
> 
> 
> -- 
> Filipe Sousa


Mime
View raw message