Regenerate feature list when Liberty config changes require recreating the server or installing features.
@@ -313,6 +313,15 @@ public class DevMojo extends StartDebugMojoSupport {
}
}
+ @Override
+ public void libertyGenerateFeatures() throws PluginExecutionException {
+ try {
+ runLibertyMojoGenerateFeatures();
+ } catch (MojoExecutionException e) {
+ throw new PluginExecutionException(e);
+ }
+ }
+
@Override
public void libertyInstallFeature() throws PluginExecutionException {
try {
@@ -557,6 +566,7 @@ public class DevMojo extends StartDebugMojoSupport {
if (restartServer) {
// - stop Server
// - create server or runBoostMojo
+ // - generate the missing features
// - install feature
// - deploy app
// - start server
@@ -571,6 +581,9 @@ public class DevMojo extends StartDebugMojoSupport {
} else if (redeployApp) {
runLibertyMojoDeploy();
}
+ if (createServer || installFeature) {
+ runLibertyMojoGenerateFeatures();
+ }
if (installFeature) {
runLibertyMojoInstallFeature(null, super.getContainerName());
}
