Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-22 Thread Mirko Friedenhagen
Jesse, the other approach of setting the result in postBuild did not really work unfortunately. I am not sure I understand how and why events are called in Jenkins here. - Say I have a Maven multi-module project *and* have created a Jenkins-Maven-Job. - From the Javadoc of

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-22 Thread Jesse Glick
On Mon, Dec 22, 2014 at 4:03 PM, Mirko Friedenhagen mfriedenha...@gmail.com wrote: I am not sure I understand how and why events are called in Jenkins here. You are going to have to ask someone familiar with the mojo hook system in this plugin, which I do not know much about. -- You received

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-17 Thread Ulli Hafner
Maybe you can have a look at a maven reporter of one of the static analysis plug-ins (findbugs, checkstyle, …). The code to publish the results should be quite similar... Am 16.12.2014 um 23:59 schrieb Jesse Glick jgl...@cloudbees.com: On Tue, Dec 16, 2014 at 4:53 PM, Mirko Friedenhagen

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-17 Thread Jesse Glick
On Wed, Dec 17, 2014 at 9:12 AM, Ulli Hafner ullrich.haf...@gmail.com wrote: maven reporter of one of the static analysis plug-ins (findbugs, checkstyle, …). The code to publish the results should be quite similar... …and broken for the same reason, as JENKINS-25406 notes. -- You received

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-17 Thread Mirko Friedenhagen
Jesse, this is indeed similar to JENKINS-25406. Do I understand your comment right: - I should change the visibility of the result field of MavenBuild to set it from the outside? - Feels like a hack to me :-). Regards Mirko -- http://illegalstateexception.blogspot.com/

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-17 Thread Jesse Glick
On Wed, Dec 17, 2014 at 12:46 PM, Mirko Friedenhagen mfriedenha...@gmail.com wrote: I should change the visibility of the result field of MavenBuild to set it from the outside? Well, introduce a method in MavenBuild intended to set the result at an appropriate time, despite the state being

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-17 Thread Mirko Friedenhagen
Jesse, I now implemented https://github.com/jenkinsci/violations-plugin/commit/677dc8981b161f11368db8aebe4d94473ae6f757. Is that the solution you had in mind? Regards Mirko Regards Mirko -- http://illegalstateexception.blogspot.com/ https://github.com/mfriedenhagen/

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-17 Thread Jesse Glick
On Wed, Dec 17, 2014 at 3:19 PM, Mirko Friedenhagen mfriedenha...@gmail.com wrote: Is that the solution you had in mind? No, this should be addressed in maven-plugin. -- You received this message because you are subscribed to the Google Groups Jenkins Developers group. To unsubscribe from

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-17 Thread Mirko Friedenhagen
I now tried a different approach by setting the result in a overridden postBuild method. However this one is never called. Regards Mirko -- http://illegalstateexception.blogspot.com/ https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen) https://bitbucket.org/mfriedenhagen/ On Wed,

violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-16 Thread Mirko Friedenhagen
Hello everybody, In 28dfd90d2d6ae99c57eb174871c46f4e07e303ba a change in jerkins-core was introduced which results in a IllegalStateException when a plugin tries to to change the build result when the build is already completed. I see why this might have been done, however right now this breaks

Re: violations-plugin: IllegalStateException: cannot change build result while in COMPLETED

2014-12-16 Thread Jesse Glick
On Tue, Dec 16, 2014 at 4:53 PM, Mirko Friedenhagen mfriedenha...@gmail.com wrote: The ViolationsReporter overrides hudson.maven.MavenReporter#end and tries to set the result here which leads to the exception in [1] since above commit. Looks similar to, but not identical to,