/** * From Benjamin Bentmann: * Aether artifact resolution can succeed or fail, the event is fired in * both cases to signal the end of the resolution. * Checking the artifact file is another way to detect failure/success, by * definition, an artifact is considered resolved if and only if it has a file. */ @TestAccessible ArtifactOperationDTO resolveOperationType( final RepositoryEvent event ) { ArtifactOperationDTO result; if( null == event.getFile() ) { for( Exception e : event.getExceptions() ) { log.debug( "Artifact not found", e ); } result = ArtifactOperationDTO.NOT_FOUND; } else { result = ArtifactOperationDTO.valueOf( event.getType().name().substring( 9 ) ); } return result; }
/** * From Benjamin Bentmann: * Aether artifact resolution can succeed or fail, the event is fired in * both cases to signal the end of the resolution. * Checking the artifact file is another way to detect failure/success, by * definition, an artifact is considered resolved if and only if it has a file. */ @TestAccessible ArtifactOperationDTO resolveOperationType( final RepositoryEvent event ) { ArtifactOperationDTO result; if( null == event.getFile() ) { for( Exception e : event.getExceptions() ) { log.debug( "Artifact not found", e ); } result = ArtifactOperationDTO.NOT_FOUND; } else { result = ArtifactOperationDTO.valueOf( event.getType().name().substring( 9 ) ); } return result; }