我该如何解决错误声纳扫描仪错误:项目'my:project'不能具有2个带有以下密钥的模块:my:project:my:project错误:

问题描述

当我直接在Jenkins的Excecute声纳扫描仪的“分析参数”部分中给出分析属性时,它可以正常工作。 但是,当我将相同的属性放入文件sonar-project.properties并尝试调用文件以执行其抛出错误

sonar.userHome=mydir/sonar_cache
sonar.projectBaseDir=mydir/project/
sonar.working.directory=mydir/project//sonar
sonar.scm.disabled=false
sonar.scm.provider=git

sonar.projectKey=my:project
sonar.projectName=Project
sonar.projectVersion=91
sonar.host.url=https://onesonarcloud.vpc.com/
sonar.login=-------

sonar.includePlugins=views,report,buildbreaker
sonar.issuesReport.html.enable=true
sonar.issuesReport.console.enable=true
sonar.sourceEncoding=UTF-8
sonar.log.level=INFO
sonar.analysis.mode=publish
sonar.skipDesign=true

#sonar build breaker report processing time
sonar.buildbreaker.queryMaxAttempts=3000
sonar.buildbreaker.queryInterval=30000
sonar.buildbreaker.skip=false 
sonar.timemachine.period1 = 'prevIoUs_analysis'  
sonar.dynamicAnalysis=reuseReports
sonar.java.coveragePlugin=jacoco
sonar.exclusions=**/*.css,**/*.sql,**/*.js,**/*.htm,**/*.html,**/*.jsp,**/model/*,**ws-clients/ws/*,**/provctl/broker/*java,Shared-persistence/src/com/verizon/pc/persistence/entity/*java,**/prism/ade/brokers/*java,**/prism/brokers/db/db2/*java,**/prism/localaccess/brokers/*java


sonar.modules=MODULE1,MODULE2

#MODULE1 MODULE SETTINGS
MODULE1.sonar.projectKey=MODULE1
MODULE1.sonar.projectName=MODULE1
MODULE1.sonar.projectBaseDir=mydir/project/
MODULE1.sonar.sources=/ProvisionController/module1/src
MODULE1.sonar.surefire.reportsPath=testing/build_tests/provctl/reports
MODULE1.sonar.jacoco.reportPaths=target/jacoco_provctl.exec
MODULE1.sonar.junit.reportsPath=testing/build_tests/provctl/reports
MODULE1.sonar.tests=/ProvisionController/module1/test
MODULE1.sonar.java.tests=/ProvisionController/module1/test
MODULE1.sonar.java.binaries=/**/build
MODULE1.sonar.java.libraries=/ProvisionController/ProvisionController/EarContent/APP-INF/lib/*.jar,buildtools/lib_test/*.jar,vzthirdparty/lib/*jar,/Common/**/*jar,/ws-clients/**/*jar,/Logging/**/*jar,/apps/opt/weblogic/weblogic121mp3/wlserver/**/*.jar
MODULE1.sonar.java.test.binaries=testing/build_tests/common-core,testing/build_tests/provctl
MODULE1.sonar.java.test.libraries=/ProvisionController/ProvisionController/EarContent/APP-INF/lib/*.jar,/apps/opt/weblogic/weblogic121mp3/wlserver/**/*.jar
#MODULE2 MODULE SETTINGS
MODULE2.sonar.projectKey=MODULE2
MODULE2.sonar.projectName=MODULE2
MODULE2.sonar.projectBaseDir=mydir/project/
MODULE2.sonar.sources=/ProvisionController/module2/src
MODULE2.sonar.surefire.reportsPath=testing/build_tests/prism/reports
MODULE2.sonar.jacoco.reportPath=testing/build_tests/prism/jacoco_prism.exec
MODULE2.sonar.junit.reportsPath=testing/build_tests/prism/reports
MODULE2.sonar.tests=/ProvisionController/module2/test
MODULE2.sonar.java.tests=/ProvisionController/module2/test
MODULE2.sonar.java.binaries=/**/build
MODULE2.sonar.java.libraries=/ProvisionController/ProvisionController/EarContent/APP-INF/lib/*.jar,/apps/opt/weblogic/weblogic121mp3/wlserver/**/*.jar
MODULE2.sonar.java.test.binaries=testing/build_tests/prism
MODULE2.sonar.java.test.libraries=/ProvisionController/ProvisionController/EarContent/APP-INF/lib/*.jar,/apps/opt/weblogic/weblogic121mp3/wlserver/**/*.jar

INFO:项目根配置文件:/mydir/sonar-project.properties INFO:在SonarCloud上分析INFO:认语言环境:“ en_US”,来源 代码编码:“ UTF-8”警告:SonarScanner将需要Java 11才能运行 从SonarQube 8.x开始INFO:加载全局设置INFO:加载全局 设置(完成)|时间= 5588ms信息:服务器ID: 5CD06320-AXMqH8ooQ9pWqCaUna0x信息:用户缓存: mydir / sonar_cache / cache INFO:加载/下载插件INFO:加载插件 索引信息:加载插件索引(完成)| time = 176ms INFO:加载/下载 插件(完成)| time = 13541ms信息:已加载的核心扩展: developer-scanner INFO:处理项目属性INFO: -------------------------------------------------- ---------------------- INFO:执行失败INFO: -------------------------------------------------- ---------------------- INFO:总时间:30.493s INFO:最终内存:32M / 471M INFO: -------------------------------------------------- ----------------------错误:SonarScanner执行期间出错错误:项目'my:project' 不能有2个具有以下密钥的模块:my:project:my:project 错误错误:使用-X开关重新运行SonarScanner以启用完整功能 调试日志。警告:在以下位置找不到“ report-task.txt” 工作区。 SonarScanner成功了吗?错误:SonarQube扫描仪 以非零代码退出:2完成:失败

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)