1.环境问题,IDE版本一致
2.代码问题
3.权限不足
4.无法下载jar包
5.缓存问题
如果配置文件进行修改后,而已经部署到jboss中的ear没有清理,继续构建的话,Jenkins会默认保留已构建的ear,而不会将最新的文件关联到nexus中。
解决办法:手动清理jboss的deployment中相应的ear,并清理maven仓库。再进行构建。
5.tomcat服务没启或端口被占用
6.maven配置文件setting.xml文件少了jar下载位置,在56行插入下面内容
<localRepository>/root/maven-respository/repository</localRepository>
7.maven版本过高(不要用3.5的)
8.Jenkins构建出来的结果,在线日志打不开(解决方法)
在脚本命令行中运行:System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")