You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Anton Passiouk (JIRA)" <ji...@apache.org> on 2008/02/27 18:41:51 UTC

[jira] Updated: (IVY-630) Resolution failure when no ivy.xml file present

     [ https://issues.apache.org/jira/browse/IVY-630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anton Passiouk updated IVY-630:
-------------------------------

    Attachment: build-a-ivy-repository.zip

Hi
I'm trying to install artifacts from a module with no ivy.xml using ivy 2.0.0-beta1 and it still does not seem to work :-(

I'm new to Ivy so I just took the "build-a-ivy-repository" example project and added a FileSystem resolver to the settings file.

The produced result is:
===============================
C:\Projets\build-a-ivy-repository>ant ingalys
Buildfile: build.xml

load-ivy:

init-ivy:

ingalys:
[ivy:install] :: Ivy 2.0.0-beta1 - 20071206070608 :: http://ant.apache.org/ivy/
::
:: loading settings :: file = C:\Projets\build-a-ivy-repository\settings\ivysettings-basic.xml
[ivy:install] :: installing com.ingalys#framework;1.3.12 ::
[ivy:install] :: resolving dependencies ::
[ivy:install] :: downloading artifacts to cache ::
[ivy:install] :: installing in my-repository ::
[ivy:install] :: install resolution report ::
[ivy:install] :: resolution report :: resolve 0ms :: artifacts dl 0ms
        ---------------------------------------------------------------------
        |                  |            modules            ||   artifacts   |
        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
        ---------------------------------------------------------------------
        |      default     |   1   |   0   |   0   |   0   ||   0   |   0   |
        ---------------------------------------------------------------------

BUILD FAILED
C:\Projets\build-a-ivy-repository\build.xml:67: Problem happened while installing modules - see output for details

Total time: 0 seconds
===============================

when I put an ivy.xml file in my module's directory, the build is successfull:

===============================
C:\tmp\build-a-ivy-repository>ant ingalys
Buildfile: build.xml

load-ivy:

init-ivy:

ingalys:
[ivy:install] :: Ivy 2.0.0-beta1 - 20071206070608 :: http://ant.apache.org/ivy/
::
:: loading settings :: file = C:\tmp\build-a-ivy-repository\settings\ivysettings-basic.xml
[ivy:install] :: installing com.ingalys#framework;1.3.12 ::
[ivy:install] :: resolving dependencies ::
[ivy:install]   found com.ingalys#framework;1.3.12 in internal-ingalys
[ivy:install] :: downloading artifacts to cache ::
[ivy:install] downloading C:\tmp\build-a-ivy-repository\ing-repository\com.ingalys\framework\1.3.12\imc-tools-j5.jar ...
[ivy:install] .. (63kB)
[ivy:install]   [SUCCESSFUL ] com.ingalys#framework;1.3.12!imc-tools-j5.jar (0ms)
[ivy:install] :: installing in my-repository ::
[ivy:install]   published imc-tools-j5 to C:\tmp\build-a-ivy-repository/myrepository/no-namespace/com.ingalys/framework/imc-tools-j5-1.3.12.jar
[ivy:install]   published ivy to C:\tmp\build-a-ivy-repository/myrepository/no-namespace/com.ingalys/framework/ivy-1.3.12.xml
[ivy:install] :: install resolution report ::
[ivy:install] :: resolution report :: resolve 0ms :: artifacts dl 0ms
        ---------------------------------------------------------------------
        |                  |            modules            ||   artifacts   |
        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
        ---------------------------------------------------------------------
        |      default     |   1   |   1   |   0   |   0   ||   1   |   1   |
        ---------------------------------------------------------------------

BUILD SUCCESSFUL
Total time: 1 second
==================================

Can you advise if the bug is still present or I misused something?

> Resolution failure when no ivy.xml file present
> -----------------------------------------------
>
>                 Key: IVY-630
>                 URL: https://issues.apache.org/jira/browse/IVY-630
>             Project: Ivy
>          Issue Type: Bug
>    Affects Versions: 2.0.0-alpha-2
>         Environment: 2.0.0-alpha2-incubating
> Ant 1.7.0
> Sun JDK 1.5.0_12
>            Reporter: Anil Gangolli
>            Assignee: Maarten Coene
>             Fix For: 2.0.0-beta-1
>
>         Attachments: build-a-ivy-repository.zip, ivytest-630.tgz
>
>
> In 1.4.1, the filesystem resolver with an ivy pattern element seems to have had no trouble finding (jar) artifacts that lacked a corresponding ivy.xml.  In 2.0.0-alpha2-incubating, I'm getting resolution failures with the complaint that the ivy.xml file isn't found.
> Here is my resolvers definition:
>  <resolvers>
>    <!-- We define two resolvers and chain them to form our normal resolver.
>         The first is for thirdparty libraries, and the second is for libraries we build ourselves.
>         The chain looks first in thirdparty libraries, and then in ours.  The first found is used. -->
>    <filesystem name="thirdparty-libs">
>      <ivy pattern="${top.dir}/thirdparty/libraries/[module](-[revision])/ivy.xml"/>
>      <!-- Patterns for thirdparty libs; in preferred resolution ordering. -->
>      <artifact pattern="${top.dir}/thirdparty/libraries/[module]-[revision]/dist/[artifact]-[revision].[ext]"/>
>      <artifact pattern="${top.dir}/thirdparty/libraries/[module]-[revision]/dist/[artifact].[ext]"/>
>      <artifact pattern="${top.dir}/thirdparty/libraries/[module]/dist/[artifact].[ext]"/>
>      <!-- Also supported patterns: resolution of artifacts grouped by organization and module or only organization. -->
>      <artifact pattern="${top.dir}/thirdparty/libraries/[organisation]/[module]/dist/[artifact].[ext]"/>
>      <artifact pattern="${top.dir}/thirdparty/libraries/[organisation]/dist/[artifact].[ext]"/>
>    </filesystem>
>    <filesystem name="our-libs">
>      <ivy pattern="${top.dir}/libraries/[module]/ivy.xml"/>
>      <!-- Ivy bug or lack of understanding: using optional revision (-[revision]) here doesn't work right.
>           So we need two separate patterns. -->
>      <artifact pattern="${top.dir}/libraries/[module]/build/dist/[organisation]-[artifact]-[revision].[ext]"/>
>      <artifact pattern="${top.dir}/libraries/[module]/build/dist/[organisation]-[artifact].[ext]"/>
>      <artifact pattern="${top.dir}/libraries/[module]/build/dist/[artifact]-[revision].[ext]"/>
>      <artifact pattern="${top.dir}/libraries/[module]/build/dist/[artifact].[ext]"/>
>    </filesystem>
>    <chain name="localtree" returnFirst="true">
>      <resolver ref="thirdparty-libs"/>
>      <resolver ref="our-libs"/>
>    </chain>
>  </resolvers>
> Here is an example resolution failure that didn't fail in 1.4.1:
> [ivy:retrieve]
> [ivy:retrieve] :: problems summary ::
> [ivy:retrieve] :::: WARNINGS
> [ivy:retrieve]  problem while downloading ivy file: /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/thirdparty/libraries/log4j-1.2.9/ivy.xml to /tmp/ivy13245xml: /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/thirdparty/libraries/log4j-1.2.9/ivy.xml (No such file or directory)
> [ivy:retrieve]          module not found: [ apache | log4j | latest.integration ]
> [ivy:retrieve]  ==== thirdparty-libs: tried
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/thirdparty/libraries/log4j-latest.integration/ivy.xml
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/thirdparty/libraries/log4j-[revision]/ivy.xml
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/thirdparty/libraries/log4j-1.2.9/ivy.xml
> [ivy:retrieve]  ==== our-libs: tried
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/ivy.xml
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/ivy.xml
> [ivy:retrieve]    -- artifact [ apache | log4j | latest.integration ]/log4j.jar[jar]:
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/build/dist/apache-log4j-latest.integration.jar
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/build/dist/apache-log4j-[revision].jar
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/build/dist/apache-log4j.jar
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/build/dist/apache-log4j.jar
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/build/dist/log4j-latest.integration.jar
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/build/dist/log4j-[revision].jar
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/build/dist/log4j.jar
> [ivy:retrieve]    /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/libraries/log4j/build/dist/log4j.jar
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          ::          UNRESOLVED DEPENDENCIES         ::
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]          :: [ apache | log4j | latest.integration ]: not found
> [ivy:retrieve]          ::::::::::::::::::::::::::::::::::::::::::::::
> [ivy:retrieve]
> [ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
> BUILD FAILED
> The jar artifact in question is at
> /work/gangolli/p4work/XXX-branches/dev/buildsys/XXX/thirdparty/libraries/log4j-1.2.9/dist/log4j-1.2.9.jar
> This resolution worked in 1.4.1, but not 2.0.0-alpha2.
> Additional information:  
> - explicitly setting allownomd=true on the thirdparty-libs resolver did not seem to have helped.
> - adding another resolver to the chain "thirdparty-libs-noivy" with the same artifact patterns but with no ivy element worked as a workaround to this issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.