Hi,

I have the following IvySettings.xml

<ivysettings>
        <properties environment="env." override="false"/>
    <caches
        defaultCacheDir="${env.WORKSPACE}/.ivy/default.cache"
        resolutionCacheDir="${env.WORKSPACE}/.ivy/resolution.cache"
    />
    
    <settings defaultResolver="default"/>
        <include file="${ivy.default.settings.dir}/ivysettings-public.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
    <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>

    <resolvers>
            <filesystem name="jenkins-local" local="true">
                <ivy      
pattern="${output.dir}/ivy/repo/[organisation]/[conf]/[module]/[revision]/ivy.xml"
 />
                <artifact 
pattern="${output.dir}/ivy/repo/[organisation]/[conf]/[module]/[revision]/[type]s/[artifact].[ext]"
 />
            </filesystem>
        <url name="jenkins-url">
                <ivy      
pattern="${env.Jenkins.Repository}artifact/output/ivy/repo/[organisation]/[conf]/[module]/[revision]/ivy.xml"
 />
                 <artifact 
pattern="${env.Jenkins.Repository}artifact/output/ivy/repo/[organisation]/[conf]/[module]/[revision]/[type]s/[artifact].[ext]"
 />
        </url>
        <chain name="default" returnFirst="true">
                <resolver ref="jenkins-url" />
                <resolver ref="local"/>
                <resolver ref="main"/>
        </chain>
    </resolvers>
</ivysettings>


 I publish to the Jenkins-Local resolver in a Jenkins Job, and then access that 
via the Jenkins-Url in another job via a Url (the env.Jenkins.Repository) which 
includes the build number.

When i do a resolve from the downstream build, i receive a '-1' HTTP status 
error from the Jenkins-Url resolver - the file is available at the URL 
presented to the resolver, but is not being downloaded.

The layout of the directory is - 

artifact 
        - output 
                - ivy 
                        - repo 
                                - ProjectLottery
                                        - default
                                                - 1.0
                                                        - ivy.xml
                                                        - ivy.xml.md5
                                                        - ivy.xml.sha1
                                                        - jars
                                                                - 
Project1Lottery.jar
                                                                - 
Project1Lottery.jar.md5
                                                                - 
Project1Lottery.jar.sha1


Upstream ivy.xml

<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="acme"
        module="Project1Lottery">
        </info>
        <configurations defaultconf="default">
                <conf name="default" />
                <conf name="test" extends="default" />
                <conf name="runtime" />
        </configurations>
        <publications>
      <artifact name="Project1Lottery" type="jar" ext="jar" conf="default" />
    </publications>
        <dependencies>
        <dependency org="org.easymock" name="easymock" rev="3.1" 
conf="test->default" />
        <dependency org="junit" name="junit" rev="4.10" conf="test->default" />
    </dependencies>
</ivy-module>

Downstream ivy.xml

<?xml version="1.0" encoding="ISO-8859-1"?>

<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="acme"
        module="Project1LotteryAcceptanceTests">
        </info>
        <configurations defaultconf="test">
                <conf name="test" />
        </configurations>
        <dependencies>
        <dependency org="junit" name="junit" rev="4.10" conf="test->default" />
        <dependency org="acme" name="Project1Lottery" rev="1.0" 
conf="test->default" />
    </dependencies>
</ivy-module>



------------------------------------------------


[ivy:resolve] jenkins-url: found md file for camelot#Project1Lottery;1.0 
[ivy:resolve] => 
http://localhost:8080/job/Project1LotteryPuzzle/192/artifact/output/ivy/repo/camelot/default/Project1Lottery/1.0/ivy.xml
 (1.0) [ivy:resolve] parser = ivy parser Finding class 
org.apache.ivy.core.cache.DefaultRepositoryCacheManager$BackupResourceDownloader
 Loaded from C:\Program Files 
(x86)\Jenkins\jobs\Project1LotteryAcceptanceTests\workspace\Build\tools\ivy-2.3.0-rc1.jar
 
org/apache/ivy/core/cache/DefaultRepositoryCacheManager$BackupResourceDownloader.class
 Class 
org.apache.ivy.core.cache.DefaultRepositoryCacheManager$BackupResourceDownloader
 loaded from ant loader (parentFirst) [ivy:resolve] no ivy file in cache for 
camelot#Project1Lottery;1.0: tried C:\Program Files 
(x86)\Jenkins\jobs\Project1LotteryAcceptanceTests\workspace\.ivy\default.cache\camelot\Project1Lottery\ivy-1.0.xml
 Finding class org.apache.ivy.core.cache.DefaultRepositoryCacheManager$1 Loaded 
from C:\Program Files 
(x86)\Jenkins\jobs\Project1LotteryAcceptanceTests\workspace\Build\tools\ivy-2.3.0-rc1.jar
 org/apache/ivy/core/cache/DefaultRepositoryCacheManager$1.class Class 
org.apache.ivy.core.cache.DefaultRepositoryCacheManager$1 loaded from ant 
loader (parentFirst) [ivy:resolve] downloading 
http://localhost:8080/job/Project1LotteryPuzzle/192/artifact/output/ivy/repo/camelot/default/Project1Lottery/1.0/ivy.xml
 ... [ivy:resolve] jenkins-url: downloading 
http://localhost:8080/job/Project1LotteryPuzzle/192/artifact/output/ivy/repo/camelot/default/Project1Lottery/1.0/ivy.xml
 [ivy:resolve] to C:\Program Files 
(x86)\Jenkins\jobs\Project1LotteryAcceptanceTests\workspace\.ivy\default.cache\camelot\Project1Lottery\ivy-1.0.xml.original.part
 Class java.lang.Long loaded from parent loader (parentFirst) [ivy:resolve] 
HTTP response status: -1 
url=http://localhost:8080/job/Project1LotteryPuzzle/192/artifact/output/ivy/repo/camelot/default/Project1Lottery/1.0/ivy.xml
 [ivy:resolve] [FAILED ] camelot#Project1Lottery;1.0!ivy.xml(ivy.original): The 
HTTP response code for 
http://localhost:8080/job/Project1LotteryPuzzle/192/artifact/output/ivy/repo/camelot/default/Project1Lottery/1.0/ivy.xml
 did not indicate a success. See log for more detail. (0ms) [ivy:resolve] WARN: 
problem while downloading module descriptor: 
http://localhost:8080/job/Project1LotteryPuzzle/192/artifact/output/ivy/repo/camelot/default/Project1Lottery/1.0/ivy.xml:
 The HTTP response code for 
http://localhost:8080/job/Project1LotteryPuzzle/192/artifact/output/ivy/repo/camelot/default/Project1Lottery/1.0/ivy.xml
 did not indicate a success. See log for more detail. (0ms) [ivy:resolve] no 
ivy file in cache for camelot#Project1Lottery;1.0: tried C:\Program Files (x86)




The publish appears to be fine, and the jars publish fine to the local 
filesystem jenkins-local repo.  The md5 file appears to be found, its just the 
ivy.xml file returns a -1.

Any ideas?

Cheers

Aaron



                                                                



Reply via email to