ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From normand gagnon <letr...@gmail.com>
Subject Re: ivy problem with branch attribute
Date Thu, 04 Mar 2010 21:45:30 GMT
It is caused by the way you configured the repository you use for
publishing.  I ran into the same issue, where Ivy is using the
"latest.integration" revision of a given dependency with no regards to the
branch even if I've specified one.  Then, if that "latest.integration"
happened to be from another branch, I got the same error as you.

To fix that, you need to look at you repository resolver, mine used to look
like that:

        <filesystem name="local">
            <ivy
pattern="${ivy.settings.dir}/local/[module]/ivy-[revision].xml"/>
            <artifact
pattern="${ivy.settings.dir}/local/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
        </filesystem>

I had to add the token "[branch]" in each pattern, so Ivy would correctly
resolve all modules of a given branch and then get the latest revision from
them.  So, it became:

        <filesystem name="local">
            <ivy
pattern="${ivy.settings.dir}/local/[branch]/[module]/ivy-[revision].xml"/>
            <artifact
pattern="${ivy.settings.dir}/local/[branch]/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
        </filesystem>

It means also I had to reconstruct my repository... problably that you could
use the "install" ant task to rebuild you repository with that new "branch"
token.

If no "branch" is specified in your dependency or ivy file, the default one,
if any, will be used.  You can specify a default branch in the
ivysettings.xml .




On Thu, Mar 4, 2010 at 10:02 AM, Ruault Gaetan <gruault@sopragroup.com>wrote:

>
> hi,
>
> I have a problem when i try to resolve dependancies with branch.
>
> Here i explain my case.
>
> if have in an Artifactory  repository
> theses revisions  for an "Entity" module like this:
>
> Entity   rev =1.1.21-snapshot-20100302120000  branch=DEV
> Entity   rev =1.1.21-snapshot-20100302140000  branch=INT  (this is the last
> published version)
>
>
>
> then when i try to resolve/retrieve  dependancies for a module with this
> dependancy it's works :
>
> <dependency org="xxx.xxxx" name="Entite" rev="[1.1.20,)" branch="INT" />
>
> ivy resolve/retrieve get the last revision ( rev
> =1.1.21-snapshot-20100302140000  branch=INT )
>
>
> but when i have a module with this dependancy  , it doesn't works :
>
> <dependency org="xxx.xxxx" name="Entite" rev="[1.1.20,)" branch="DEV" />
>
>
> I get this error message :
>
> :: smacl.urbanisation#Entite#DEV;[1.1.20,): java.text.ParseException:
> inconsistent module descriptor file found in 'http://wwww.xxxxxx.lan:8080/artifactory/virt-repo-snapshots/xxxxxx/urbanisation/Entite/1.1.21-SNAPSHOT-20100302140000-INT/Entite-1.1.21-SNAPSHOT-20100302140000-INT-ivy.xml':
> bad branch name: expected='DEV' found='INT';
>
> is like ivy doesn't use branch attribute to make the resolve.
>
>
> Have you any idea to solve my problem ?
>
>
> thanks for your help
>
> Gaetan
>
>
>
>
>
>
>
>
>
>
> Gaëtan RUAULT
> Ingenieur d'étude et développement
> Sopra group.
> 28, rue Léo Lagrange 79000 Niort
> Phone : +33 (0)5 49 77 38 20
> gruault@sopragroup.com - www.sopragroup.com
> Ce message peut contenir des informations confidentielles dont la
> divulgation est à ce titre rigoureusement interdite en l'absence
> d'autorisation explicite de l'émetteur. Dans l'hypothèse où vous auriez reçu
> par erreur ce message, merci de le renvoyer à l'émetteur et de détruire
> toute copie.
>
> P Pensez à l'environnement avant d'imprimer.
>
>

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