swlaschin/sonar-fsharpsecurity-plugin

Build failure when trying to run mvn package or install

abelbraaksma opened this issue · 1 comments

Since the AppVeyor pre-compiled JAR file and binaries aren't available anymore, I figured I try to build it myself. I installed Maven and all's well (runs tests etc) but fails at the end with a Failure message. Prior to this there are only warnings (like Net Core App 2.1 not being supported anymore).

The F# code compiles just fine and the results can be found in the Debug\bin dirs. The jar file does not get compiled.

Any idea how to fix this? I may be able to sort it out, but figured I'd report it in case anybody else has had this issue, or encounters it in the future.

> mvn clean package
....
....
21:06:17 [Information] Writing rule definitions file to "../sonar-fsharpsecurity-plugin/src/main/resources\\rules.xml"
21:06:18 [Information] Writing quality profile file to "../sonar-fsharpsecurity-plugin/src/main/resources\\profile.txt"
21:06:18 [Information] Done. ElapsedTime=00:00:00.1701691.
[INFO]
[INFO] --- maven-assembly-plugin:3.1.1:single (make-assembly) @ SonarAnalyzer.FSharp ---
[INFO] Reading assembly descriptor: zip-assembly.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for SonarQube F# Security Analyzer Plugin 0.0.0.1:
[INFO]
[INFO] SonarQube F# Security Analyzer Plugin .............. SUCCESS [  1.804 s]
[INFO] Sonar F# Security Plugin :: SonarAnalyzer.FSharp ... FAILURE [ 57.287 s]
[INFO] Sonar F# Security Plugin :: Java Plugin ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  59.705 s
[INFO] Finished at: 2022-04-28T21:06:18+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.1:single (make-assembly) on project SonarAnalyzer.FSharp: Failed to create assembly: Error creating assembly archive zip-assembly: archive cannot be empty -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 <args> -rf :SonarAnalyzer.FSharp

The solution was in #6, which fixes the path in the zip-assembly.xml file.