Sonar INVALID HASH,但预期哈希和下载哈希相同
Sonar INVALID HASH, but the expected and download hashes are identical
升级到 5.1 后,Sonar 在下载 jdbc 驱动程序时显示 INVALID HASH 错误。在我们的任何环境中执行 mvn sonar:sonar 时都会发生这种情况:bamboo、jenkins 或我们的本地机器。尝试使用 sonar-maven-plugin 2.3 到 2.6。文件下载成功,甚至具有预期的哈希值。
这是错误信息:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project XXXX: INVALID HASH: File /Users/XXXX/.sonar/cache/_tmp/fileCache5136138904337145345.tmp was expected to have hash 4aab6e384bf857f02073daf51b96b967
but was downloaded with hash 4aab6e384bf857f02073daf51b96b967
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: INVALID HASH: File /Users/XXXX/.sonar/cache/_tmp/fileCache5136138904337145345.tmp was expected to have hash 4aab6e384bf857f02073daf51b96b967
奇怪的是错误信息在hash后面有一个换行符,但是jdbc-driver.txt没有换行符,甚至做了一个hexdump来确定。
jdbc-driver.txt
mysql-connector-java-5.1.34.jar|4aab6e384bf857f02073daf51b96b967
hexdump -C jdbc-driver.txt
00000000 6d 79 73 71 6c 2d 63 6f 6e 6e 65 63 74 6f 72 2d |mysql-connector-|
00000010 6a 61 76 61 2d 35 2e 31 2e 33 34 2e 6a 61 72 7c |java-5.1.34.jar||
00000020 34 61 61 62 36 65 33 38 34 62 66 38 35 37 66 30 |4aab6e384bf857f0|
00000030 32 30 37 33 64 61 66 35 31 62 39 36 62 39 36 37 |2073daf51b96b967|
00000040 0a |.|
00000041
欢迎提出任何建议!
文件 jdbc-driver.txt 似乎已损坏。尾随 0a 不是预期的。您是否使用了可能会在下载过程中更改此文件的 HTTP 代理之王?
升级到 5.1 后,Sonar 在下载 jdbc 驱动程序时显示 INVALID HASH 错误。在我们的任何环境中执行 mvn sonar:sonar 时都会发生这种情况:bamboo、jenkins 或我们的本地机器。尝试使用 sonar-maven-plugin 2.3 到 2.6。文件下载成功,甚至具有预期的哈希值。
这是错误信息:
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project XXXX: INVALID HASH: File /Users/XXXX/.sonar/cache/_tmp/fileCache5136138904337145345.tmp was expected to have hash 4aab6e384bf857f02073daf51b96b967
but was downloaded with hash 4aab6e384bf857f02073daf51b96b967
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: INVALID HASH: File /Users/XXXX/.sonar/cache/_tmp/fileCache5136138904337145345.tmp was expected to have hash 4aab6e384bf857f02073daf51b96b967
奇怪的是错误信息在hash后面有一个换行符,但是jdbc-driver.txt没有换行符,甚至做了一个hexdump来确定。
jdbc-driver.txt
mysql-connector-java-5.1.34.jar|4aab6e384bf857f02073daf51b96b967
hexdump -C jdbc-driver.txt
00000000 6d 79 73 71 6c 2d 63 6f 6e 6e 65 63 74 6f 72 2d |mysql-connector-|
00000010 6a 61 76 61 2d 35 2e 31 2e 33 34 2e 6a 61 72 7c |java-5.1.34.jar||
00000020 34 61 61 62 36 65 33 38 34 62 66 38 35 37 66 30 |4aab6e384bf857f0|
00000030 32 30 37 33 64 61 66 35 31 62 39 36 62 39 36 37 |2073daf51b96b967|
00000040 0a |.|
00000041
欢迎提出任何建议!
文件 jdbc-driver.txt 似乎已损坏。尾随 0a 不是预期的。您是否使用了可能会在下载过程中更改此文件的 HTTP 代理之王?