Skip to content
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 #410

Closed
wants to merge 1 commit into from

Conversation

mezarin
Copy link
Member

@mezarin mezarin commented Jun 28, 2023

This PR attempts to provide a workaround for the issue where the start action is run on a project, but it fails because there is a Liberty server already running perhaps due of a prior unexpected session failure or user action.

The workaround allows users to run the Liberty Tools stop action to stop a Liberty server running the project outside of a Liberty tools session. The Liberty Maven/Gradle plugin stop command is issued to stop the Liberty server.

Since stop is issued in an unconventional way, a choice dialog is displayed to let the user know that the session for the project in question is not active or has not been initialized (start/debug), and to give the user the choice to run the LMP/LGP stop command or not.

For example:

image

@scottkurz
Copy link
Member

One change I think we need is to set JAVA_HOME in the new process. I only thought of that because this fix didn't work in my env.

Maybe something like
pb.environment().put("JAVA_HOME", JavaRuntime.getDefaultVMInstall().getInstallLocation().getAbsolutePath());
or possibly we only want to set if it's not already set??? Will have to think about it.

@scottkurz
Copy link
Member

Superseded by #412

@scottkurz scottkurz closed this Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants