jenkins部署项目的时候报下面的错误
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] ‘packaging’ with value ‘jar’ is invalid. Aggregator projects require ‘pom’ as packaging. @ line 3, column 110
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:383)
at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:370)
at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:340)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1329)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1126)
at hudson.FilePath.act(FilePath.java:1075)
at hudson.FilePath.act(FilePath.java:1058)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:987)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:691)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1856)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:428)
[SSH] script:
解决方法
在父项目中加入
<packaging>pom</packaging>