-
-
Notifications
You must be signed in to change notification settings - Fork 80
Use "provided" scope for slf4j-api dependency (instead of compile
)
#226
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
Conversation
While "provided" makes no difference to maven in presence of "optional", it would reassure plugin writers that they too can depend on "provided" slf4j-api and rely on it being present on Jenkins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
compile
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably OK, but we should be enhancing the IT for a simple plugin to verify that WEB-INF/lib/*.jar
contains only the plugin JAR: this would fail if you accidentally used compile
without optional
, for example.
@@ -286,7 +286,7 @@ | |||
<groupId>org.slf4j</groupId> | |||
<artifactId>slf4j-api</artifactId> | |||
<version>${slf4jVersion}</version> | |||
<scope>compile</scope> | |||
<scope>provided</scope> | |||
<!-- mark the API as optional so it is not packaged in the HPI but available during compile --> | |||
<optional>true</optional> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we could delete optional
I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually see some uses of optional
with provided
. Please see spotbugs-annotations
and jcip-annotations
. While it's not very useful, I don't want to break the pre-existing pattern.
Note: conflicts with #229. |
No worries, I would not mind discarding this PR is there is a better approach to declaring dependencies. |
I meant “conflict” in the technical sense of Git merges. #229 does not make this change, so we could do both. |
Let's go ahead with this PR for now, BOM is still in review |
Thanks @proski ! |
While "provided" makes no difference to maven in presence of "optional", it would reassure plugin writers that they too can depend on "provided" slf4j-api and rely on it being present on Jenkins.