Maven build is aborted in Jenkins

2019-06-26 07:57发布

I am new to jenkins! I managed to clone GIT hub repo in Jenkins and now trying to build the fetched maven projects in Jenkins. I have 7 projects fetched from GITHUB and they are dependent on each other, i.e. some of the projects have dependencies defined for other projects in their POM.

Below are my maven configuration (Sorry, couldn't post Image here, see in bold)

Root POM myFirstProject/pom.xml

Goals and options clean package install

MAVEN_OPTS

Alternate settings file I

Incremental build - only build changed modules

Disable automatic artifact archiving

Build modules in parallel checked

Use private Maven repository Strategy Local to the workspace

Send e-mail for each failed module

Resolve Dependencies during Pom parsing checked

Run Headless

Process Plugins during Pom parsing

Use custom workspace

Maven Validation Level DEFAULT

Maven Settings Configs - select -

Maven Global Settings Configs ¡ - select -

   I get following trace when I build this job:

<===[JENKINS REMOTING CAPACITY]===>channel started Building single Maven modules is not implemented for Maven 3, yet! Finished: ABORTED

I am using Maven 3.3

As u can see in the configuration listed, I am giving reference for one of the projects' POM.xml. As per my understanding jenkins should parse this xml and build all the dependent projects first. I am not sure if my understanding is correct or not...if it's incorrect- I am looking forward to know how to go ahead. Shall I create different jobs for different projects in the sequence of build dependency required? clueless to go from here... thanks

2条回答
狗以群分
2楼-- · 2019-06-26 08:41

If you have 7 projects that depend on each other, you should have 7 different jobs in jenkins to build them all and to install them in the jenkins local maven repository. By checking the Resolve Dependencies during Pom parsing option (as you do already), Jenkins will resolve automatically the build sequence of the projects.

It could be pretty boring to do, especially if you plan on adding more dependencies (but it could still be the proper way to go).

An alternative would be (assuming you have control over the 7 projects repositories/structures/...) to create a parent maven pom that would build them all in one. In that case, you would probably move all the projects under a common folder (to have only one Git import in jenkins) but if you prefer (or have some reasons) not to do that, you can also define several repositories in the jenkins configuration.

查看更多
时光不老,我们不散
3楼-- · 2019-06-26 08:41

JENKINS REMOTING CAPACITY channel started Building single Maven modules is not implemented for Maven 3, yet! Finished: ABORTED There is bug with Maven 3 support in Jenkins

I downgraded my maven installation in jenkins from 3.2 to 2.2 and it works just fine! Here is the JIRA ticket opened already and got a hint from here : https://issues.jenkins-ci.org/browse/JENKINS-11964

查看更多
登录 后发表回答