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

Detect installation directory changes when dev mode is running and handle it somehow #1794

Closed
cherylking opened this issue Feb 15, 2024 · 0 comments · Fixed by #1796
Closed
Labels

Comments

@cherylking
Copy link
Member

This is related to issue 878 scenario 2. According to that issue, this plugin handles a change in the installation directory while dev mode is running. When I tested that scenario, I found that dev mode does detect the change and calls the create goal which then updates the values in liberty-plugin-config.xml. However, dev mode did not stop the server that was running on the existing installation, nor did it start the server in the newly referenced installation.

After discussing with the development team, it was decided the best option is to detect the change and issue a warning that it will not take affect until the next invocation of the dev goal. This would require keeping the old settings in the current Project, which I am not sure is possible. What if there were other changes in the pom.xml besides the installation location?

Another option would be to detect the change and throw an error and stop dev mode, instructing the user that a change in installation location requires dev mode to be restarted.

Changes needed:

  1. Detect each change to pom.xml that affects installation directory (installDirectory, runtimeInstallDirectory).
  2. What about userDirectory, outputDirectory and serverName? Those affect parts of the installation as well.
  3. Issue warning or throw error when one of those configuration parameters changes.
  4. If issue a warning, do not update the running dev mode with the new values from those configuration parameters and do not call create goal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant