Jenkins 通过maven打包时,发现resource下的properties 配置文件未生成 ,导致在执行时报错

xiaoxiao2021-02-28  114

场景: Jenkins 构建WebDriver 项目时,报如下图错误:

idea 运行时是没问题的,经过对比发现是因为Jenkins构建时,发现resource下的properties 配置文件未生成,找到不所以才提示错误

解决方法:

代码路径:

在pom.xml 中bulid  页签中添加如下配置:

< resources >    < resource >      < directory >src/main/resource </ directory >    </ resource > </resources> directory 值是根据 resource 中的路径来填写的 添加完之后,构建即可成功。

转载请注明原文地址: https://www.6miu.com/read-34629.html

最新回复(0)