#测试
pom2 为模拟的插件jar,pom3为实际项目。
![7925105-173d95084795bfaf.png](https://upload-images.jianshu.io/upload_images/7925105-173d95084795bfaf.png)
##scope=test
##* test,只在测试时使用,用于编译和运行测试代码。不会随项目发布。
###在pom3中引用pom2
![7925105-97072556e9258575.png](https://upload-images.jianshu.io/upload_images/7925105-97072556e9258575.png)
###在main包下 找不到Need这个类
![7925105-6824a3adff3c7bf0.png](https://upload-images.jianshu.io/upload_images/7925105-6824a3adff3c7bf0.png)
###而在test包下可以使用
![7925105-c5a820250b696bb9.png](https://upload-images.jianshu.io/upload_images/7925105-c5a820250b696bb9.png)
###pom显示
![7925105-598a607c002e0d07.png](https://upload-images.jianshu.io/upload_images/7925105-598a607c002e0d07.png)
###调用package无法执行
#测试
pom2 为模拟的插件jar,pom3为实际项目。
##scope=test
##* test,只在测试时使用,用于编译和运行测试代码。不会随项目发布。
###在pom3中引用pom2
###在main包下 找不到Need这个类
###而在test包下可以使用
###pom显示
###调用package无法执行