[ https://issues.apache.org/jira/browse/MRESOLVER-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17726555#comment-17726555 ]
Tamas Cservenak commented on MRESOLVER-362: ------------------------------------------- So far, to me it seems is bug in your JarSkippingTransportFactory, it violates API contract. The reproducer passes OK when I comment out these lines: [https://github.com/snicoll-scratches/MRESOLVER-362/blob/main/src/main/java/com/example/mresolver362/DependencyResolver.java#L250-L252] For ref, I have locally this: {noformat} @Override public void get(GetTask task) throws Exception { // if (task.getLocation().getPath().endsWith(".jar")) { // return; // } this.delegate.get(task); } {noformat} Problem occurs later, as from debug logs (thanks for setting that up!) it becomes apparent, that resolver NEVER asks for JAR, but does these two requests: GET https://repo.spring.io/snapshot/org/springframework/cloud/spring-cloud-contract-stub-runner/4.0.3/spring-cloud-contract-stub-runner-4.0.3.jar.sha1 (receives 404) GET https://repo.spring.io/snapshot/org/springframework/cloud/spring-cloud-contract-stub-runner/4.0.3/spring-cloud-contract-stub-runner-4.0.3.jar.md5 (receives 404) Then it reports validation error (as validation is WARN, so is reported and it goes on) {noformat} 2023-05-26 10:31:11,049 WARN [main] o.e.a.i.i.WarnChecksumPolicy [WarnChecksumPolicy.java : 35] -- Could not validate integrity of download from https://repo.spring.io/snapshot/org/springframework/cloud/spring-cloud-contract-stub-runner/4.0.3/spring-clou d-contract-stub-runner-4.0.3.jar org.eclipse.aether.transfer.ChecksumFailureException: Checksum validation failed, no checksums available at org.eclipse.aether.internal.impl.AbstractChecksumPolicy.onNoMoreChecksums(AbstractChecksumPolicy.java:63) {noformat} and finally it arrives here: [https://github.com/apache/maven-resolver/blob/maven-resolver-1.9.10/maven-resolver-connector-basic/src/main/java/org/eclipse/aether/connector/basic/BasicRepositoryConnector.java#L500] Now, the problem is, that at this point, code expected: that "main payload" is downloaded, as transport did not throw anything (it was just return). This is violation of transport contract. https://github.com/apache/maven-resolver/blob/maven-resolver-1.9.10/maven-resolver-spi/src/main/java/org/eclipse/aether/spi/connector/transport/Transporter.java#L74-L81 No, as I see, you want POMs only? Or even only GAs? Or this is just for demo purposes? > NoSuchFileException moving .tmp to .jar > --------------------------------------- > > Key: MRESOLVER-362 > URL: https://issues.apache.org/jira/browse/MRESOLVER-362 > Project: Maven Resolver > Issue Type: Bug > Affects Versions: 1.9.10 > Reporter: Stephane Nicoll > Priority: Major > Fix For: 1.9.11 > > > It looks like MRESOLVER-290 broke our metadata verification tests. We have a > test that uses the resolver API to collect a bunch of dependencies, and > checking the state is correct. Since the upgrade to 1.9 we get this > {noformat} > Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not > transfer artifact > org.springframework.boot:spring-boot-starter:jar:3.0.8-20230525.115211-13 > from/to spring-snapshots (https://repo.spring.io/snapshot): > /var/folders/46/2wr2nf9x0nzd1220xfnp1nzr0000gn/T/metadata-validation-m28912614894186841938/org/springframework/boot/spring-boot-starter/3.0.8-SNAPSHOT/spring-boot-starter-3.0.8-20230525.115211-13.jar.4959477968260906889.tmp > -> > /var/folders/46/2wr2nf9x0nzd1220xfnp1nzr0000gn/T/metadata-validation-m28912614894186841938/org/springframework/boot/spring-boot-starter/3.0.8-SNAPSHOT/spring-boot-starter-3.0.8-20230525.115211-13.jar > at > org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:44) > at > org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:417) > at > org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:260) > at > org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:536) > at > org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:448) > ... 45 more > Caused by: java.nio.file.NoSuchFileException: > /var/folders/46/2wr2nf9x0nzd1220xfnp1nzr0000gn/T/metadata-validation-m28912614894186841938/org/springframework/boot/spring-boot-starter/3.0.8-SNAPSHOT/spring-boot-starter-3.0.8-20230525.115211-13.jar.4959477968260906889.tmp > -> > /var/folders/46/2wr2nf9x0nzd1220xfnp1nzr0000gn/T/metadata-validation-m28912614894186841938/org/springframework/boot/spring-boot-starter/3.0.8-SNAPSHOT/spring-boot-starter-3.0.8-20230525.115211-13.jar > at > java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92) > at > java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) > at java.base/sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:416) > at > java.base/sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:266) > at java.base/java.nio.file.Files.move(Files.java:1432) > at org.eclipse.aether.util.FileUtils$2.move(FileUtils.java:108) > at > org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:500) > at > org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:414) > {noformat} > The test is here > https://github.com/spring-io/start.spring.io/tree/main/start-site-verification/src/test/java/io/spring/start/site -- This message was sent by Atlassian Jira (v8.20.10#820010)