[GitHub] [maven] michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException
michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException URL: https://github.com/apache/maven/pull/277#issuecomment-575820803 > > > How about adding if statement for IGNORE_INVALID? (I'll do experiment next week) I did that: ```patch diff --git a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java index 0e9a5745e..da13f363d 100644 --- a/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java +++ b/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java @@ -245,7 +245,7 @@ private Model loadPom( RepositorySystemSession session, ArtifactDescriptorReques catch ( ArtifactResolutionException e ) { Throwable cause = e.getCause(); -if ( cause instanceof ArtifactTransferException ) +if ( cause instanceof ArtifactNotFoundException ) { missingDescriptor( session, trace, a, (Exception) cause ); if ( ( getPolicy( session, a, request ) & ArtifactDescriptorPolicy.IGNORE_MISSING ) != 0 ) @@ -253,6 +253,14 @@ private Model loadPom( RepositorySystemSession session, ArtifactDescriptorReques return null; } } +if ( cause instanceof ArtifactTransferException ) +{ +missingDescriptor( session, trace, a, (Exception) cause ); +if ( ( getPolicy( session, a, request ) & ArtifactDescriptorPolicy.IGNORE_INVALID ) != 0 ) +{ +return null; +} +} result.addException( e ); ``` Doesn't make a difference. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [maven] michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException
michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException URL: https://github.com/apache/maven/pull/277#issuecomment-575775520 Here is the next problem: IT for MNG-3470 fails, see http://home.apache.org/~michaelo/issues/MNG-6732/IT-3470/. The checksum validation is ignored because the `ChecksumFailureException` is wrapped inside an `ArtifactTransferException`. The problem is even if we could determine wether it is `IGNORE_MISSING` or `IGNORE_IVALID` in this case and the checksum policy would be `fail`, but the `ArtifactDescriptorPolicy` is lax, we have a conflict. The checksum policy needs to beat the artifact descriptor policy. This is a hard nut to crack. Comments? I believe that the current code is broken and your PR simply reveals this bug. This is our problem in `org.apache.maven.repository.internal.MavenRepositorySystemUtils`: ``` session.setArtifactDescriptorPolicy( new SimpleArtifactDescriptorPolicy( true, true ) ); ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [maven] michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException
michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException URL: https://github.com/apache/maven/pull/277#issuecomment-575632321 I have uploaded a squash branch, will tests again.. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [maven] michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException
michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException URL: https://github.com/apache/maven/pull/277#issuecomment-575381279 OK, there is some work to be done. IT for MNG-5175 is failing. See http://home.apache.org/~michaelo/issues/MNG-6732/. It needs to be modified or split. @suztomo Do you have a proposal? @rfscholte What would be the proper approach here? The PR makes sense to me. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [maven] michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException
michael-o edited a comment on issue #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException URL: https://github.com/apache/maven/pull/277#issuecomment-522345477 I need will some time to better understand this issue, so a review won't happen before end of this month. Maybe some other committer knows better. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services