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

[MENFORCER-490] Declare enforcer-rules dependencies #289

Merged
merged 8 commits into from
Sep 10, 2023
Merged

[MENFORCER-490] Declare enforcer-rules dependencies #289

merged 8 commits into from
Sep 10, 2023

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Sep 9, 2023

This fixes the last easy dep declarations in this project. There are still a couple of issues that might point to bugs in the dependency analyzer. In particular, adding the dependency on javax.annotation:javax.annotation-api as done here results in an unused declared dependency warning, but taking it out results in a used undeclared dependency warning.

@slawekjaranowski
Copy link
Member

so what is the true about: javax.annotation:javax.annotation-api is it used in project?

If is not used I would to not add only to have analyzer happy

@elharo
Copy link
Contributor Author

elharo commented Sep 9, 2023

It is certainly used. I'm not sure why the dependency analyzer reports it as both used and unused. Likely a bug there I need to investigate:

$ grep -R "import javax.annotation" .
./enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRuleHelper.java:import javax.annotation.Nonnull;
./enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java:import javax.annotation.Nonnull;
./enforcer-api/src/main/java/org/apache/maven/enforcer/rule/api/EnforcerRule.java:import javax.annotation.Nullable;
./maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/internal/EnforcerRuleCache.java:import javax.annotation.PreDestroy;

@elharo elharo merged commit d3873fe into master Sep 10, 2023
@elharo elharo deleted the deps branch September 10, 2023 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants