Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRESOLVER-335] Proposal for better errors #386

Merged
merged 6 commits into from Dec 11, 2023

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Dec 4, 2023

Basically drop the method building text message (and build something very basic instead). It is the application that should build proper output, as it does have access to org.eclipse.aether.resolution.ArtifactResolutionException#getResults and can and should build meaningful error instead.

This PR does not fixes the issue for Maven, it merely does these things:

  • alters the message built by ArtifactResolutionException that does lack information to be complete
  • but IMHO Maven is not meant to use this exception message as is (as it happens today), instead
  • this PR makes possible that in Maven code build proper message, as it now exposes everything (maps remote repository to exception)

https://issues.apache.org/jira/browse/MRESOLVER-335

Basically drop the method building text message (and build
something very basic instead). It is the application that
should build proper output, as it does have access to
org.eclipse.aether.resolution.ArtifactResolutionException#getResults
and can and should build meaningful error instead.

---

https://issues.apache.org/jira/browse/MRESOLVER-335
@cstamas cstamas added this to the 2.0.0 milestone Dec 4, 2023
@cstamas cstamas self-assigned this Dec 4, 2023
@cstamas
Copy link
Member Author

cstamas commented Dec 8, 2023

@slawekjaranowski as reporter, anything to add?

@cstamas
Copy link
Member Author

cstamas commented Dec 8, 2023

One thing am unsure about: Map<ArtifactRepository, Exception> exceptions in ArtifactResult... I think it should be Map<ArtifactRepository, List<Exception>> exceptions instead...

@cstamas
Copy link
Member Author

cstamas commented Dec 9, 2023

Reworked it and is much simpler change (and is even backward compat, so no tampering with japicm needed)

@cstamas cstamas merged commit 784c6d1 into apache:master Dec 11, 2023
7 checks passed
@cstamas cstamas deleted the MRESOLVER-335 branch December 11, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant