I keep receiving this issue (Build failure) when I add a random exclude in SonarQube.
I don't know why this occurs and it still throws a build failure irrespective of what what I exclude.
This used to work before I upgraded SonarQube from 7.4 to 7.5.
[ERROR] Failed to execute goal
org.sonarsource.scanner.maven:sonar-maven-plugin:3.5.0.1254:sonar
(default-cli) on project root: Unable to load component class
org.sonar.scanner.phases.AbstractPhaseExecutor: Unable to load
component class
org.sonar.scanner.issue.ignore.scanner.IssueExclusionsLoader: Unable
to load component class
org.sonar.scanner.issue.ignore.pattern.IssueExclusionPatternInitializer:
Exclusions > Issues : Invalid format. The first field does not define
a resource pattern: ,squid:S00119,* -> [Help 1]
Fixed my issue by adding in SonarQube, not only the squid:S00119 but also the what file pattern to search for. I only added squid:S00119 and that is why it wasn't enough. You need also to specify what file.
Related
I am running the SonarScanner using the sonar-web-frontend-plugin from the commandLine, it picks up the files and runs and I get an execution Failure
ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Report processing did not complete successfully
: FAILED
My sonar-project.properties look like this
# must be unique in a given SonarQube instance
sonar.projectKey=Test.UI
# this is the name displayed in the SonarQube UI
sonar.projectName=Test.UI
sonar.projectVersion=1.0
# Comma-separated paths to directories with sources (required)
sonar.sources=src/app
# exclude some files and folders (typically dependencies)
sonar.exclusions=bower_components/**/*, node_modules/**/*
# Encoding of the source files
sonar.sourceEncoding=UTF-8
You have the Build Breaker plugin installed on your SonarQube instance.
Your project failed its quality gate.
The Build Breaker plugin did its job, and "broke" (returned a non-success status code) your build.
Seems like it was because i had the default JS rules still installed and they can't exist side by side.
I am trying to build my image using this plugin: https://github.com/spotify/docker-maven-plugin#use-a-dockerfile
When I run mvn clean package docker:build
I get this error:
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.3:build (defa
ult-cli) on project demo: Exception caught: Request error: POST https://192.168.
99.100:2376/v1.12/build?t=DevOpsClient: 500: HTTP 500 Internal Server Error -> [
Help 1]
When I check the docker daemon logs, I see this:
Handler for POST /build returned error: repository name component must match \"[a-z0-9]+(?:[._-][a-z0-9]+)*\"" statusCode=500
Here is the doc for the naming convention: https://docs.docker.com/registry/spec/api/
Apparently you cannot have any upper case letters.
I am trying to build using Spring boot my following this guide: https://spring.io/guides/gs/spring-boot-docker/
I am using a SNAPSHOT release of spring boot and I have a directory named demo-0.1.1-SNAPSHOT. I believe this may be causing the problem.
Also I am working on windows and my project directory path is like:
C:\Users\myname\UserRegistrationClient\git\..... etc
Would this also affect the repository naming convention?
And how would I change it?
So this regular expression: [a-z0-9]+(?:[._-][a-z0-9]+)* doesn't include any upper case letters. So you should change your image name to devopsclient
After performing a successful analysis, we are seeing a failure "Unable to evict preview database: /batch_bootstrap/evict?project=10020". This is followed by the summary:
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project XXX: Can not execute SonarQube analysis: Unable to evict preview database: /batch_bootstrap/evict?project=10020: Fail to execute request [code=400, url=https://XXX/batch_bootstrap/evict?project=10020]: Fail to download [https://XXX/batch_bootstrap/evict?project=10020]. Response code: 400 -> [Help 1]
This is running on SLES11SP1, Java 1.7, maven 3.3. I've tried increasing memory (MAVEN_OPTS="-Xms4096m -Xmx8092m -XX:MaxPermSize=4096m") and changing ulimit for files (8192) but have not seen any change in failure.
Any hints? What is the code 400?
You should publish the properties files with the analysis configuration, and the log file complete.
Regards.
When I build my project by tycho-maven-plugin, I encounter the following message:
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: foo-updatesite raw:0.2.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.2.0-SNAPSHOT
[ERROR] Missing requirement for filter properties ~= $0: foo-feature.feature.group 0.2.0.qualifier requires 'foo-plugin 0.0.0' but it could not be found
[ERROR] Cannot satisfy dependency: foo-updatesite raw:0.2.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):0.2.0-SNAPSHOT depends on: foo-feature.feature.group [0.2.0,0.2.1)
This error occurs when building an update site. Plugin and feature are build normally. I build the update site from PDE without issues.
The project structure is common: there is a parent project with pom packaging and three modules: plugin, feature and updatesite. Of course, I invoke mvn clean package from the parent project.
What can be the reason for this error? How can I debug it?
UPD: I tried many things: removed "grandparent" pom, removed SNAPSHOT/qualifier, played with configuration. However, I found the solution: I switched to tycho 0.19 instead of 0.21. So I suppose there is a bug in tycho 0.21.
The error message
Missing requirement for filter properties ~= $0
indicates that you have defined an environment filter when you include the plugin foo-plugin in the feature.xml. However this does not explain the dependency resolution error you are seeing. The only way I can reproduce the error message is by adding an Eclipse-PlatformFilter header in the manifest of the plugin using a value which doesn't match environments configuration in the POM.
I had the same error message:
Missing requirement for filter properties ~= $0: foo-feature.feature.group 0.2.0.qualifier requires 'foo-plugin 0.0.0' but it could not be found
For some reason this error (also) means, that foo-plugin is present... twice.
So in your case, open the "Content" tab of the "Target Editor" and make sure that foo-plugin is not present in two distinct versions. I common way this could happen is if two features contain the same bundle.
When i am trying to build the wso2 kernel4.0.6, Build failed due to the f0llowing error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-
5:attached (2-dist) on project wso2carbon-core: Failed to create assembly: Error adding file to archive:
\distribution\kernel\4.0.0\..\..\..\core\org.wso2.carbon.core\4.0.0\target\Version.aar isn't a file. ->
As the file \core\org.wso2.carbon.core\4.0.0\target\Version.aar that maven is looking for isn't present, your build is failing.
You need to check out the code in https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.0.0/patch-releases/4.0.6/ location and build. Use that URL location if you haven't done so.