Skip to content

Commit

Permalink
temp switch over
Browse files Browse the repository at this point in the history
  • Loading branch information
dshimo committed Mar 21, 2024
1 parent aecb71c commit b9d13aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,7 @@ protected void verifyAppStarted(String appFile) throws MojoExecutionException {
Map<String, File> libertyDirPropertyFiles = getLibertyDirectoryPropertyFiles();
CommonLogger logger = new CommonLogger(getLog());
setLog(logger.getLog());
getServerConfigDocument(logger, serverXML, configDirectory,
bootstrapPropertiesFile, combinedBootstrapProperties, serverEnvFile, false, libertyDirPropertyFiles);
getServerConfigDocument(logger, serverXML, libertyDirPropertyFiles);

//appName will be set to a name derived from appFile if no name can be found.
appName = scd.findNameForLocation(appFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,10 @@ protected Set<String> getAppConfigLocationsFromSourceServerXml() {
Map<String, File> libertyDirPropertyFiles = getLibertyDirectoryPropertyFiles();
CommonLogger logger = new CommonLogger(getLog());
setLog(logger.getLog());
scd = getServerConfigDocument(logger, serverXML, configDirectory,
bootstrapPropertiesFile, combinedBootstrapProperties, serverEnvFile, false,
libertyDirPropertyFiles);
// scd = getServerConfigDocument(logger, serverXML, configDirectory,
// bootstrapPropertiesFile, combinedBootstrapProperties, serverEnvFile, false,
// libertyDirPropertyFiles);
scd = getServerConfigDocument(logger, serverXML, libertyDirPropertyFiles);
} catch (Exception e) {
getLog().warn(e.getLocalizedMessage());
getLog().debug(e);
Expand All @@ -394,6 +395,14 @@ protected ServerConfigDocument getServerConfigDocument(CommonLoggerI log, File s
return scd;
}

protected ServerConfigDocument getServerConfigDocument(CommonLoggerI log, File serverXML, Map<String, File> libertyDirPropertyFiles) throws IOException {
if (scd == null || !scd.getServerXML().getCanonicalPath().equals(serverXML.getCanonicalPath())) {
scd = new ServerConfigDocument(log, libertyDirPropertyFiles);
}

return scd;
}

protected String getAppsDirectory() {
return getAppsDirectory(true);
}
Expand Down

0 comments on commit b9d13aa

Please sign in to comment.