我们已经在Sonar中扫描了主代码,然后更新了Pom文件以与内部主pom集成并更改软件包名称。之后,该分支和其他分支的声纳开始失败,并出现Null指针异常。我对这里出什么问题没有任何线索,需要一些专家意见。请帮我解决这个问题。
我尝试了多种命令组合,但没有任何效果,但是用于master分支的同一命令可以正常工作。
mvn sonar:sonar -Dsonar.branch.name=shankar -Dsonar.login=[token]
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"
xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<pluginGroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>
<mirrors>
<mirror>
<id>artifactory</id>
<mirrorOf>external:*,!central,!spring,!security</mirrorOf>
<name>Artifactory Pro</name>
<url>https://artifactory.trusted.company.com/mavenrepo</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<sonar.host.url>
https://sonarqube.trusted.company.com
</sonar.host.url>
</properties>
</profile>
</profiles>
</settings>
[INFO] 12:09:11.218 SCM collecting changed files in the branch
[DEBUG] 12:09:11.237 readpipe [git, --version],/usr/local/bin
[DEBUG] 12:09:11.253 readpipe may return 'git version 2.10.1'
[DEBUG] 12:09:11.255 remaining output:
[DEBUG] 12:09:11.255 readpipe [git, config, --system, --edit],/usr/local/bin
[DEBUG] 12:09:11.271 readpipe may return '/usr/local/git/etc/gitconfig'
[DEBUG] 12:09:11.272 remaining output:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 55.152 s
[INFO] Finished at: 2019-04-15T12:09:11+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project card-issuance-ms: Unable to load component class org.sonar.scanner.phases.AbstractPhaseExecutor: Unable to load component class org.sonar.scanner.phases.PostJobsExecutor: Unable to load component class org.sonar.scanner.bootstrap.ScannerExtensionDictionnary: Unable to load component class org.sonar.scanner.sensor.DefaultSensorContext: Unable to load component class org.sonar.scanner.scan.filesystem.DefaultModuleFileSystem: Unable to load component class org.sonar.scanner.scan.filesystem.StatusDetection: Unable to load component class org.sonar.scanner.scm.ScmChangedFiles: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar (default-cli) on project card-issuance-ms: Unable to load component class org.sonar.scanner.phases.AbstractPhaseExecutor
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to load component class org.sonar.scanner.phases.AbstractPhaseExecutor
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scm.ScmChangedFiles
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:65)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance (BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance (DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:63)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:621)
at org.picocontainer.containers.ImmutablePicoContainer.getComponent (ImmutablePicoContainer.java:40)
at org.picocontainer.DefaultPicoContainer.getInstance (DefaultPicoContainer.java:718)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:63)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance (BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance (DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:63)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance (BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance (DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:63)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance (BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance (DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:63)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance (BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance (DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:63)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance (BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance (ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter (SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments (ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run (ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe (AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance (ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance (AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance (AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance (Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance (DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent (ComponentContainer.java:63)
at org.picocontainer.DefaultPicoContainer.getComponent (DefaultPicoContainer.java:678)
at org.sonar.core.platform.ComponentContainer.getComponentByType (ComponentContainer.java:281)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart (ModuleScanContainer.java:164)
at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan (ProjectScanContainer.java:319)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively (ProjectScanContainer.java:314)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart (ProjectScanContainer.java:288)
at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:122)
at org.sonar.scanner.task.ScanTask.execute (ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart (TaskContainer.java:82)
at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask (GlobalContainer.java:131)
at org.sonar.batch.bootstrapper.Batch.doExecuteTask (Batch.java:116)
at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:71)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy24.execute (Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute (EmbeddedScanner.java:185)
at org.sonarsource.scanner.api.EmbeddedScanner.execute (EmbeddedScanner.java:137)
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:65)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:104)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: java.lang.NullPointerException
at org.eclipse.jgit.lib.ObjectIdOwnerMap.get (ObjectIdOwnerMap.java:138)
at org.eclipse.jgit.revwalk.RevWalk.parseAny (RevWalk.java:888)
at org.eclipse.jgit.revwalk.RevWalk.parseCommit (RevWalk.java:800)
at org.sonarsource.scm.git.GitScmProvider.prepareTreeParser (GitScmProvider.java:196)