the two latest Java Properties plugin versions 1.6 and 1.7 don’t work when analyzing one of our projects.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 46:09.436s
[INFO] Finished at: Tue May 10 02:39:30 CEST 2016
[INFO] Final Memory: 103M/494M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar (default-cli) on project platform-parent: Unable to analyze file: D:\sandboxes\abcd\src\platform-src\com.ourcompany.xyzmodule\src\com\ourcompany\xyzmodule\client\t9keyboard\resources\T9KeyEvents.properties: Unable to highlight file [moduleKey=abcd.xyzmodule:com.ourcompany.xyzmodule, relative=src/com/ourcompany/xyzmodule/client/t9keyboard/resources/T9KeyEvents.properties, basedir=D:\sandboxes\abcd\src\platform-src\com.ourcompany.xyzmodule] from offset 15844 to offset 15866: 15866 is not a valid offset for file [moduleKey=abcd.xyzmodule:com.ourcompany.xyzmodule, relative=src/com/ourcompany/xyzmodule/client/t9keyboard/resources/T9KeyEvents.properties, basedir=D:\sandboxes\abcd\src\platform-src\com.ourcompany.xyzmodule]. Max offset is 15863 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.1:sonar (default-cli) on project platform-parent: Unable to analyze file: D:\sandboxes\abcd\src\platform-src\com.ourcompany.xyzmodule\src\com\ourcompany\xyzmodule\client\t9keyboard\resources\T9KeyEvents.properties
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: Unable to analyze file: D:\sandboxes\abcd\src\platform-src\com.ourcompany.xyzmodule\src\com\ourcompany\xyzmodule\client\t9keyboard\resources\T9KeyEvents.properties
at org.sonarsource.scanner.maven.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:36)
at org.sonarsource.scanner.maven.bootstrap.RunnerBootstrapper.execute(RunnerBootstrapper.java:81)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:112)
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.squidbridge.api.AnalysisException: Unable to analyze file: D:\sandboxes\abcd\src\platform-src\com.ourcompany.xyzmodule\src\com\ourcompany\xyzmodule\client\t9keyboard\resources\T9KeyEvents.properties
at org.sonar.squidbridge.AstScanner.scanFiles(AstScanner.java:127)
at org.sonar.plugins.jproperties.JavaPropertiesSquidSensor.analyse(JavaPropertiesSquidSensor.java:86)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:98)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:185)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:243)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:238)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:228)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:132)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:117)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
at org.sonar.runner.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:67)
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.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:61)
at com.sun.proxy.$Proxy16.execute(Unknown Source)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:274)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:165)
at org.sonar.runner.api.EmbeddedRunner.runAnalysis(EmbeddedRunner.java:152)
at org.sonarsource.scanner.maven.bootstrap.RunnerBootstrapper.execute(RunnerBootstrapper.java:78)
... 22 more
Caused by: java.lang.IllegalArgumentException: Unable to highlight file [moduleKey=abcd.xyzmodule:com.ourcompany.xyzmodule, relative=src/com/ourcompany/xyzmodule/client/t9keyboard/resources/T9KeyEvents.properties, basedir=D:\sandboxes\abcd\src\platform-src\com.ourcompany.xyzmodule] from offset 15844 to offset 15866
at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:85)
at org.sonar.batch.source.DefaultHighlightable$DefaultHighlightingBuilder.highlight(DefaultHighlightable.java:79)
at org.sonar.jproperties.ast.visitors.SyntaxHighlighterVisitor.visitNode(SyntaxHighlighterVisitor.java:91)
at com.sonar.sslr.impl.ast.AstWalker.visitNode(AstWalker.java:114)
at com.sonar.sslr.impl.ast.AstWalker.visit(AstWalker.java:85)
at com.sonar.sslr.impl.ast.AstWalker.visitChildren(AstWalker.java:99)
at com.sonar.sslr.impl.ast.AstWalker.visit(AstWalker.java:87)
at com.sonar.sslr.impl.ast.AstWalker.visitChildren(AstWalker.java:99)
at com.sonar.sslr.impl.ast.AstWalker.visit(AstWalker.java:87)
at com.sonar.sslr.impl.ast.AstWalker.walkAndVisit(AstWalker.java:69)
at org.sonar.squidbridge.AstScanner.scanFiles(AstScanner.java:106)
... 53 more
Caused by: java.lang.IllegalArgumentException: 15866 is not a valid offset for file [moduleKey=abcd.xyzmodule:com.ourcompany.xyzmodule, relative=src/com/ourcompany/xyzmodule/client/t9keyboard/resources/T9KeyEvents.properties, basedir=D:\sandboxes\abcd\src\platform-src\com.ourcompany.xyzmodule]. Max offset is 15863
at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:148)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:267)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:262)
at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:83)
... 63 more
[ERROR]
It looks like the file T9KeyEvents.properties causes the error.
Because of the above problem we’re forced to use the older plugin version 1.5 which works fine.
Thank you in advance.