Skip to content

[MNG-7771] Don't use ArtifactResolutionException#getMessage() w/o knowing whether there are other exceptions or not #9214

Open

Description

@jira-importer

Michael Osipov opened MNG-7771 and commented

ArtifactResolutionException#getMessage() only considers the message from the first cause, completely ignoring other causes. So it is order-dependent and can be misleading. Create an expeception-agnotic message and all submessages shall be retrieved through API.


Affects: 3.8.8, 3.9.1, 4.0.0-alpha-5

This issue is a sub-task of MNG-7770

Backported to: 4.0.x-candidate, 3.9.x-candidate

Activity

  1. jira-importer commented on Jun 1, 2023

    @jira-importer
    Author

    Guillaume Nodet commented

    AFAIK, ArtifactResolutionException are thrown from old services in maven-compat, so I don't think we should waste any time on those.

  2. jira-importer commented on Jun 3, 2023

    @jira-importer
    Author

    Michael Osipov commented

    No, they come straight from Resolver otherwise I would not raise. This is a seriously annoying issue.

  3. jira-importer commented on Dec 11, 2023

    @jira-importer
    Author
  4. jira-importer commented on Jul 6, 2024

    @jira-importer
    Author

    Guillaume Nodet commented

    I don't see any place in Maven where this exception is created.  AFAIK, it always comes from the resolver.

  5. jira-importer commented on Jul 6, 2024

    @jira-importer
    Author

    Michael Osipov commented

    gnodet, it is not, but it is visible through Maven to the user.

  6. jira-importer commented on Jul 7, 2024

    @jira-importer
    Author

    Guillaume Nodet commented

    Michael Osipov That was my understanding too.  But then, shouldn't we move the issue to maven-resolver ?

    I don't really understand what you expect from Maven.

  7. jira-importer commented on Jul 7, 2024

    @jira-importer
    Author

    Tamas Cservenak commented

    The exception carries multiple important information, and this really about formatting understandable, meaningful, but at the same time complete error message on console (to user) in case it is being thrown.

  8. jira-importer commented on Jul 7, 2024

    @jira-importer
    Author

    Tamas Cservenak commented

    So this is more about "consuming" and formatting console output for user when this exception is thrown.

  9. jira-importer commented on Jul 7, 2024

    @jira-importer
    Author

    Michael Osipov commented

    Correct, Tamas Cservenak nailed it mostly. The information has to be in the exception and Maven has to expose it correct. Neither is. Even if the issue is not in Maven per sé, the issue is visible from Maven from a user's PoV.

  10. added
    priority:major
    on Jul 7, 2025
  11. modified the milestones: 4.0.0, 4.1.0 on Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:major

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions