SonarQube执行代码扫描失败,Can not execute Findbugs

news2024/9/16 23:14:53

SonarQube 版本 9.2.4

SonarQube执行代码扫描失败,报错如下

remote: INFO: Sensor FindBugs Sensor [findbugs]        
remote: INFO: Findbugs plugin version: 4.2.6        
remote: INFO: JavaResourceLocator.binaryDirs() not available before SonarQube 9.8        
remote: INFO: JavaResourceLocator.testClasspath() not available before SonarQube 9.8        
remote: WARN: Findbugs needs sources to be compiled. Please build project before executing sonar or check the location of compiled classes to make it possible for Findbugs to analyse your (sub)project (/var/opt/gitlab/git-data/repositories/@hashed/d6/06/d6061bbee6cf13bd73765faaea7cdd0af1323e4b125342ac346047f7c4bda1fc.git/tmp).        
remote: WARN: Property 'sonar.java.binaries' is not declared as multi-values/property set but was read using 'getStringArray' method. The SonarQube plugin declaring this property should be updated.        
remote: INFO: ------------------------------------------------------------------------        
remote: INFO: EXECUTION FAILURE        
remote: INFO: ------------------------------------------------------------------------        
remote: INFO: Total time: 14.870s        
remote: INFO: Final Memory: 24M/296M        
remote: INFO: ------------------------------------------------------------------------        
remote: ERROR: Error during SonarScanner execution        
remote: java.lang.IllegalStateException: Can not execute Findbugs        
remote: 	at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:185)        
remote: 	at org.sonar.plugins.findbugs.FindbugsSensor.execute(FindbugsSensor.java:130)        
remote: 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)        
remote: 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)        
remote: 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)        
remote: 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)        
remote: 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)        
remote: 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:79)        
remote: 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)        
remote: 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)        
remote: 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:384)        
remote: 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:380)        
remote: 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:349)        
remote: 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)        
remote: 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)        
remote: 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:136)        
remote: 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)        
remote: 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)        
remote: 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)        
remote: 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)        
remote: 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)        
remote: 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        
remote: 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)        
remote: 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)        
remote: 	at java.base/java.lang.reflect.Method.invoke(Unknown Source)        
remote: 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)        
remote: 	at com.sun.proxy.$Proxy0.execute(Unknown Source)        
remote: 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)        
remote: 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)        
remote: 	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)        
remote: 	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)        
remote: 	at org.sonarsource.scanner.cli.Main.main(Main.java:62)        
remote: Caused by: java.lang.IllegalStateException: One (sub)project contains Java source files that are not compiled (/var/opt/gitlab/git-data/repositories/@hashed/d6/06/d6061bbee6cf13bd73765faaea7cdd0af1323e4b125342ac346047f7c4bda1fc.git/tmp).        
remote: sonar.java.binaries was set to ./        
remote: Sonar JavaResourceLocator.classFilesToAnalyze was empty        
remote: 	at org.sonar.plugins.findbugs.FindbugsConfiguration.buildMissingCompiledCodeException(FindbugsConfiguration.java:169)        
remote: 	at org.sonar.plugins.findbugs.FindbugsConfiguration.initializeFindbugsProject(FindbugsConfiguration.java:139)        
remote: 	at org.sonar.plugins.findbugs.FindbugsConfiguration.initializeFindbugsProject(FindbugsConfiguration.java:102)        
remote: 	at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:114)        
remote: 	... 31 more        

Findbugs分析的不是java源代码,而是编译后的class文件。

通过下图进行修改。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1935313.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【Vue】深入了解 v-for 指令:从基础到高级应用的全面指南

文章目录 一、v-for 指令概述二、v-for 指令的基本用法1. 遍历数组2. 遍历对象3. 使用索引 三、v-for 指令的高级用法1. 组件列表渲染2. 使用 key 提升性能3. 嵌套循环 四、结合其他功能的高级用法1. 处理过滤和排序后的结果2. 迭代数值范围3. 结合其他命令使用模板部分 (<t…

设计模式:使用最广泛的代理模式

需求场景 按着惯例&#xff0c;还是以一个应用场景作为代理模式的切入点。现在有一个订单系统&#xff0c;要求是:一旦订单被创建&#xff0c;只有订单的创建人才可以修改订单中的数据&#xff0c;其他人则不能修改。 基本实现思路 按着最直白的思路&#xff0c;就是查询数据…

数据结构小测试:排序算法

目录 1、请简述数据结构八大排序算法的思路。 2、常用排序算法手写 冒泡排序&#xff1a; 选择排序&#xff1a; 快速排序&#xff1a; 归并排序&#xff1a; 堆排序&#xff1a; 3、额外再加一个二分查找吧 1、请简述数据结构八大排序算法的思路。 冒泡排序&#xff…

golang开发环境搭建与踩坑记录

文章目录 一、安装下载1、go环境2、ide 二、基本使用1、运行2、结构体与方法函数指针3、闭包4、指针5、map6、接口7、异常 三、包管理1、go mod语法2、项目下载所有依赖 一、安装下载 1、go环境 下载地址&#xff1a;https://go.dev/dl/ 或者&#xff1a;https://golang.goog…

19.x86游戏实战-创建MFC动态链接库

免责声明&#xff1a;内容仅供学习参考&#xff0c;请合法利用知识&#xff0c;禁止进行违法犯罪活动&#xff01; 本次游戏没法给 内容参考于&#xff1a;微尘网络安全 工具下载&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/1rEEJnt85npn7N38Ai0_F2Q?pwd6tw3 提…

向量数据库选择浅谈

初见大模型 作为新手接触大模型后&#xff0c;LLM模型、Embedding模型、rank模型、vector模型等等选择上可谓是一步一个坑&#xff0c;迷茫的走在迷茫的大路上。总之各种途径去选择合适的模型&#xff0c;今天了解下向量数据库选择依据。 借鉴前人 学习之前先看看大家都在关注…

基于java+springboot+vue实现的中小企业人事管理系统(文末源码+Lw)128

基于SpringBootVue的实现的中小企业人事管理系统&#xff08;源码数据库万字Lun文流程图ER图结构图ppt演示视频软件包&#xff09; 系统角色&#xff1a; 员工、管理员 系统功能&#xff1a; 管理员登录 进入中小企业人事管理系统可以查看首页、个人中心、员工管理、部门信息管…

arthas监控本地耗时代码(windows)

1、安装 curl -O https://arthas.aliyun.com/arthas-boot.jar 2、运行 java -jar arthas-boot.jar 3、选择监控的程序端口 运行后如下&#xff1a;第二个是我的后端程序&#xff0c;我选择2后回车 4、监控代码块 trace com.example.demo.service.impl.LoginServiceImp…

Docker 镜像使用和安装

​ 1、简介 Docker是一个开源的应用容器引擎&#xff1b;是一个轻量级容器技术&#xff1b; Docker支持将软件编译成一个镜像&#xff1b;然后在镜像中各种软件做好配置&#xff0c;将镜像发布出去&#xff0c;其他使用者可以直接使用这个镜像&#xff1b; 运行中的这个镜像…

Java面试八股之Redis怎么实现消息队列

Redis怎么实现消息队列 Redis实现消息队列主要依赖于其内置的数据结构&#xff0c;如List、Pub/Sub&#xff08;发布/订阅&#xff09;和Stream。下面将分别介绍这三种方式及其特点&#xff1a; 1. List实现消息队列 Redis的List是一个双向链表&#xff0c;支持快速的头部和…

【学术会议征稿】第六届信息与计算机前沿技术国际学术会议(ICFTIC 2024)

第六届信息与计算机前沿技术国际学术会议(ICFTIC 2024) 2024 6th International Conference on Frontier Technologies of Information and Computer 第六届信息与计算机前沿技术国际学术会议(ICFTIC 2024)将在中国青岛举行&#xff0c;会期是2024年11月8-10日&#xff0c;为…

Python面试宝典第15题:岛屿数量

题目 在二维网格地图上&#xff0c;1 表示陆地&#xff0c;0 表示水域。如果相邻的陆地可以水平或垂直连接&#xff0c;则它们属于同一块岛屿。请进行编码&#xff0c;统计地图上的岛屿数量。比如&#xff1a;下面的二维网格地图&#xff0c;其岛屿数量为3。 基础知识 解决这类…

Linux入门以及Linux文件编程学习

Linux学习必备 首先我们学习Linux必须安装一个虚拟机&#xff0c;我是跟着韦东山老师安装的&#xff0c;具体可以跟着视频操作&#xff0c;简单易懂&#xff1a;安装虚拟机 Linux入门最基本简单的指令 一、Vi的使用 Vi文件名 创建或者打开一个文件&#xff0c;进入默认命令行…

[论文笔记] pai-megatron-patch Qwen2-CT 长文本rope改yarn

更改: # Copyright (c) 2024 Alibaba PAI and Nvidia Megatron-LM Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License a…

Linux——多路复用之select

目录 前言 一、select的认识 二、select的接口 三、select的使用 四、select的优缺点 前言 在前面&#xff0c;我们学习了五种IO模型&#xff0c;对IO有了基本的认识&#xff0c;知道了select效率很高&#xff0c;可以等待多个文件描述符&#xff0c;那他是如何等待的呢&a…

JavaScript 获取 url(get)参数

https://andi.cn/page/621584.html

Gitee 使用教程1-SSH 公钥设置

一、生成 SSH 公钥 1、打开终端&#xff08;Windows PowerShell 或 Git Bash&#xff09;&#xff0c;通过命令 ssh-keygen 生成 SSH Key&#xff1a; ssh-keygen -t ed25519 -C "Gitee SSH Key" 随后摁三次回车键&#xff08;Enter&#xff09; 2、查看生成的 SSH…

大鲸鱼docker-compose单机容器集群编排工具

目录 一、Docker-compose 概述 二、Docker-compose简介 三、YML文件格式及编写注意事项 1.yml文件是什么 2.yml问价使用注意事项 3.yml文件的基本数据结构 四、Docker-compose 配置 1.Docker-Compose 配置常用字段 2.Docker Compose常用命令 3.使用Docker-compose创建…

Python解释器:CPython 解释器

一、什么是python解释器 Python解释器是一种用于执行Python代码的程序。 它将Python源代码转换为机器语言或字节码&#xff0c;从而使计算机能够执行。 1.1 Python解释器分类 1、CPython CPython 是 Python 的主要实现&#xff0c;由 C 语言编写。大多数用户在日常开发中使…

django实现用户的注册、登录、注销功能

创建django项目的步骤&#xff1a;Django项目的创建步骤-CSDN博客 一、前置工作 配置数据库&#xff0c;设置数据库引擎为mysql 1、在settings文件中找到DATABASES, 配置以下内容 DATABASES {"default": {ENGINE: django.db.backends.mysql, # 数据库引擎NAME: dja…