maven scope 里面的runtime有什么用

maven scope 里面的runtime有什么用,
各位大神可以举个场景吗,看了很多地方都不知道这个到底什么用的。

https://blog.csdn.net/ningbohezhijunbl/article/details/25818069 这篇文章里讲的不错

由于还在测试别的功能的阶段,还没有编写mysql,所以编译的时候不会用到这个包。但是生成Context上下文的时候会用到。 也就是说这个包mysql包编译的时候是用不到的,但是在运行的时候会用到。所以如果我们在package的时候没有将其打包到target中,运行时就会出错。所以要加上
runtime

如果不加,我试验过了。虽然加了这个依赖,但是由于编译的时候没有用到,那么生成的target下的lib中是没有对应的jar包的。

This scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.

指的是直接在运行时所需要的包,而非在编译时等时候需要的包。

我的应用稍微复杂一点,在tomcat 上部署
<!--javax.servlet-->

javax.servlet
servlet-api
2.5
<!--因为provided表明该包只在编译和测试的时候用-->
provided

<!--javax.servlet end-->

            然后愉快的运行main方法报错了

            我能改为runtime吗,会与tomcat冲突吗?