-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide option to run LT plugin stop comand when the stop action is used #412
Conversation
3de04c7
to
14fbf4f
Compare
…elected Signed-off-by: Edward Mezarina <[email protected]>
aa3f057
to
b95ef07
Compare
Signed-off-by: Scott Kurz <[email protected]>
Signed-off-by: Scott Kurz <[email protected]>
Signed-off-by: Scott Kurz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just had a couple of comments.
/* | ||
* Check for bad exit value | ||
*/ | ||
Object rc = event.getJob().getProperty(STOP_JOB_COMPLETION_EXIT_CODE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rc value can be null if the job is cancelled before it completes. Line 867 will exit the job and one would get a message with a null exit value: "Stop failed with exitValue = null ...". Also the message can be a bit misleading in this case (stop may have worked because of timing), so perhaps along with checking the the rc value for null, etc, perhaps no message would be better unless we detected that the cancel failed?
/** | ||
* Cancel running jobs and avoid error message, e.g. on closing Eclipse IDE | ||
*/ | ||
public void cancelRunningJobs() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method seems like it should be removing the jobs from the map and cancelling them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thought this map was going away anyway but I'll add a clear() at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the JobChangeAdapter.done() will remove the job so it's not really needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that sounds good.
Signed-off-by: Scott Kurz <[email protected]>
Fixes #248
NOTE: I use the phrase "the Liberty Maven or Gradle stop command" in user-facing error messages. I know we've also tried the phrase "Liberty plugin stop" to abstract across each of Maven/Gradle. I wonder if it's obvious that that means "Liberty Maven or Gradle plugin" (which we could also write), however.