Jenkins RROR: Step ‘Deploy war/ear to a container’ aborted due to exception:

RROR: Step ‘Deploy war/ear to a container’ aborted due to exception: 
java.lang.InterruptedException: [DeployPublisher][WARN] No wars found. Deploy aborted. %n
	at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:107)
	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1074)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
	at hudson.model.Run.execute(Run.java:1905)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:428)
Finished: FAILURE

 

意思就是我们去找war包要放到我们布置的容器(例如tomcat中)时发生了异常

 

 第一反应就是找不到打好的包了!

 

先去Jenkins的控制输出日志看看有没有生成war包,因为我的Jenkins中是要找war包的

Jenkins RROR: Step ‘Deploy war/ear to a container’ aborted due to exception:

 

去控制台看报错发现我 

打包出来的是居然是jar包,好吧

Jenkins RROR: Step ‘Deploy war/ear to a container’ aborted due to exception:

 

结果可想而知,要不然我们就是改Jenkins配置,让他找jar包,要不然就在 项目中的pom.xml中配置让他打包成war包

Jenkins RROR: Step ‘Deploy war/ear to a container’ aborted due to exception:

 

配置个packaging 让它生成war包。

 

重新编译,成功了!