[
https://issues.apache.org/jira/browse/IVY-1671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18098965#comment-18098965
]
Frank commented on IVY-1671:
----------------------------
Maarten, thanks for looking into this.
Please extract [^IVY-1671.jar]
(My environment: Debian Linux, Java 25.0.2, ant 1.10.15)
In a shell in the extracted IVY-1671 directory...
* Clear ivy cache
rm -r ~/.ivy2/cache/
* Clear artifacts, run ivy-2.5.2, check artifacts
rm -rf ivy/artifacts/ && ant -f ivy/build-2.5.2.xml && ls
ivy/artifacts/lib/ide/imageio-*
-> {*}all fine{*}: 5 files, including
ivy/artifacts/lib/ide/imageio-core-source.jar
* Again: Clear artifacts, run ivy-2.5.2, check artifacts
-> {*}all fine{*}: 5 files, including
ivy/artifacts/lib/ide/imageio-core-source.jar
* Clear ivy cache
rm -r ~/.ivy2/cache/
* Clear artifacts, run ivy-2.6.0, check artifacts
rm -rf ivy/artifacts/ && ant -f ivy/build-2.6.0.xml && ls
ivy/artifacts/lib/ide/imageio-*
-> {*}all fine{*}: 5 files, including
ivy/artifacts/lib/ide/imageio-core-source.jar
* Clear artifacts, run ivy-2.6.0, check artifacts
rm -rf ivy/artifacts/ && ant -f ivy/build-2.6.0.xml && ls
ivy/artifacts/lib/ide/imageio-*
-> *!!!* only 4 files, missing ivy/artifacts/lib/ide/imageio-core-source.jar
So the first run with 2.6.0 (that fills the cache) gives my
imageio-core-source.jar, but the second run (which hits the cache) does not.
> source-classifier artifact no longer resolved via configuration mapping after
> upgrade to 2.6.0
> ----------------------------------------------------------------------------------------------
>
> Key: IVY-1671
> URL: https://issues.apache.org/jira/browse/IVY-1671
> Project: Ivy
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.6.0
> Environment: Linux
> Java 17
> Reporter: Frank
> Assignee: Maarten Coene
> Priority: Major
> Attachments: IVY-1671.jar
>
>
> After upgrading from Ivy 2.5.2 to 2.6.0, a dependency that maps a local
> configuration to the target module's {{sources}} configuration no longer
> resolves the {{{}source{}}}-typed (classifier {{{}sources{}}}) artifact. The
> main jar ({{{}type="jar"{}}}, no classifier) is still resolved correctly.
> ivy.xml:
> {code:java}
> <dependency org="com.twelvemonkeys.imageio" name="imageio-core" rev="3.9.4"
> conf="compile->default; ide->sources"/> {code}
> With Ivy 2.5.2, this retrieves a file imageio-core-source.jar.
> With Ivy 2.6.0, imageio-core-source.jar is gone.
> Cached module descriptor
> (com.twelvemonkeys.imageio/imageio-core/ivy-3.9.4.xml), generated correctly
> by Ivy from the Maven POM, and identical before/after the upgrade:
> {code:java}
> <publications>
> <artifact name="imageio-core" type="jar" ext="jar" conf="master"/>
> <artifact name="imageio-core" type="source" ext="jar" conf="sources"
> m:classifier="sources"/>
> <artifact name="imageio-core" type="javadoc" ext="jar" conf="javadoc"
> m:classifier="javadoc"/>
> </publications> {code}
> Since the module metadata is identical and correct in both cases, the
> regression appears to be in artifact-to-configuration matching during
> resolve, not in POM-to-Ivy translation.
> Resolution report for configuration ide, with Ivy 2.5.2 (correct — both
> artifacts listed):
> {code:java}
> <h5>Artifacts</h5>
> <table>
> <thead>
>
> <tr><th>Name</th><th>Type</th><th>Ext</th><th>Download</th><th>Size</th></tr>
> </thead>
> <tbody>
> <tr><td>imageio-core</td><td>source</td><td>jar</td><td
> align="center">no</td><td align="center">115 kB</td></tr>
> <tr><td>imageio-core</td><td>jar</td><td>jar</td><td
> align="center">no</td><td align="center">114 kB</td></tr>
> </tbody>
> </table>{code}
> Resolution report for configuration ide, with Ivy 2.6.0 (source/classifier
> sources artifact missing):
>
> {code:java}
> <h5>Artifacts</h5>
> <table>
> <thead>
>
> <tr><th>Name</th><th>Type</th><th>Ext</th><th>Download</th><th>Size</th></tr>
> </thead>
> <tbody>
> <tr><td>imageio-core</td><td>jar</td><td>jar</td><td
> align="center">no</td><td align="center">114 kB</td></tr>
> </tbody>
> </table> {code}
> Environment note:
> Fresh, version-specific cache directory used for each Ivy version (problem
> with cache reuse across versions ruled out as a cause).
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)