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

Fail on duplicate modules on the module path #172

Merged

Conversation

hgschmie
Copy link
Contributor

When resolving the module path, no module name is allowed to exist
multiple times.

The location manager used to drop duplicates silently which led to
hard to understand error messages when a plugin using plexus-java
dropped a dependency without any notice.

This change enforces uniqueness of module names on the module path
and will add an exception to the PathResolveResult in that case.

When resolving the module path, no module id is allowed to exist
multiple times.

The location manager used to drop duplicates silently which led to
hard to understand error messages when a plugin using plexus-java
dropped a dependency without any notice.

This change enforces uniqueness of module names on the module path
and will add an exception to the PathResolveResult in that case.
@hgschmie
Copy link
Contributor Author

@rfscholte plz review (I can't actually request a reviewer)

@hgschmie
Copy link
Contributor Author

I will close #164 once this PR has been merged

@rfscholte
Copy link
Member

I'm glad to see that we came to this solution. Technically it is probably not an illegal argument exception, but I can't think of a better solution and this might help to ensure module names are unique on the module path.

@rfscholte rfscholte merged commit 3a1f22b into codehaus-plexus:master Sep 18, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants