reflections icon indicating copy to clipboard operation
reflections copied to clipboard

dependency scope setting issues

Open DataProvided opened this issue 3 years ago • 1 comments

Hi,

We are developing a tool to check whether the dependencies' scopes in maven are set rightly and reasonably.

Our tools have found some issues in your project about scope setting in maven' pom.xml file.

  • in pom.xml, org.jboss:jboss-vfs scope should be compile instead of provided.

Please help us confirm whether the above reports are right and explain why it should set like these.

Thanks a lot.

DataProvided avatar Apr 13 '22 12:04 DataProvided

Are you requesting help for your issues here to understand maven better? <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-vfs</artifactId> <version>3.2.15.Final</version> <scope>provided</scope> <optional>true</optional><!-- case: when using jboss-vfs --> </dependency>

There is even a comment on it. There are some dependencies you might need in a special environment e.g. jee container which than provide different implementation which are than used via java reflection. its is not compile scope since they are not bound at compile time but loosely loaded at runtime in a special environment. My question is: why is it even listed as dependency? perhaps documentation reasons for completeness. not sure.

HenningL avatar Apr 19 '22 08:04 HenningL