Jenkins Plugin Builds - Maven vs Gradle

176 views
Skip to first unread message

Nick Grealy

unread,
Sep 19, 2015, 4:20:04 AM9/19/15
to Jenkins Developers
Hi all,


I'm using gradle (gradle-jpi-plugin) to build the groovy-events-listener-plugin. As far as I can tell, the Jenkins build server only supports building plugins using maven.

To this end, I've created a dummy pom.xml file, which basically disables the maven build steps, and invokes gradle build tasks instead - to get the build passing.

My questions:

a) Am I able to modify Jenkins cloudbees job/s, to build using gradle instead of maven?
b) Is there a plan to change Jenkins, to allow building using gradle?
c) Is the method I've adopted (maven wrapper for gradle), the best way of "working around" this issue?

Kind regards,

Nick

Richard Bywater

unread,
Sep 19, 2015, 5:13:09 AM9/19/15
to Jenkins Developers
The gradle-jpi-plugin uses Gradle to build itself as far as I can tell so its possible. I'm guessing that someone with the correct rights needs to update the job accordingly.

(Interestingly the Gradle plugin doesn't actually use Gradle and only uses Maven. That seems a little odd :) )

Richard.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b0d00a4e-1295-4971-aedb-0022e5b4dea5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nick Grealy

unread,
Sep 20, 2015, 7:27:44 PM9/20/15
to Jenkins Developers
Just ran into an issue (which I guess is related)...

I attempted to create a "wrapper" pom.xml file for a second project, and am now getting the following error, ONLY when executing on the Jenkins CI server... 

What's confusing is that the "mvn clean install" build passes when running locally (can't reproduce), and passes for an almost identical project (https://jenkins.ci.cloudbees.com/job/plugins/job/groovy-events-listener-plugin/10/console)

Any help is greatly appreciated!


[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 58.301 s
[INFO] Finished at: 2015-09-20T18:09:19-05:00
[INFO] Final Memory: 24M/112M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.5:invoke (default) on project poll-mailbox-trigger-plugin: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-2.7-bin.zip'. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.5:invoke (default) on project poll-mailbox-trigger-plugin: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-2.7-bin.zip'.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
	at org.jvnet.hudson.maven3.launcher.Maven32Launcher.main(Maven32Launcher.java:132)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
	at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
	at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
	at hudson.remoting.UserRequest.perform(UserRequest.java:121)
	at hudson.remoting.UserRequest.perform(UserRequest.java:49)
	at hudson.remoting.Request$2.run(Request.java:325)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.MojoFailureException: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-2.7-bin.zip'.
	at org.fortasoft.maven.plugin.gradle.GradleMojo.execute(GradleMojo.java:264)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	... 30 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[JENKINS] Archiving /scratch/jenkins/workspace/plugins/poll-mailbox-trigger-plugin/pom.xml to org.jenkins-ci.plugins/poll-mailbox-trigger-plugin/1.000-MAVEN_TEST_ONLY/poll-mailbox-trigger-plugin-1.000-MAVEN_TEST_ONLY.pom

Vincent Latombe

unread,
Sep 21, 2015, 8:41:34 AM9/21/15
to Jenkins Dev
Hi Nick,

I have replaced your two existing maven jobs by gradle jobs. Sorry about the setback. I have also updated the wiki documentation to mention the possibility, but currently this operation must be done manually.


Cheers,

Vincent

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

Nick Grealy

unread,
Sep 22, 2015, 12:20:07 AM9/22/15
to Jenkins Developers
Reply all
Reply to author
Forward
0 new messages