Jenkins git plugin error on configure page - jenkins

We're running into a problem creating our very first job on a newly installed Jenkins 1.532.2, with Jenkins Git plugin 2.0.2, Jenkins Git client plugin 1.6.3, and GitHub plugin 1.8.
The error I see on the "new job" page is just below the "Git Repositories" radio button in the Source Code Management section:
javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException:
jar:file:/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-1.532.2.jar!/lib/form/repeatableProperty.jelly:66:69:
<st:include> No such property: lib for class: hudson.plugins.git.UserRemoteConfig.config
Interestingly, I see no errors in the log file at all.
Any ideas how to diagnosis this error?

I never did find the cause, but the problem went away by reverting the git plugin and git client plugin to 1.5 and 1.0.7 respectively, as suggested in https://issues.jenkins-ci.org/browse/JENKINS-20533

This issue has been reported as https://issues.jenkins-ci.org/browse/JENKINS-22649
1.532.3 LTS don't suffer this issue, as new LTS branch. Not sure about the root cause, looks like a strange classloader conflict.

I was having the same issue. I am using git-client 1.12.0, git 2.3.1 and matrix project plugin 1.4 fixed the issue.
Follow this for more information.
https://issues.jenkins-ci.org/browse/JENKINS-24582
Hope this helps.
Thanks

Based on https://issues.jenkins-ci.org/browse/JENKINS-20533 once you enable/install the matrix plugin, I am not seeing this error

Related

java.nio.file.NoSuchFileException: /target/classes/META-INF/annotations/hudson.Extension when building Jenkins plugin

