Frederic Lionello created MNG-7362:
--------------------------------------

             Summary: DefaultArtifactResolver has spurious "Failure detected" 
INFO log
                 Key: MNG-7362
                 URL: https://issues.apache.org/jira/browse/MNG-7362
             Project: Maven
          Issue Type: Bug
    Affects Versions: 3.6.3
            Reporter: Frederic Lionello


The DefaultArtifactResolver may issue an INFO log "Failure detected.", without 
any additional context.

This log was introduced in the changes of for MNG-6057 (see below for the file 
change and context) and, being an INFO message with "Failure" text, does seem 
like a debug leftover. On occasions, a maven command will display this log 
message while still being successful, leaving users wondering what has really 
happened.
{code:java}
$ git show 51cc76c32625be2f807dcf2ffbeb085984729b57  
maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
commit 51cc76c32625be2f807dcf2ffbeb085984729b57
Author: Karl Heinz Marbaise <[email protected]>
Date:   Tue Sep 29 11:46:48 2015 +0200    [MNG-6090] CI friendly properties 
break submodule builds
    [MNG-6057] Problem with CI friendly usage of ${..} reactor order is changed
     o Based on the missing replacement of the versions ${revision}
       ${changelist} or ${sha1} within the parent element the order
       of the reactor changes.
    [MNG-5895] Problem with CI friendly usage of ${..} which is already
    defined via property in pom file.diff --git 
a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
 
b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
index fc154cb8a..915ee725f 100644
--- 
a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
+++ 
b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
@@ -376,7 +376,7 @@ public ArtifactResolutionResult resolve( 
ArtifactResolutionRequest request )
         ArtifactFilter resolutionFilter = request.getResolutionFilter();
         RepositorySystemSession session = getSession( 
request.getLocalRepository() );-        // TODO hack because metadata isn't 
generated in m2e correctly and i want to run the maven i have in the
+        // TODO: hack because metadata isn't generated in m2e correctly and i 
want to run the maven i have in the
         // workspace
         if ( source == null )
         {
@@ -506,6 +506,7 @@ public ArtifactResolutionResult resolve( 
ArtifactResolutionRequest request )
         if ( result.hasMetadataResolutionExceptions() || 
result.hasVersionRangeViolations()
             || result.hasCircularDependencyExceptions() )
         {
+            logger.info( "Failure detected." );
             return result;
         } {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to