Release failed due to findbugs

276 views
Skip to first unread message

Aleksi Simell

unread,
Jul 25, 2016, 6:38:37 AM7/25/16
to jenkin...@googlegroups.com
Hi,

I tried to build my plugin with mvn release:prepare release:perform and got the following error log:

[INFO] --- findbugs-maven-plugin:3.0.3:findbugs (findbugs) @ influxdb ---

    [INFO] Fork Value is true

         [java] Warnings generated: 1

    [INFO] Done FindBugs Analysis....

    [INFO] 

    [INFO] <<< findbugs-maven-plugin:3.0.3:check (findbugs) < :findbugs @ influxdb <<<

    [INFO] 

    [INFO] --- findbugs-maven-plugin:3.0.3:check (findbugs) @ influxdb ---

    [INFO] BugInstance size is 1

    [INFO] Error size is 0

    [INFO] Total bugs: 1

    [INFO] req must be non-null but is marked as nullable [jenkinsci.plugins.influxdb.DescriptorImpl] At DescriptorImpl.java:[lines 47-49] NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE

    [INFO] 

    

    

    To see bug detail using the Findbugs GUI, use the following command "mvn findbugs:gui"

    

    

    

    [INFO] ------------------------------------------------------------------------

    [INFO] BUILD FAILURE

    [INFO] ------------------------------------------------------------------------

    [INFO] Total time: 36.539 s

    [INFO] Finished at: 2016-07-25T13:00:06+03:00

    [INFO] Final Memory: 86M/1474M

    [INFO] ------------------------------------------------------------------------

    [ERROR] Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.3:check (findbugs) on project influxdb: failed with 1 bugs and 0 errors -> [Help 1]

    [ERROR]


However, when I run the mvn findbug:gui, it gives me 0 errors and bugs. My jenkins-ci and github usernames are different, but I have configured my jenkins-ci user in ~/.m2/settings.xml according to https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-Releasingtojenkinsci.org.

I have tried applying @Nonnull for various part of the function findbugs complains about, but nothing seems to work. What am I missing here? On Friday I got the prepare-phase to pass with @SuppressFBWarnings, but it failed in the end anyway. The build (1.1) is available at GitHub and I wonder could that be a reason the current build fails? It doesn't prompt for a release version, but tries to release version 1.1 again. Should I remove my release or how could I fix that?


Best regards,


Aleksi Simell
DevOps Consultant
Eficode Ltd

Jesse Glick

unread,
Jul 26, 2016, 3:55:06 PM7/26/16
to Jenkins Dev
mvn release:rollback release:clean

Forget about 1.1, move on.

Use `mvn clean compile findbugs:findbugs` to look for violations locally.

Use the newest available (2.x) parent POM, so that problems like this
will be caught during `prepare`, so that the `perform` phase does not
fail and leave a mess.

Aleksi Simell

unread,
Jul 27, 2016, 12:27:24 AM7/27/16
to jenkin...@googlegroups.com
Hi,

Thanks! I noticed that the failed build had left the release.properties and pom.xml.releaseBackup files remaining, even though the build was in GitHub. It kept checking out the code from 1.1 even though I had made changes. Removing those files allowed me to get the checkout from the current version and it fixed one issue. Right now I have <findbugs.failOnError>false</findbugs.failOnError> in my pom.xml, which prevents it from failing to that error. I will try remove those tags and actually fix the problem now, that I have been able to fix the 1.1 clinging problem.


Aleksi Simell
DevOps Consultant
Eficode Ltd


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr038R9PXVJ9%2B1BLMfKJZvOFiAvmffdjC2kb2kUEzvYRwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages