-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Issue #6020 Fix redeploy error jetty-maven-plugin #6023
Issue #6020 Fix redeploy error jetty-maven-plugin #6023
Conversation
Signed-off-by: Jan Bartel <janb@webtide.com>
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.
One of the main points of the issue is to change the default for scan
, and it's not been addressed?
@@ -516,7 +516,7 @@ public void doStart() throws Exception | |||
|
|||
|
|||
//Create the scheduler and start it | |||
_scheduler = new ScheduledExecutorScheduler("Scanner-" + SCANNER_IDS.getAndIncrement(), true, 1); | |||
_scheduler = new TimerScheduler("Scanner-" + SCANNER_IDS.getAndIncrement(), true); |
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.
We want to move away from Timer
as it's not configurable, has problems, etc. so this needs to go back to ScheduledExecutorScheduler
.
Test case?
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 problem is that the ScheduledExecutorScheduler doesn't work: it interrupts its threads and throws the error you originally reported. The TimerScheduler doesn't manage its threads in that fashion and works just fine.
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 is not fixed yet.
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.
Changed to ScheduledExecutorScheduler - IMHO it's a bit ugly, but ....
I also think if you don't want TimerScheduler used, the class needs to be deprecated.
Signed-off-by: Jan Bartel <janb@webtide.com>
Introduced scan=-1 meaning that no redeployment is done, and made it the default. 0 means manual redeployment using Enter key, and any other positive integer is the scan interval for hot redeployment. |
@sbordet nudge for re-review |
By default, it will not automatically restart your webapp: you can force a redeploy by hitting the `Enter` key. | ||
Set a non-zero <scan> value to have jetty scan your webapp for changes and automatically redeploy. | ||
By default, it will not automatically restart your webapp. | ||
Set a non-zero `<scan>` value to have jetty scan your webapp for changes and automatically redeploy, or set `<scan>` to `0` to cause manual redeployment by hitting the `Enter` key. |
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.
Replace HTML entities with correspondent characters.
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.
Use kbd:[Enter]
to indicate the "Enter" key -- it will render more nicely, see https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/#keyboard-button-and-menu-macros
@@ -516,7 +516,7 @@ public void doStart() throws Exception | |||
|
|||
|
|||
//Create the scheduler and start it | |||
_scheduler = new ScheduledExecutorScheduler("Scanner-" + SCANNER_IDS.getAndIncrement(), true, 1); | |||
_scheduler = new TimerScheduler("Scanner-" + SCANNER_IDS.getAndIncrement(), true); |
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 is not fixed yet.
Signed-off-by: Jan Bartel <janb@webtide.com>
…6020-jetty-maven-plugin-restart-error
…6020-jetty-maven-plugin-restart-error
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
@@ -11,6 +11,8 @@ | |||
// ======================================================================== | |||
// | |||
|
|||
:experimental: |
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 attribute should be moved to the .asciidoctorconfig
file.
Signed-off-by: Jan Bartel <janb@webtide.com>
Closes #6020