[
https://issues.apache.org/jira/browse/IVY-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16669915#comment-16669915
]
Sebastian Nagel commented on IVY-1586:
--------------------------------------
A similar or even the same issue has been observed in the Nutch nightly builds,
see NUTCH-2672.
I can confirm that this issue is easily reproducible using the ivy.xml provided
by [~a.schulze] running ivy twice with the same cache:
{noformat}
> # first run
> java -jar ./ivy-2.5.0-rc1.jar -ivy ivy.xml -cache ./cache
:: loading settings :: url =
jar:file:/home/ubuntu/ivy-1586/ivy-2.5.0-rc1.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: MyOrganisation#IvyResolveBug;working@valsa
confs: [default]
found ch.qos.logback#logback-classic;1.2.3 in public
found ch.qos.logback#logback-core;1.2.3 in public
found org.slf4j#slf4j-api;1.7.25 in public
downloading
https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
...
............................. (283kB)
.. (0kB)
[SUCCESSFUL ] ch.qos.logback#logback-classic;1.2.3!logback-classic.jar
(259ms)
downloading
https://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar
...
........................................ (460kB)
.. (0kB)
[SUCCESSFUL ] ch.qos.logback#logback-core;1.2.3!logback-core.jar (316ms)
downloading
https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar
...
.............. (40kB)
.. (0kB)
[SUCCESSFUL ] org.slf4j#slf4j-api;1.7.25!slf4j-api.jar (139ms)
:: resolution report :: resolve 2504ms :: artifacts dl 734ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 3 | 3 | 3 | 0 || 3 | 3 |
---------------------------------------------------------------------
> tree ./cache/ch.qos.logback/logback-core/
./cache/ch.qos.logback/logback-core/
├── ivy-1.2.3.xml
├── ivy-1.2.3.xml.original
├── ivydata-1.2.3.properties
└── jars
└── logback-core-1.2.3.jar
1 directory, 4 files
> cat ./cache/ch.qos.logback/logback-core/ivydata-1.2.3.properties
#ivy cached data file for ch.qos.logback#logback-core;1.2.3
#Wed Oct 31 11:09:18 CET 2018
artifact\:ivy\#ivy\#xml\#768556845.is-local=false
artifact\:logback-core\#jar\#jar\#1486237905.is-local=false
resolver=public
artifact\:logback-core\#pom.original\#pom\#-1156166729.location=https\://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.pom
artifact\:ivy\#ivy\#xml\#768556845.original=artifact\:logback-core\#pom.original\#pom\#-1156166729
artifact\:logback-core\#jar\#jar\#1486237905.original=artifact\:logback-core\#jar\#jar\#1486237905
artifact\:logback-core\#pom.original\#pom\#-1156166729.exists=true
artifact\:logback-core\#pom.original\#pom\#-1156166729.is-local=false
artifact\:ivy\#ivy\#xml\#768556845.exists=true
artifact\:logback-core\#jar\#jar\#1486237905.exists=true
artifact\:logback-core\#pom.original\#pom\#-1156166729.original=artifact\:logback-core\#pom.original\#pom\#-1156166729
artifact.resolver=main
artifact\:ivy\#ivy\#xml\#768556845.location=https\://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.pom
artifact\:logback-core\#jar\#jar\#1486237905.location=https\://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar
> # second run
> java -jar ./ivy-2.5.0-rc1.jar -ivy ivy.xml -cache ./cache
:: loading settings :: url =
jar:file:/home/ubuntu/ivy-1586/ivy-2.5.0-rc1.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: MyOrganisation#IvyResolveBug;working@valsa
confs: [default]
found ch.qos.logback#logback-classic;1.2.3 in public
found ch.qos.logback#logback-core;1.2.3 in public
found org.slf4j#slf4j-api;1.7.25 in public
downloading
https://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3-tests.jar
...
................................... (370kB)
.. (0kB)
[SUCCESSFUL ]
ch.qos.logback#logback-core;1.2.3!logback-core.jar(test-jar) (978ms)
downloading
https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-tests.jar
...
.............. (31kB)
.. (0kB)
[SUCCESSFUL ] org.slf4j#slf4j-api;1.7.25!slf4j-api.jar(test-jar) (188ms)
:: resolution report :: resolve 133ms :: artifacts dl 1189ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 3 | 0 | 0 | 0 || 3 | 2 |
---------------------------------------------------------------------
> tree ./cache/ch.qos.logback/logback-core/
./cache/ch.qos.logback/logback-core/
├── ivy-1.2.3.xml
├── ivy-1.2.3.xml.original
├── ivydata-1.2.3.properties
├── jars
│ └── logback-core-1.2.3.jar
└── test-jars
└── logback-core-1.2.3-tests.jar
2 directories, 5 files
> md5sum
> ./cache/ch.qos.logback/logback-core/test-jars/logback-core-1.2.3-tests.jar
6999915bc5a31561cdd27aa9c3c8ec7e
./cache/ch.qos.logback/logback-core/test-jars/logback-core-1.2.3-tests.jar
> md5sum lib/
logback-classic.jar logback-core.jar slf4j-api.jar
> md5sum lib/logback-core.jar
6999915bc5a31561cdd27aa9c3c8ec7e lib/logback-core.jar
> # logback-core-1.2.3-tests.jar is resolved (placed in lib/) as
> logback-core.jar
> cat ./cache/ch.qos.logback/logback-core/ivydata-1.2.3.properties
#ivy cached data file for ch.qos.logback#logback-core;1.2.3
#Wed Oct 31 11:10:16 CET 2018
artifact\:logback-core\#test-jar\#jar\#623571673.exists=true
artifact\:logback-core\#jar\#jar\#1486237905.original=artifact\:logback-core\#jar\#jar\#1486237905
artifact\:logback-core\#test-jar\#jar\#623571673.location=https\://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3-tests.jar
artifact\:ivy\#ivy\#xml\#768556845.location=https\://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.pom
artifact\:logback-core\#pom.original\#pom\#-1156166729.location=https\://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.pom
resolver=public
artifact\:logback-core\#jar\#jar\#1486237905.location=https\://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar
artifact\:logback-core\#test-jar\#jar\#623571673.is-local=false
artifact\:ivy\#ivy\#xml\#768556845.is-local=false
artifact\:logback-core\#pom.original\#pom\#-1156166729.is-local=false
artifact\:logback-core\#pom.original\#pom\#-1156166729.exists=true
artifact\:logback-core\#jar\#jar\#1486237905.exists=true
artifact\:logback-core\#jar\#jar\#1486237905.is-local=false
artifact\:logback-core\#test-jar\#jar\#623571673.original=artifact\:logback-core\#test-jar\#jar\#623571673
artifact\:ivy\#ivy\#xml\#768556845.original=artifact\:logback-core\#pom.original\#pom\#-1156166729
artifact\:logback-core\#pom.original\#pom\#-1156166729.original=artifact\:logback-core\#pom.original\#pom\#-1156166729
artifact\:ivy\#ivy\#xml\#768556845.exists=true
artifact.resolver=main
{noformat}
> Retrieves test-library instead of binary-library
> ------------------------------------------------
>
> Key: IVY-1586
> URL: https://issues.apache.org/jira/browse/IVY-1586
> Project: Ivy
> Issue Type: Bug
> Components: Ant
> Affects Versions: 2.5.0-rc1
> Environment: Eclipse Photon 4.8.0 64bit
> Ant 1.10.3.v20180417-1627
> Apache IvyDE 2.2.0.final-201311091524-RELEASE
> Apache Ivy 2.5.0.cr1_20180412005306
> Reporter: Arni Schulze
> Priority: Blocker
> Attachments: Ant_1st_output.txt, Ant_2nd_output.txt, build.xml,
> ivy.xml
>
>
> If I delete the local Ivy cache and run my Ant script to retrieve
> "ch.quos.logback logback-classic 1.2.3" I get the correct library and its
> dependencies (see Ant_1st_output).
> But if I run the Ant script again (now having a local Ivy cache) it retrieves
> the test-library and the test-library of the dependencies instead of the
> correct ones (see Ant_2nd_output).
> I added minimalistic ivy.xml and Ant script. Because of the different
> behavior of the first and every other run, I think this is a bug in Ivy.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)