maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jinrui.a.chen@tieto.com" <jinrui.a.c...@tieto.com>
Subject Error Info using plugin : Can not add the same measure twice
Date Thu, 19 May 2016 02:10:18 GMT
Hi,
I get error when executing sonar maven plugin 4.5.7/4.5.6. Could you give me any suggestions?
 Thanks a lot.
Related versions:
java: 1.6
sonar: 4.5.6
org.codehaus.mojo:cobertura-maven-plugin:2.7
org.codehaus.sonar:sonar-maven-plugin:4.5.7
maven: 3.0.5


Error log: 
[ERROR] Failed to execute goal org.codehaus.sonar:sonar-maven-plugin:4.5.7:sonar (default-cli)
on project foundation-project: Can not add the same measure twice on org.sonar.api.resources.File@29c2f649[key=src/main/java/se/ericsson/sig/provisioning/ProvisioningSubscriberConstants.java,deprecatedKey=se.ericsson.sig.provisioning.ProvisioningSubscriberConstants,path=src/main/java/se/ericsson/sig/provisioning/ProvisioningSubscriberConstants.java,dir=se/ericsson/sig/provisioning,filename=ProvisioningSubscriberConstants.java,language=Java]:
org.sonar.api.measures.Measure@3eb7480a[metricKey=lines_to_cover,metric=Metric[id=10038,key=lines_to_cover,description=Lines
to cover,type=INT,direction=1,domain=<null>,name=lines_to_cover,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false],value=1.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<null>,url=<null>,characteristic=<null>,requirement=<null>,personId=<null>,persistenceMode=FULL]
-> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.sonar:sonar-maven-plugin:4.5.7:sonar
(default-cli) on project foundation-project: Can not add the same measure twice on org.sonar.api.resources.File@29c2f649[key=src/main/java/se/ericsson/sig/provisioning/ProvisioningSubscriberConstants.java,deprecatedKey=se.ericsson.sig.provisioning.ProvisioningSubscriberConstants,path=src/main/java/se/ericsson/sig/provisioning/ProvisioningSubscriberConstants.java,dir=se/ericsson/sig/provisioning,filename=ProvisioningSubscriberConstants.java,language=Java]:
org.sonar.api.measures.Measure@3eb7480a[metricKey=lines_to_cover,metric=Metric[id=10038,key=lines_to_cover,description=Lines
to cover,type=INT,direction=1,domain=<null>,name=lines_to_cover,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false],value=1.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<null>,url=<null>,characteristic=<null>,requirement=<null>,personId=<null>,persistenceMode=FULL]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not add the same measure twice
on org.sonar.api.resources.File@29c2f649[key=src/main/java/se/ericsson/sig/provisioning/ProvisioningSubscriberConstants.java,deprecatedKey=se.ericsson.sig.provisioning.ProvisioningSubscriberConstants,path=src/main/java/se/ericsson/sig/provisioning/ProvisioningSubscriberConstants.java,dir=se/ericsson/sig/provisioning,filename=ProvisioningSubscriberConstants.java,language=Java]:
org.sonar.api.measures.Measure@3eb7480a[metricKey=lines_to_cover,metric=Metric[id=10038,key=lines_to_cover,description=Lines
to cover,type=INT,direction=1,domain=<null>,name=lines_to_cover,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false],value=1.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<null>,url=<null>,characteristic=<null>,requirement=<null>,personId=<null>,persistenceMode=FULL]
at org.sonar.maven.ExceptionHandling.handle(ExceptionHandling.java:37)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:175)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.sonar.api.utils.SonarException: Can not add the same measure twice on org.sonar.api.resources.File@29c2f649[key=src/main/java/se/ericsson/sig/provisioning/ProvisioningSubscriberConstants.java,deprecatedKey=se.ericsson.sig.provisioning.ProvisioningSubscriberConstants,path=src/main/java/se/ericsson/sig/provisioning/ProvisioningSubscriberConstants.java,dir=se/ericsson/sig/provisioning,filename=ProvisioningSubscriberConstants.java,language=Java]:
org.sonar.api.measures.Measure@3eb7480a[metricKey=lines_to_cover,metric=Metric[id=10038,key=lines_to_cover,description=Lines
to cover,type=INT,direction=1,domain=<null>,name=lines_to_cover,qualitative=false,userManaged=false,enabled=true,origin=JAV,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false],value=1.0,data=<null>,description=<null>,alertStatus=<null>,alertText=<null>,tendency=<null>,date=<null>,variation1=<null>,variation2=<null>,variation3=<null>,variation4=<null>,variation5=<null>,url=<null>,characteristic=<null>,requirement=<null>,personId=<null>,persistenceMode=FULL]
at org.sonar.batch.index.DefaultIndex.addMeasure(DefaultIndex.java:222)
at org.sonar.batch.DefaultSensorContext.saveMeasure(DefaultSensorContext.java:176)
at org.sonar.plugins.cobertura.CoberturaReportParser.collectPackageMeasures(CoberturaReportParser.java:84)
at org.sonar.plugins.cobertura.CoberturaReportParser.access$000(CoberturaReportParser.java:43)
at org.sonar.plugins.cobertura.CoberturaReportParser$1.stream(CoberturaReportParser.java:66)
at org.sonar.api.utils.StaxParser.parse(StaxParser.java:109)
at org.sonar.api.utils.StaxParser.parse(StaxParser.java:89)
at org.sonar.api.utils.StaxParser.parse(StaxParser.java:79)
at org.sonar.plugins.cobertura.CoberturaReportParser.parse(CoberturaReportParser.java:69)
at org.sonar.plugins.cobertura.CoberturaReportParser.parseReport(CoberturaReportParser.java:57)
at org.sonar.plugins.cobertura.CoberturaSensor.parseReport(CoberturaSensor.java:69)
at org.sonar.plugins.cobertura.CoberturaSensor.analyse(CoberturaSensor.java:64)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
... 21 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :foundation-project
Build step 'Invoke top-level Maven targets' marked b



jinrui.a.chen@tieto.com
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message