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

Validating maven-surefire-plugin providers (dynamically loaded) #130

Open
cobratbq opened this issue Jun 29, 2020 · 1 comment
Open

Validating maven-surefire-plugin providers (dynamically loaded) #130

cobratbq opened this issue Jun 29, 2020 · 1 comment
Labels
enhancement New feature or request. help wanted Extra attention is needed. in design Design work should be finished before coding.

Comments

@cobratbq
Copy link
Contributor

cobratbq commented Jun 29, 2020

Is your feature request related to a problem? Please describe.
Currently, maven-surefire-plugin loads libraries at run-time based on which testing frameworks are in use in the codebase. These providers are not validated due to not being declared as dependency in the project configuration.

Describe the solution you'd like
Within reason, all loaded dependencies to be validated before use. Specifically for this issue:

Prematurely resolving and validating all surefire-providers, such that whatever maven-surefire-plugin decides to use is validated already. (The surefire-providers aggregator POM could be used. Version decided by taking version of maven-surefire-plugin that is used.)

Describe alternatives you've considered

  • Skipping: that is the present solution. A warning is emitted to make the user aware.
  • Scanning the local repository: although feasible, it means we can only validate after first use as these are resolved at run-time right before being executed.

Additional context
See code-base, specifically ArtifactResolver.java

NOTE: so far, I have not found a way to resolve the POM artifact as such and read the modules from it. It might require manually downloading the POM file and reading it with a lower-level maven API.

@cobratbq cobratbq added the enhancement New feature or request. label Jun 29, 2020
@slawekjaranowski slawekjaranowski added help wanted Extra attention is needed. in design Design work should be finished before coding. labels Apr 6, 2021
@slawekjaranowski
Copy link
Member

We can check if dependency:go-offline works in this case ...

if yes we can see how dependency are resolved in dependency plugin.

pzygielo pushed a commit to pzygielo/pgpverify-maven-plugin that referenced this issue May 31, 2024
Make it clear that "it only works with Sisu" is meant for integrators,
not "end users" wishing to use them with Maven.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request. help wanted Extra attention is needed. in design Design work should be finished before coding.
Development

No branches or pull requests

2 participants