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

changes needed for ci.common varProcessing #1843

Merged
merged 6 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ jobs:
- name: Checkout ci.common
uses: actions/checkout@v3
with:
repository: OpenLiberty/ci.common
repository: arunvenmany-ibm/ci.common
path: ci.common
ref: varProcessing
- name: Checkout ci.ant
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -102,7 +103,7 @@ jobs:
- name: Clone ci.ant, ci.common, ci.maven repos to C drive
run: |
cp -r D:/a/ci.maven/ci.maven C:/ci.maven
git clone https://github.com/OpenLiberty/ci.common.git C:/ci.common
git clone https://github.com/arunvenmany-ibm/ci.common.git --branch varProcessing --single-branch C:/ci.common
git clone https://github.com/OpenLiberty/ci.ant.git C:/ci.ant
- name: Set up Maven
uses: stCarolas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion liberty-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<dependency>
<groupId>io.openliberty.tools</groupId>
<artifactId>ci.common</artifactId>
<version>1.8.35</version>
<version>1.8.36-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.twdata.maven</groupId>
Expand Down
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);
scd = getServerConfigDocument(logger, libertyDirPropertyFiles);
cherylking marked this conversation as resolved.
Show resolved Hide resolved

//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 @@ -136,8 +136,7 @@ protected void undeployApp(File file) throws MojoExecutionException {
Map<String, File> libertyDirPropertyFiles = getLibertyDirectoryPropertyFiles();
CommonLogger logger = new CommonLogger(getLog());
setLog(logger.getLog());
getServerConfigDocument(logger, serverXML, configDirectory,
bootstrapPropertiesFile, combinedBootstrapProperties, serverEnvFile, false, libertyDirPropertyFiles);
scd = getServerConfigDocument(logger, libertyDirPropertyFiles);
cherylking marked this conversation as resolved.
Show resolved Hide resolved

//appName will be set to a name derived from file if no name can be found.
appName = scd.findNameForLocation(appName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,7 @@ 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, libertyDirPropertyFiles);
} catch (Exception e) {
getLog().warn(e.getLocalizedMessage());
getLog().debug(e);
Expand All @@ -385,10 +383,9 @@ protected Set<String> getAppConfigLocationsFromSourceServerXml() {
return scd != null ? scd.getLocations() : new HashSet<String>();
}

protected ServerConfigDocument getServerConfigDocument(CommonLoggerI log, File serverXML, File configDir, File bootstrapFile,
Map<String, String> bootstrapProp, File serverEnvFile, boolean giveConfigDirPrecedence, Map<String, File> libertyDirPropertyFiles) throws IOException {
if (scd == null || !scd.getServerXML().getCanonicalPath().equals(serverXML.getCanonicalPath())) {
scd = new ServerConfigDocument(log, serverXML, configDir, bootstrapFile, bootstrapProp, serverEnvFile, giveConfigDirPrecedence, libertyDirPropertyFiles);
protected ServerConfigDocument getServerConfigDocument(CommonLoggerI log, Map<String, File> libertyDirPropertyFiles) {
if (scd == null) {
cherylking marked this conversation as resolved.
Show resolved Hide resolved
scd = new ServerConfigDocument(log, libertyDirPropertyFiles);
}

return scd;
Expand Down
Loading