fix: ensuring quarkus-embedded does does not use system.exit (#35574)

closes: #35550

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins
2024-12-04 06:08:16 -05:00
committed by GitHub
parent 0f72fa283d
commit 806e140f45
3 changed files with 6 additions and 8 deletions

View File

@@ -194,8 +194,10 @@ public class Picocli {
}
public void exit(int exitCode) {
// hard exit wanted, as build failed and no subsequent command should be executed. no quarkus involved.
System.exit(exitCode);
if (exitCode != CommandLine.ExitCode.OK && (!Environment.isTestLaunchMode() || isRebuildCheck())) {
// hard exit wanted, as build failed and no subsequent command should be executed. no quarkus involved.
System.exit(exitCode);
}
}
private int runReAugmentationIfNeeded(List<String> cliArgs, CommandLine cmd, CommandLine currentCommand) {

View File

@@ -30,6 +30,7 @@ import org.keycloak.models.ModelDuplicateException;
import javax.naming.NamingException;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.net.URI;
import static org.jboss.logging.Logger.Level.DEBUG;
@@ -47,7 +48,7 @@ import static org.jboss.logging.Logger.Level.WARN;
@MessageLogger(projectCode="KC-SERVICES", length=4)
public interface ServicesLogger extends BasicLogger {
ServicesLogger LOGGER = Logger.getMessageLogger(ServicesLogger.class, "org.keycloak.services");
ServicesLogger LOGGER = Logger.getMessageLogger(MethodHandles.lookup(), ServicesLogger.class, "org.keycloak.services");
@LogMessage(level = INFO)
@Message(id=1, value="Loading config from %s")

View File

@@ -754,11 +754,6 @@
<version>${junit-vintage-engine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.logmanager</groupId>
<artifactId>log4j-jboss-logmanager</artifactId>
<version>1.3.0.Final</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>