You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2022/10/20 08:11:03 UTC

[jira] [Updated] (MNG-7362) DefaultArtifactResolver has spurious "Failure detected" INFO log

     [ https://issues.apache.org/jira/browse/MNG-7362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated MNG-7362:
---------------------------------
    Fix Version/s: 4.0.0-alpha-2

> 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.5.0-beta-1, 3.6.3
>            Reporter: Frederic Lionello
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.8.5, 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> 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 <kh...@apache.org>
> 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.10#820010)