dependency scope setting issues
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-vfsscope should becompileinstead ofprovided.
Please help us confirm whether the above reports are right and explain why it should set like these.
Thanks a lot.
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.