文件移动后 SonarQube 分析任务错误
SonarQube Analysis Task Error After File Move
作为 TFS 2015/15 RC2 vNext 构建的一部分,我们一直在 C# 项目上使用 SonarQube 分析,多年来一直运行良好。
几天前我重构了代码的几个方面,这包括将文件移动到同一项目中的新文件夹中,而不是 class 名称更改等。Visual Studio 没有正确处理这个问题,我不得不单独删除一些文件并将其重新添加到项目中。
我们的分析现在失败了,在查看分析任务的日志时,我可以看到以下错误:
ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVe_-iOpE8SSKScA9O_3 java.lang.IllegalStateException:
Original file OriginalFile{id=1363, uuid='ca50dc09-5d0b-4083-9e52-eb0f66361422', key='MIS:MIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/XXX/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs'}
already registered for file
ComponentImpl{key='StanMIS:StanMIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/Smp/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs', type=FILE, uuid='AVe_-nQKU1hbfyCkniEZ', name='', description='null', fileAttributes=FileAttributes{languageKey='cs', unitTest=false},
reportAttributes=ReportAttributes{ref=1506, version='null',
path='Models/Smp/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs'}}.
Unable to register OriginalFile{id=1353, uuid='1488ce7d-094c-4859-9e23-adae0f1ac2a3', key='StanMIS:StanMIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/XXX/Grids/DStanContacts/SmpDStanContactFilterModel.cs'}.
at com.google.common.base.Preconditions.checkState(Preconditions.java:197) ~[guava-18.0.jar:na]
at org.sonar.server.computation.filemove.MutableMovedFilesRepositoryImpl.setOriginalFile(MutableMovedFilesRepositoryImpl.java:41) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.filemove.FileMoveDetectionStep.registerMatches(FileMoveDetectionStep.java:144) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.filemove.FileMoveDetectionStep.execute(FileMoveDetectionStep.java:139) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:75) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:81) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:56) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35) [sonar-server-6.0.jar:na]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_45]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_45]
ERROR [o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=MIS | type=REPORT | id=AVe_-iOpE8SSKScA9O_3 | submitter=XXX | time=24633ms
你面对https://jira.sonarsource.com/browse/SONAR-8013。它已在 6.1 版本中修复。
作为 TFS 2015/15 RC2 vNext 构建的一部分,我们一直在 C# 项目上使用 SonarQube 分析,多年来一直运行良好。
几天前我重构了代码的几个方面,这包括将文件移动到同一项目中的新文件夹中,而不是 class 名称更改等。Visual Studio 没有正确处理这个问题,我不得不单独删除一些文件并将其重新添加到项目中。
我们的分析现在失败了,在查看分析任务的日志时,我可以看到以下错误:
ERROR [o.s.s.c.t.CeWorkerCallableImpl] Failed to execute task AVe_-iOpE8SSKScA9O_3 java.lang.IllegalStateException:
Original file OriginalFile{id=1363, uuid='ca50dc09-5d0b-4083-9e52-eb0f66361422', key='MIS:MIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/XXX/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs'}
already registered for file
ComponentImpl{key='StanMIS:StanMIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/Smp/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs', type=FILE, uuid='AVe_-nQKU1hbfyCkniEZ', name='', description='null', fileAttributes=FileAttributes{languageKey='cs', unitTest=false},
reportAttributes=ReportAttributes{ref=1506, version='null',
path='Models/Smp/Grids/ProjectTeams/SmpProjectTeamFilterModel.cs'}}.
Unable to register OriginalFile{id=1353, uuid='1488ce7d-094c-4859-9e23-adae0f1ac2a3', key='StanMIS:StanMIS:4E9625D2-557E-450C-90CC-A6B6FB57B6C9:Models/XXX/Grids/DStanContacts/SmpDStanContactFilterModel.cs'}.
at com.google.common.base.Preconditions.checkState(Preconditions.java:197) ~[guava-18.0.jar:na]
at org.sonar.server.computation.filemove.MutableMovedFilesRepositoryImpl.setOriginalFile(MutableMovedFilesRepositoryImpl.java:41) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.filemove.FileMoveDetectionStep.registerMatches(FileMoveDetectionStep.java:144) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.filemove.FileMoveDetectionStep.execute(FileMoveDetectionStep.java:139) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.taskprocessor.report.ReportTaskProcessor.process(ReportTaskProcessor.java:75) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:81) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:56) ~[sonar-server-6.0.jar:na]
at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35) [sonar-server-6.0.jar:na]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_45]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_45]
ERROR [o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=MIS | type=REPORT | id=AVe_-iOpE8SSKScA9O_3 | submitter=XXX | time=24633ms
你面对https://jira.sonarsource.com/browse/SONAR-8013。它已在 6.1 版本中修复。