Hello,

Problem scenario:

Step 1) Project "nr" has a dependency on Project "ad".

Step 2) I check out my working copy of both project "nr" and project "ad" in
Eclipse workspace.

Step 3) I make my changes to project "ad" in my workspace and publish it
using a local resolver into my local filesystem using a "local" resolver
like this:

In ivy.xml of project "ad", I declare revision="CURRENT" like this:

<info organisation="ofac" module="ad" revision="CURRENT"/>

In my common.xml, I publish to the local repository like this:

<target name="publish-war-en-locale" depends="make-war-en-locale"
description="-> publish this project's war and its sources in the local user
repository">            
                <ivy:publish resolver="local"
artifactspattern="[type]/[artifact](-[revision]).[ext]"
pubrevision="${revision}"/>
        </target>

After publishing of "ad" is successful in my "local" repository, I get the
following:

publish-war-en-locale:
[ivy:publish] :: delivering :: [ ofac | ad | CURRENT ] :: CURRENT ::
integration :: Tue Aug 28 13:15:17 CEST 2007
[ivy:publish] delivering ivy file to ivy/ivy-CURRENT.xml
[ivy:publish] :: publishing :: [ ofac | ad ]
[ivy:publish] published ad to
c:\myrep/local/ofac/ad/CURRENT/sources/ad-CURRENT.src.jar
[ivy:publish] published ad to
c:\myrep/local/ofac/ad/CURRENT/wars/ad-CURRENT.war
[ivy:publish] published ivy to c:\myrep/local/ofac/ad/CURRENT/ivys/ivy.xml
BUILD SUCCESSFUL

step 4) Resolve/retrieve project "ad" which I recently published to my
"local" repository (revision="CURRENT") from project "nr" like this:

project "nr" ivy.xml:

<ivy-module version="1.0">
 <info organisation="ofac" module="nr" revision="prod"/>
<configurations>
        <conf name="compile" description="compile-time deps only" 
transitive="true"
visibility="public"/>
        <conf name="run" description="run-time deps only, also used for creating
and publishing an artifact" transitive="false" visibility="public"/>
</configurations>
<publications>
        <artifact name="nr" type="war"/>
        <artifact name="nr" type="source" ext="src.jar"/>
</publications>
 <dependencies>    
    <dependency org="ofac" name="ad" rev="CURRENT" conf="compile">
        <artifact name="ad" type="war"/>
    </dependency>   
 </dependencies>
 <conflicts>
    <manager name="ofac-cm" org="ofac"/>
    <manager name="latest-revision" org="(?!ofac).*"/>
 </conflicts>
</ivy-module>

In common.xml, when I launch "retrieve-compile" like this:

<target name="retrieve-compile" depends="init" description="-> retrieve
compile-time dependencies in the lib folder of this project, if it doesnt
exist, create it">
                <fail>
                        Il n'y a pas de fichier ivy.xml dans ce projet
                        <condition>
                                <not>
                                        <available file="${basedir}/ivy.xml" 
type="file" />
                                </not>
                        </condition>
                </fail>
                <mkdir dir="${compile.conf.dir}" />
                <ivy:retrieve 
pattern="${compile.conf.dir}/[artifact](-[revision]).[ext]"
type="jar,war" conf="compile"/>
        </target>

I get the following error on the console:

[ivy:retrieve] :: evicted modules:
[ivy:retrieve] [ ofac | ad | prod ] by [[ ofac | ad | CURRENT ]] in
[compile]
---------------------------------------------------------------------
|                  |            modules            ||   artifacts   |
|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
|      compile     |  159  |   0   |   0   |   1   ||  208  |   0   |
---------------------------------------------------------------------

[ivy:retrieve] module not found: [ ofac | ad | CURRENT ]
[ivy:retrieve] internal: tried I:/shared/ofac/ad/CURRENT/ivys/ivy.xml
[ivy:retrieve] internal: tried artifact [ ofac | ad | CURRENT ]/ad.war[war]:
[ivy:retrieve] I:/shared/ofac/ad/CURRENT/wars/ad-CURRENT.war

[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: [ ofac | ad | CURRENT ]: not found
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

BUILD FAILED
C:\ivylivraison\24082007\common.xml:88: impossible to resolve dependencies:
resolve failed - see output for details

I have defined a chain like this in my ivyconf.xml:

<resolvers checksums="false">
         <chain name="chainresolver" returnFirst="true">
          <!-- resolver for local artifacts in local filesystem -->
                <filesystem name="local">
      <ivy
pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
      <artifact
pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}" />
    </filesystem>
          <!-- resolver for OFAC internal artifacts in the cellar -->
                <filesystem name="internal">
                        <ivy
pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
/>
                        <artifact
pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact](-[revision]).[ext]"
/>
                </filesystem>
                <!-- resolver for external third party artifacts in the cellar 
-->
                <filesystem name="thirdparty">
                        <ivy
pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
/>
                        <artifact
pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
/>
                </filesystem>               
    </chain>
        </resolvers>

I am not referencing "chainresolver" specified here in my common.xml in any
of the targets. Is this the right way to do it ? 

I dont know why Ivy doesnt find my ad-CURRENT artifacts in the "local"
repository. It seems to be searching in thirdparty and/or shared repository
only.

Any help would be welcome.

thanks



-- 
View this message in context: 
http://www.nabble.com/problem-resolving-retrieving-using-a-chain-resolver-tf4341279.html#a12366464
Sent from the ivy-user mailing list archive at Nabble.com.

Reply via email to