Skip to content

Commit

Permalink
Remove defaultVar for applicationMonitor value. Use maven parameter i…
Browse files Browse the repository at this point in the history
…nstead.
  • Loading branch information
evie-lau committed Aug 7, 2023
1 parent 318ec1b commit a9ba3c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import io.openliberty.tools.common.plugins.config.LooseConfigData;
import io.openliberty.tools.common.plugins.config.ServerConfigDocument;
import io.openliberty.tools.common.plugins.util.DevUtil;
import io.openliberty.tools.common.plugins.util.PluginExecutionException;

/**
* Copy applications to the specified directory of the Liberty server.
Expand All @@ -59,12 +60,12 @@ public void execute() throws MojoExecutionException {

try {
doDeploy();
} catch (IOException | ParserConfigurationException | TransformerException e) {
} catch (IOException | ParserConfigurationException | TransformerException | PluginExecutionException e) {
throw new MojoExecutionException("Error deploying application.", e);
}
}

private void doDeploy() throws IOException, MojoExecutionException, TransformerException, ParserConfigurationException {
private void doDeploy() throws IOException, MojoExecutionException, TransformerException, ParserConfigurationException, PluginExecutionException {
checkServerHomeExists();
checkServerDirectoryExists();

Expand Down Expand Up @@ -95,7 +96,7 @@ private void doDeploy() throws IOException, MojoExecutionException, TransformerE
default:
return;
}

if (installDependencies) {
installDependencies();
}
Expand All @@ -109,8 +110,8 @@ private void doDeploy() throws IOException, MojoExecutionException, TransformerE
applicationXml.writeApplicationXmlDocument(serverDirectory);
}

// create applicationMonitor configuartion in configDropins/defaults
appMonXml.writeAppMonitorConfigXmlDocument(serverDirectory);
// create applicationMonitor configuration in configDropins/defaults
appMonXml.writeAppMonitorConfigXmlDocument(serverDirectory, applicationMonitorValue);
}

private void installSpringBootApp() throws MojoExecutionException, IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ public abstract class StartDebugMojoSupport extends ServerFeatureSupport {
@Parameter
protected List<String> jvmOptions;

@Parameter(property = "applicationMonitor")
protected String applicationMonitorValue;

/**
* The current plugin's descriptor. This is auto-filled by Maven 3.
*/
Expand Down Expand Up @@ -811,7 +814,6 @@ private void loadLibertyConfigFromProperties(Properties props) {
}
}
}
defaultVarMavenProps.put("io.openliberty.tools.update.trigger", "polled");
}

// The properties parameter comes from the <bootstrapProperties> configuration in pom.xml and takes precedence over
Expand Down

0 comments on commit a9ba3c6

Please sign in to comment.