[GitHub] [maven] suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException

2020-01-16 Thread GitBox
suztomo commented on a change in pull request #277: [MNG-6732] - 
DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon 
ArtifactTransferException
URL: https://github.com/apache/maven/pull/277#discussion_r367493463
 
 

 ##
 File path: 
maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java
 ##
 @@ -27,25 +27,39 @@
 import org.eclipse.aether.artifact.DefaultArtifact;
 import org.eclipse.aether.impl.ArtifactDescriptorReader;
 import org.eclipse.aether.impl.RepositoryEventDispatcher;
+import org.eclipse.aether.repository.RemoteRepository;
 import org.eclipse.aether.resolution.ArtifactDescriptorRequest;
 import org.mockito.ArgumentCaptor;
 
 public class DefaultArtifactDescriptorReaderTest
 extends AbstractRepositoryTestCase
 {
 
-public void testMng5459()
+DefaultArtifactDescriptorReader reader;
 
 Review comment:
   Marked them as private.


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] suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException

2020-01-16 Thread GitBox
suztomo commented on a change in pull request #277: [MNG-6732] - 
DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon 
ArtifactTransferException
URL: https://github.com/apache/maven/pull/277#discussion_r367493554
 
 

 ##
 File path: 
maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java
 ##
 @@ -56,11 +70,11 @@ public void testMng5459()
 reader.readArtifactDescriptor( session, request );
 
 // verify
-verify( eventDispatcher ).dispatch( event.capture() );
+verify(mockEventDispatcher).dispatch( eventCaptor.capture() );
 
 Review comment:
   Fixed.


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] suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException

2020-01-09 Thread GitBox
suztomo commented on a change in pull request #277: [MNG-6732] - 
DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon 
ArtifactTransferException
URL: https://github.com/apache/maven/pull/277#discussion_r365054678
 
 

 ##
 File path: 
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
 ##
 @@ -243,9 +243,10 @@ private Model loadPom( RepositorySystemSession session, 
ArtifactDescriptorReques
 }
 catch ( ArtifactResolutionException e )
 {
-if ( e.getCause() instanceof ArtifactNotFoundException )
+Throwable cause = e.getCause();
+if ( cause instanceof ArtifactTransferException )
 
 Review comment:
   ArtifactDescriptorPolicy.IGNORE_MISSING (2 lines below) was only checked 
when Maven receives "404 Not Found" from a repository. This PR expands it to a 
case where Maven cannot connect to a repository at all.


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] suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException

2020-01-09 Thread GitBox
suztomo commented on a change in pull request #277: [MNG-6732] - 
DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon 
ArtifactTransferException
URL: https://github.com/apache/maven/pull/277#discussion_r314931069
 
 

 ##
 File path: 
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
 ##
 @@ -243,9 +243,10 @@ private Model loadPom( RepositorySystemSession session, 
ArtifactDescriptorReques
 }
 catch ( ArtifactResolutionException e )
 {
-if ( e.getCause() instanceof ArtifactNotFoundException )
+Throwable cause = e.getCause();
+if ( cause instanceof ArtifactTransferException )
 {
-missingDescriptor( session, trace, a, (Exception) 
e.getCause() );
+missingDescriptor( session, trace, a, 
(ArtifactTransferException) cause );
 
 Review comment:
   `ArtifactNotFoundException`  is a subclass of `ArtifactTransferException`. 
Previous condition to check both did not make sense.
   Clarified cast to be more specific class.


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] suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException

2020-01-09 Thread GitBox
suztomo commented on a change in pull request #277: [MNG-6732] - 
DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon 
ArtifactTransferException
URL: https://github.com/apache/maven/pull/277#discussion_r314931069
 
 

 ##
 File path: 
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
 ##
 @@ -243,9 +243,10 @@ private Model loadPom( RepositorySystemSession session, 
ArtifactDescriptorReques
 }
 catch ( ArtifactResolutionException e )
 {
-if ( e.getCause() instanceof ArtifactNotFoundException )
+Throwable cause = e.getCause();
+if ( cause instanceof ArtifactTransferException )
 {
-missingDescriptor( session, trace, a, (Exception) 
e.getCause() );
+missingDescriptor( session, trace, a, 
(ArtifactTransferException) cause );
 
 Review comment:
   `ArtifactNotFoundException`  is a subclass of `ArtifactTransferException`. 
Previous condition to check both did not make sense.
   Clarified cast to be more specific class.


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] suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException

2019-08-16 Thread GitBox
suztomo commented on a change in pull request #277: [MNG-6732] - 
DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon 
ArtifactTransferException
URL: https://github.com/apache/maven/pull/277#discussion_r314931069
 
 

 ##
 File path: 
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
 ##
 @@ -243,9 +243,10 @@ private Model loadPom( RepositorySystemSession session, 
ArtifactDescriptorReques
 }
 catch ( ArtifactResolutionException e )
 {
-if ( e.getCause() instanceof ArtifactNotFoundException )
+Throwable cause = e.getCause();
+if ( cause instanceof ArtifactTransferException )
 {
-missingDescriptor( session, trace, a, (Exception) 
e.getCause() );
+missingDescriptor( session, trace, a, 
(ArtifactTransferException) cause );
 
 Review comment:
   `ArtifactNotFoundException`  is instance of `ArtifactTransferException`. 
Previous condition to check both did not make sense.
   Clarified cast to be more specific class.


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] suztomo commented on a change in pull request #277: [MNG-6732] - DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon ArtifactTransferException

2019-08-16 Thread GitBox
suztomo commented on a change in pull request #277: [MNG-6732] - 
DefaultArtifactDescriptorReader.loadPom to check IGNORE_MISSING policy upon 
ArtifactTransferException
URL: https://github.com/apache/maven/pull/277#discussion_r314894593
 
 

 ##
 File path: 
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
 ##
 @@ -243,9 +244,10 @@ private Model loadPom( RepositorySystemSession session, 
ArtifactDescriptorReques
 }
 catch ( ArtifactResolutionException e )
 {
-if ( e.getCause() instanceof ArtifactNotFoundException )
+Throwable cause = e.getCause();
+if ( cause instanceof ArtifactNotFoundException || cause 
instanceof ArtifactTransferException )
 {
-missingDescriptor( session, trace, a, (Exception) 
e.getCause() );
+missingDescriptor( session, trace, a, (Exception) cause );
 
 Review comment:
   Yes, converting a Throwable to an Exception.


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