ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Garima Bathla <garima.bat...@gmail.com>
Subject Re: Building a little bit more advanced repository, any tutorial or information out there?
Date Fri, 08 May 2009 16:08:37 GMT
OK; Seems like a scenario which should be very common? Most of the teams
will not want to depend on public repository all the time - what if  a
developer wants to work offline with  no internet access without messing
around with settings?

I am no IVY expert - but below is a sure shot solution that my colleague has
implemented for our team to work in similar model - go to public repository
only when it is needed.

So we have 3 types of repositories:

1. Thirdparty repositories - where we publish third-party jars that do not
exist on any public repository - we convert them to an ivy module and
publish.
2. Internal repository - where we publish all our teams specific modules .
3. public repository - used to resolve the rest of the modules ( we depend
on spring source repo).

So in your case first of all if you can build company repository
successfully then I assume you will want Ivy to resolve in below order

1. Try  Company repository ( with ibiblio modules and thirdparty modules?)
2. Try ibiblio repository

So in your ivysettings you can define new resolvers i.e.

Shared resolver using company repository to resolve modules
Public resolver using ibiblio to resolve modules

and then chain them

<chain name="chain-resolver" returnFirst="true"
   <resolver ref="shared-resolver"
  <resolver ref="public-resolver">
</chain>

So you will have to modify ivysettings.xml and not ivy.xml.  I hope you do
have ivysettings.xml?

HTH,

Garima.




On Fri, May 8, 2009 at 4:25 AM, Kent Larsson <kent.larsson@gmail.com> wrote:

> Hi,
>
> I have an ivy.xml which looks something like: (for proper formatting:
> http://pastebin.com/f21948262 )
>
> <?xml version="1.0" encoding="UTF-8"?>
> <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="net.mycompany"
>          module="webcollab"
>          status="integration"/>
>        <configurations>
>                <conf name="runtime" description="" />
>                <conf name="compile" extends="runtime" description="" />
>        </configurations>
>        <dependencies>
>                <dependency org="org.apache.wicket" name="wicket"
> rev="1.3.5"
> conf="runtime->default;foride->sources,javadoc">
>                        <exclude org="org.apache.portals.bridges"
> module="portals-bridges-common"/>
>                        <exclude org="javax.portlet" module="portlet-api"/>
>                </dependency>
>                <dependency org="junit" name="junit" rev="4.5"
> conf="runtime->default;foride->sources,javadoc" />
>                <dependency org="org.apache.wicket"
> name="wicket-spring-annot"
> rev="1.3.5" conf="runtime->default;foride->sources,javadoc"/>
>                <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.5.6"
> conf="runtime->default;foride->sources,javadoc"/>
>                <dependency org="org.slf4j" name="jcl-over-slf4j"
> rev="1.5.6"
> conf="runtime->default;foride->sources,javadoc"/>
>                <!-- Some dependencies removed -->
>        </dependencies>
> </ivy-module>
>
> My current ivy.xml uses the default repository ibiblio in Maven2-mode.
>
> What I would like is:
>
> 1. Have a company repository with copies of everything I usually take
> from ibiblio.
>
> 2. Also have some JAR's in that repository which are not in ibiblio,
> like JavaMail and Activation, both from Sun.
>
> 3. In the Ivy resolution on the client machines, try the company
> repository first, then try ibiblio.
>
> Motivation for 3 is that if I add something to my ivy.xml which is
> available in ibiblio I could get it directly, while my company
> repository might be synchronized with ibiblio once each day. Also if
> my company repository is down it might be nice to fall back on ibiblio
> for non licensed files (and hope that JavaMail etc is in the local
> cache already).
>
> Is there any information out there for this scenario? It seems like it
> would be a common scenario. I can't find any, and I don't know where
> to start. If I just can get some more information I'll try to create a
> blog post about it or something, in case there is a lack of
> information on the net.
>
> Thank you for reading! I hope you can help me out. Have a nice weekend!
>
> Best regards, Kent
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message