Skip to content

Commit

Permalink
Merge pull request #1863 from scottkurz/1696-fix
Browse files Browse the repository at this point in the history
Add ServerStatusUtil check for liberty:deploy
  • Loading branch information
scottkurz authored Feb 13, 2025
2 parents 48accde + 519437c commit fddf86e
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import io.openliberty.tools.common.plugins.config.LooseConfigData;
import io.openliberty.tools.common.plugins.util.DevUtil;
import io.openliberty.tools.common.plugins.util.OSUtil;
import io.openliberty.tools.common.plugins.util.ServerStatusUtil;

/**
* Support for installing and deploying applications to a Liberty server.
Expand Down Expand Up @@ -301,11 +302,7 @@ protected void installLooseConfigEar(MavenProject proj, LooseConfigData config,
}

private boolean shouldValidateAppStart() throws MojoExecutionException {
try {
return new File(serverDirectory.getCanonicalPath() + "/workarea/.sRunning").exists();
} catch (IOException ioe) {
throw new MojoExecutionException("Could not get the server directory to determine the state of the server.");
}
return ServerStatusUtil.isServerRunning(installDirectory, outputDirectory, serverName);
}

protected void verifyAppStarted(String appFile) throws MojoExecutionException {
Expand Down

0 comments on commit fddf86e

Please sign in to comment.