I receive error Dependency META-INF/lib/bcel-findbugs-6.0.jar can not be found in sonar-findbugs-plugin-3.0.jar during build on jenkins for all projects using sonarqube:
[INFO]
[INFO] --- sonar-maven-plugin:2.4:sonar (default-cli) # tig-parent ---
[INFO] SonarQube version: 4.4
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /opt/jenkins/workspace/TIG nightly sonar/target/sonar
INFO: SonarQube Server 4.4
[INFO] [16:54:50.855] Load global settings
[INFO] [16:54:51.042] User cache: /var/run/tomcat/jenkins-master-dev.mycompany.com_00/.sonar/cache
[INFO] [16:54:51.055] Install plugins
[ERROR] Dependency META-INF/lib/bcel-findbugs-6.0.jar can not be found in sonar-findbugs-plugin-3.0.jar`
I am not aware of any changes in project sonar configuration, jenkins or sonarqube server. I checked that sonar-findbugs-plugin-3.0.jar plugin contains bcel-findbugs-6.0.jar library. I reinstalled the findbugs plugin without effect.
. You mean that it did work before but it does not work anymore?
. When you say that you are not aware of any changes in configuration, you mean there has not been any upgrade of software?
. No modification in your environment (Java version, path, etc.)
The solution was to delete sonar cache: /var/run/tomcat/jenkins-master-dev.mycompany.com_00/.sonar/cache
Related
Thx to Steve for the CN1 ant to maven migration tool and video here. - Has anyone been able to run the Kitchen Sink project in Netbeans after migration? I follow the video instructions with the migration tool and migrate successfully and it runs from command line with ./run.sh but when I go to run it in NetBeans, I had a lot of 501 (https needed) errors. Added umer's code from here and that solved the 501 errors but now get:
Invalid POM for com.codenameone:codenameone-javase:jar:7.0.23, and
No implementation for org.codehaus.plexus.languages.java.jpms.LocationManager was bound.
while locating org.apache.maven.plugin.surefire.SurefirePlugin.
Note invalid POM warning...
------------------------------------------------------------------------
Building kitchensink-common 1.0-SNAPSHOT
------------------------------------------------------------------------
--- properties-maven-plugin:1.0.0:read-project-properties (default) # kitchensink-common ---
--- codenameone-maven-plugin:7.0.23:generate-gui-sources (generate-gui-sources) # kitchensink-common ---
The POM for com.codenameone:codenameone-javase:jar:7.0.23 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
Generating GUI sources
No GUI Entries available
Running from command line, invalid POM warning disappears:
[INFO] -----------< com.codename1.demos.kitchen:kitchensink-common >-----------
[INFO] Building kitchensink-common 1.0-SNAPSHOT [4/5]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- properties-maven-plugin:1.0.0:read-project-properties (default) # kitchensink-common ---
[INFO]
[INFO] --- codenameone-maven-plugin:7.0.23:generate-gui-sources (generate-gui-sources) # kitchensink-common ---
Generating GUI sources
No GUI Entries available
Running on apache-maven-3.8.1 on MacOSX
Java version: 1.8.0_172
Suggestions welcomed.
Thx, Mike
I think perhaps the method I'm using to detect the latest version of cn1 has issues. It picked 7.0.23 which was released this morning. But then it was unable to find some of the jars.
Probably it will work if you just try running the project again as it should be fully propagated to maven central now.
Problem was solved updating from Netbeans 8.2 to latest Netbeans version (currently 12.3).
I try to migrate my build jobs from Hudson to Jenkins (version 2.32.1). The Maven build works fine, but the Maven build step for SonarQube doesn't work. I use Jenkins SonarQube Plugin version 2.5.
My SonarQube configuration (following Adding SonarQube Scanner):
My build environment (following Configuring a SonarQube Scanner using environment variables):
My Maven build step (following Analyzing with SonarQube Scanner for Maven):
Jenkins console log:
[INFO] SonarQube version: 4.3
INFO: Default locale: "en_US", source code encoding: "cp1252"
INFO: Work directory: /home/jenkins/.jenkins/jobs/test/workspace/target/sonar
INFO: SonarQube Server 4.3
[INFO] [15:34:56.104] Load batch settings
[INFO] [15:34:56.248] User cache: /home/jenkins/.sonar/cache
[INFO] [15:34:56.254] Install plugins
[INFO] [15:34:56.320] Install JDBC driver
[WARN] [15:34:56.329] H2 database should be used for evaluation purpose only
[INFO] [15:34:56.329] Create JDBC datasource for jdbc:h2:tcp://localhost/sonar
[ERROR] Fail to connect to database
Logs show, that Jenkins used the wrong database URL (H2 instead of PostgreSQL).
What did I wrong?
I found a work-around. I looked at the source code of Jenkins SonarQube Plugin (because I couldn't find the documentation) and found a list of exposed environment variables:
Inject environment variables related to the chosen SonarQube installation.
The following variables may be set depending on the configuration:
SONAR_HOST_URL
SONAR_AUTH_TOKEN
SONAR_LOGIN
SONAR_PASSWORD
SONAR_JDBC_URL
SONAR_JDBC_USERNAME
SONAR_JDBC_PASSWORD
SONAR_EXTRA_PROPS
SONAR_MAVEN_GOAL - supplies the correct Maven goal based on the "Version of sonar-maven-plugin" specified for the SonarQube instance.
These variables are useful when configuring a SonarQube analysis using standard build steps such as Maven, Gradle, Ant, and command line scripts.
This feature is not needed if you're using "SonarQube Scanner" or "SonarQube Scanner for MSBuild" build steps.
After adding -Dsonar.jdbc.url=$SONAR_JDBC_URL to my build step:
it works fine.
I'm following these instruction for setting up Apache Bigtop, to eventually support me running Oozie. I'm trying to use Bigtop because the Oozie website recommends the use of Bigtop if I want to run my Oozie install on Hadoop 2+.
After running the step
make hadoop-deb
I get the following error message (full message HERE):
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary: [INFO] [INFO] Apache Hadoop Main ................................ FAILURE [1:50.288s] [INFO] Apache Hadoop Project POM ......................... SKIPPED ... ... ...
...
...
...
...
...
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:55.412s
[INFO] Finished at: Mon Sep 15 14:14:17 PDT 2014
[INFO] Final Memory: 71M/434M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:stage (default-cli) on project hadoop-main: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.3:stage failed: A required class was missing while executing org.apache.maven.plugins:maven-site-plugin:3.3:stage: org/apache/commons/lang/StringUtils
Scouring the web, some people say this can be fixed by manually deleting your /.m2 repo and then rebuilding. I've tried this to no avail.
I'm using Ubuntu 14.04, fully updated, with Java openjdk7. The only different between what I did and the instructions was that I have Maven installed directly from apt-get, and thus I replaced the MAVEN_HOME location the instructions use with my own.
This info might also be helpful...
mherbst#Oozing:~/bigtop$ mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_65, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-35-generic", arch: "amd64", family: "unix"
Any ideas what might be the issue? I realize I'm using a slightly newer version of Ubuntu than when the guide was written, but I don't think that's the problem. This seems to be some type of Java/Maven dependency issue.
Where are you getting your BigTop installation instructions? I don't remember running maven as part of the install.
BigTop doesn't work on Ubuntu 14.04. There's a problem with at least one dependency (fuse-utils). Try Ubuntu 12.02 LTS.
I have a Jenkins+Nexus installation, and some project there that are automated.
Jenkins deploy the sources and javadocs to nexus in the deploy phase (I am using Maven Release) -- Javadoc could be ok but I don't want to have any sources in Nexus.
I was searching and googling and I don't know how to skip this step.
Thanks a lot
Output from jenkins
[INFO] [INFO]
[INFO] [INFO] --- maven-install-plugin:2.3.1:install (default-install) # projectA ---
[INFO] [INFO] Installing /var/lib/jenkins/jobs/MyBuild/workspace/target/checkout/MyProject/projectA/target/projectA-1227.jar to .../projectA-1227.jar
[INFO] [INFO] Installing /var/lib/jenkins/jobs/MyBuild/workspace/target/checkout/MyProject/projectA/pom.xml to .../projectA-1227.pom
[INFO] [INFO] Installing /var/lib/jenkins/jobs/MyBuild/workspace/target/checkout/MyProject/projectA/target/projectA-1227-sources.jar to .../projectA-1227-sources.jar
[INFO] [INFO] Installing /var/lib/jenkins/jobs/MyBuild/workspace/target/checkout/MyProject/projectA/target/projectA-1227-javadoc.jar to .../projectA-1227-javadoc.jar
[INFO] [INFO]
Try adding : -Darguments="-Dsource.skip=true -Dmaven.javadoc.skip=true"
to your maven release plugin config (Jenkins > your build configuration > Maven release build > Release goals and options
By default this actually does not happen automatically. Most likely you have configured a release profile somewhere in your pom hierarchy that adds the Maven Source Plugin execution.
You could remove that if you never want to use it or otherwise change the release plugin config to use a different profile or skip source creation or invoke the build with parameters to skip as Guilame has answered
The command I'm running is:
mvn -U -e versions:use-latest-versions -Dincludes=com.test.engines:engines -DgenerateBackupPoms=false -DallowMajorUpdates=false -DallowMinorUpdates=false -DallowSnapshots=false
I have, in my pom, a version such as 1.2.3-5-SNAPSHOT and I want to update it to the latest released version. This could be, for example, 1.2.3-7, or 1.2.3-5-SNAPSHOT may not have been released yet meaning the latest version is 1.2.3-4.
When running a maven command on my local Windows machine the versions plugin is working as I require it, however when running it on a remote Linux box (where I really need it to) it doesn't.
My local box shows:
When running a maven command on my local Windows machine the versions plugin is working as I require it, however when running it on a remote Linux box (where I really need it to) it doesn't.
[INFO] [versions:use-latest-versions {execution: default-cli}]
[INFO] Incremental version changes allowed
[INFO] Incremental version changes allowed
[INFO] artifact com.test.engines:engines: checking for updates from central
Props: {project.version=12.4.0-10-SNAPSHOT, project.parent.version=1.0.0, project.parent.groupId=com.test.pom, project.artifactId=edge-web, project.groupId=com.test.edge-web, project.parent.artifactId=pom}
[INFO] Updated com.test.engines:engines:jar:12.4.0-41-SNAPSHOT to version 12.4.0-40
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
Whereas the remote box shows:
[INFO] --- versions-maven-plugin:2.0:use-latest-versions (default-cli) # edge-web ---
[INFO] Incremental version changes allowed
[INFO] Incremental version changes allowed
[INFO] artifact com.test.engines:engines: checking for updates from nexus
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
When running:
mvn -Dplugin=versions help:describe
The output on both boxes shows the same version number:
Name: Versions Maven Plugin
Description: Versions Plugin for Maven 2. The Versions Plugin updates the
versions of components in the POM.
Group Id: org.codehaus.mojo
Artifact Id: versions-maven-plugin
Version: 2.0
Goal Prefix: versions
Does anyone know how I can get the same behavior as I do on my local machine? Or have any suggestions as to how I can investigate further?
I was using different versions of Maven. It seems even though the plugin version was the same I guess the method to resolve later versions in the core of maven must be different.
For reference the Mavan version can be checked using:
mvn --version
I also had to do similar to what is described here to allow me to run both Maven 2 and 3 from a single script.