Lack of com.kohlschutter:compiler-annotations dependency leads to compiler warnings #129
Labels
dependencies
Pull requests that update a dependency file
has workaround
There is a workaround available to prevent the issue or reduce its impact
information needed
More information is required
Describe the bug
The
com.kohlschutter:compiler-annotations
needs to be declared as a full dependency, not just aprovided
scope dependency, else it leads to compiler warnings when-Xlint:all
is enabled, like this in downstream projects that use junixsocket:Guava faced a similar issue several years ago, see google/guava#2721.
This happens because maven does not pull in a transient dependency for
com.kohlschutter:compiler-annotations
(since it is marked with as aprovided
scope dependency ofcom.kohlschutter.junixsocket:junixsocket-common
).This has forced us to explicitly declare a direct dependency on
com.kohlschutter:compiler-annotations
over at https://github.com/mwiede/jsch, since we enable-Xlint:all -Werror
in our javac flags.We would rather not have to declare an explicit dependency on
com.kohlschutter:compiler-annotations
since we aren't actually directly utilizing any of these annotations in the JSch code.To Reproduce
Expected behavior
Project to compile successfully.
Output/Screenshots
Environment (please complete the following information):
Notes
https://github.com/mwiede/jsch/blob/master/pom.xml#L96
https://github.com/mwiede/jsch/blob/master/pom.xml#L101
google/guava#2721
Lastly, please make sure to test the problem still occurs on the latest version of junixsocket
Yes, this occurs with current
2.6.2
release.The text was updated successfully, but these errors were encountered: