jenkinsci / fortify-plugin

Fortify Jenkins plugin
https://plugins.jenkins.io/fortify
Other
23 stars 29 forks source link

Cannot build the plugin #47

Closed rsenden closed 2 years ago

rsenden commented 3 years ago

Following the instructions at https://github.com/jenkinsci/fortify-plugin/blob/master/docs/DEVELOPER.md, the build fails:

$ git clone https://github.com/jenkinsci/fortify-plugin.git
   ...
$ cd fortify-plugin/
$ git checkout v20.2.34
   ...
$ mvn package -Dssc.url=http://localhost:2020/ssc
[INFO] Scanning for projects...
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:2.2 is missing, no dependency information available
[WARNING] Failed to build parent project for org.jenkins-ci.plugins:fortify:hpi:20.2.34
[INFO]
[INFO] -------------------< org.jenkins-ci.plugins:fortify >-------------------
[INFO] Building Fortify 20.2.34
[INFO] --------------------------------[ hpi ]---------------------------------
...
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ fortify ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 31 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ fortify ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 53 source files to C:\WORK\Development\Java\workspace\fortify-plugin\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] java.nio.file.NoSuchFileException: C:\WORK\Development\Java\workspace\fortify-plugin\target\classes\META-INF\annotations\hudson.Extension
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
ghost commented 3 years ago

@rsenden I might be happening because of this issue https://github.com/jenkinsci/configuration-as-code-plugin/issues/613

akaryakina commented 3 years ago

@rsenden I use hpi:run, and it compiles fine, with both new location of the ssc-restapi-client and old

rsenden commented 3 years ago

@rsenden I might be happening because of this issue jenkinsci/configuration-as-code-plugin#613

@evgeny-sem Thanks for pointing me to this link; indeed changing to Java 8 allows the build to complete successfully (initially I was using Java 11). I think it would be useful to add a note to the instructions for developers that Java 8 is required to build the plugin successfully.

akaryakina commented 2 years ago

Starting from 22.1.38, we can now build with Java 11 (as well as Java 8).