I am a little surprised: I declared a dependency in maven pom as runtime and it was still included in war. I honestly expected it not to do this... I used junit just for the purpose of demonstration...:) For example:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Thanks, Roxana
Some maven-scopes:
runtime
test
provided
If you want something at runtime then it has to be in the package. Otherwise where will the software know where to find it.
What were you expecting? And most importantly, why are you including JUnit in Runtime? It should be in test scope.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.