I have found a plugin for using StatsD with Jenkins (https://github.com/joemiller/jenkins-statsd-plugin) - however the HPI needs building because it is not available in Jenkins plugin repository nor is it aailable to download.
I followed the official instructions at https://wiki.jenkins.io/display/JENKINS/Plugin+tutorial, but the $ mvn package always exits with [ERROR] java.nio.file.NoSuchFileException: ~/src/jenkins-statsd-plugin/target/classes/META-INF/annotations/hudson.Extension.
I have tried using java 6, 7, 8 and 10 but to no avail.
I wonder if anybody else has come up against this problem building Jenkins plugins and what they're solution was?
I fixed this problem by setting JAVA_HOME to point to Oracle’s version of Java 8. It appears maven uses the JAVA_HOME environment variable, not your $PATH.
Edit: For extra context, Jenv was responsible for the version of Java in my $PATH.
I would like to post here my findings from various sources that worked for me as the accepted answer alone was not sufficient.
I had to downgrade my Java version back to 11 from 13.
I used this quick solution, which doesn't require you having JDK and Maven installed locally.
Moreover, deleting target/classes/META-INF/ directory before executing mvn install again was necessary.
Lastly, passing -Djenkins.version parameter to Maven is required so you need to do something like mvn -Djenkins.version=2.164 install
This will definitely get resolved by using java 1.8.* JDK.

Chef Cookbooks: Installing Jenkins plugins from GItHub

I am using Chef to deploy my Jenkins instance. I am currently using the Jenkins cookbook found in the Chef Supermarket: https://supermarket.chef.io/cookbooks/jenkins .
I'm managing my plugins by adding them to the _master_war.rb recipe file. Most plugins I'm finding are straight forward, follow the specified instructions in the cookbook supermarket page and can be found for download on the https://wiki.jenkins-ci.org site with a link to a hpi/jpi file.
I'm finding some plugins which are only available via GitHub. For example, https://plugins.jenkins.io/workflow-cps. My current plugin code looks like thus:
# Installs the latest version of the workflow-job Plugin for Jenkins
# The BitBucket Build Status Notifier plugin is dependent on this plugin
# https://github.com/jenkinsci/workflow-job-plugin
jenkins_plugin 'workflow-job-plugin' do
source 'https://github.com/jenkinsci/workflow-job-plugin.git'
notifies :restart, 'runit_service[jenkins]', :immediately
end
Unfortunately, this syntax does not appear to install the plugin via git successfully on my jenkins instance. The following warning appears after running the recipe on the node jenkins is running on:
Bitbucket Build Status Notifier Plugin v1.3.3
workflow-job v1.11 is missing. To fix, install v1.11 or later.
workflow-cps v1.11 is missing. To fix, install v1.11 or later.
multiple-scms v0.6 is missing. To fix, install v0.6 or later.
What would be the correct way / syntax to use to go about downloading and installing these plugins from github to my jenkins instance using the jenkins cookbook for Chef?
I would to to add to this discussion that I found a way to work through this issue. When a page like this one is the official source for a Jenkins plugin: plugins.jenkins.io/workflow-cps, on the right hand side of the screen is an 'Archives' link which will take you to the .hpi listing for all available versions of the given plugin. I.E. updates.jenkins.io/download/plugins/workflow-cps . Using the link address for the listed versions you can source the appropriate .hpi file

Sonar Failure because of org.sonar.plugins.surefire.api.SurefireUtils.getReportsDirectory(Lorg/sonar/api/resources/Project;)Ljava/io/File;

I have couple of groovy/ grails projects and i am using sonar-runner to analyze them. They worked perfectly until today I started receiving this error :
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: org.sonar.plugins.surefire.api.SurefireUtils.getReportsDirectory(Lorg/sonar/api/resources/Project;)Ljava/io/File;
Not sure whats this, if somebody has experience this error before pls let me know
I had the same problem. The sonar-surefire-plugin-1.5.jar in your sonar/extensions.plugins/ directory I believe is the problem. I upgraded that to the 3.3.2 version from the maven repository; http://mvnrepository.com/artifact/org.codehaus.sonar.plugins/sonar-surefire-plugin, then restarted sonar and everything worked. I am running the sonar-groovy-plugin-1.0-SNAPSHOT from cloud bees but I had the problem with their jar as well.
Hmm... I had the same problem after installin of sonar 3.7.3 (the latest) Before it I have used sonar 3.5.X and all were OK. As possible solution: install previous version (3.6.X)
There's a compatibility issue between Java Plugins 1.5 and Groovy 0.6 (and also Flex 1.2). Related JIRA tickets: http://jira.codehaus.org/browse/SONARPLUGINS-3178 and http://jira.codehaus.org/browse/SONARPLUGINS-3259. Compatibility matrix updated: http://docs.codehaus.org/display/SONAR/Plugin+version+matrix

Jenkins : Invalid gitTool selection Git

i've setup my own jenkins buildserver today on my windows PC to build commits to my bitbucket.org-repository automatically.
Sadly i'm deep in trouble with the conenction between jenkins and git.
This is my Jenkis-Git configuration:
This is the Jobconfiguration:
If i now run "Build now" i'm getting the following output in console:
I hope somebody here is abled to help me with this problem. The Job is building... and building... and building... no result.
Kind regards,
Daniel
I get these Git-related warnings as well, but Jenkins is working just fine for me. I believe that they can be ignored. There is an open issue about this.
confirm you do indeed have Git installed on your system. try again.
If still having issue, you may need to also add the path of the Git executable to your Node configuration. By going to your Node configuration page, 'Node Properties' section, 'Tools Locations' setting. There you will find an option to explicitly add the path to Git.

Installing Nimble for Grails

I came across Nimble yesterday, but couldn't get past Step 1, configuring BuildConfig.groovy to find the Nimble's remote repository.
My BuildConfig.groovy file is one line:
grails.plugin.repos.discovery.intient="http://intient.com/downloads/grails/
Here is the message I get when running grails install-plugin nimble 0.2:
Welcome to Grails 1.1.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /opt/dev/sdks/grails-1.1.1
Base Directory: /home/wraith/dev/source/demo
Running script /opt/dev/sdks/grails-1.1.1/scripts/InstallPlugin.groovy
Environment set to development
No authentication for svn repo at intient ...
Reading remote plugin list ...
Reading remote plugin list ...
Reading remote plugin list ...
Plugin 'nimble' was not found in repository. If it is not stored in a configured repository you will need to install it manually. Type 'grails list-plugins' to find out what plugins are available.
This is the first time I have tried to install a plugin not in the official repository. What is the best way to narrow down if it is a problem at Intient.com or with my configuration?
Follow these instructions with the following modifications:
Step 1 is correct
Instead of using the remote repository, download the zipped plugin
Move the plugin to ~/dev/plugins
grails install-plugin ~/dev/plugins/grails-nimble-0.2.zip
Steps 3-5 are correct
We were performing some maintenance on intient.com and the load balancer wasn't providing this content for the last 12 hours or so (oops!).
Should be sorted now but the steps Wraith Monster gave above work for a manual install as well.
Once Grails 1.2 proper hits Nimble will be part of the official plugin repo and we won't need to worry about this at all.
you could always download the zip file for the plugin and install it manually
Download source code from http://github.com/intient/nimble
Unzip under your plugins directory of your project (usually under ${USER_HOME}/.grails/<grails-version>/projects/<myproject>/plugins)
Rename the extracted folder into "nimble-0.2"
Remove from BuildConfig the line grails.plugin.repos.discovery.intient="http://intient.com/downloads/grails/"
Edit the file application.properties of your project and add the line plugins.nimble=0.2
If not installed under your project, you should install the plugins : shiro (version 1.0-SNAPSHOT at least) and mail (>0.6). (run command grails install-plugin <pluginName> <version>)
Start directly from Step 3
It should work (at least, it worked for me). Good luck

Resources