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:
Detect each change to pom.xml that affects installation directory (installDirectory, runtimeInstallDirectory).
What about userDirectory, outputDirectory and serverName? Those affect parts of the installation as well.
Issue warning or throw error when one of those configuration parameters changes.
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.
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 inliberty-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:
create
goal.