Merge pull request #120 from gnodet/issue-118

Rename ServerMain to MavenDaemon to be more explicit, fixes #118
This commit is contained in:
Peter Palaga
2020-10-21 14:38:56 +02:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ import org.jboss.fuse.mvnd.common.DaemonStopEvent;
import org.jboss.fuse.mvnd.common.Environment;
import org.jboss.fuse.mvnd.common.Message;
import org.jboss.fuse.mvnd.common.Serializer;
import org.jboss.fuse.mvnd.common.ServerMain;
import org.jboss.fuse.mvnd.common.MavenDaemon;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -279,7 +279,7 @@ public class DaemonConnector {
args.add(Environment.DAEMON_IDLE_TIMEOUT.asCommandLineProperty(timeout));
}
args.add(ServerMain.class.getName());
args.add(MavenDaemon.class.getName());
command = String.join(" ", args);
LOGGER.debug("Starting daemon process: uid = {}, workingDir = {}, daemonArgs: {}", uid, workingDir, command);

View File

@@ -23,7 +23,7 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.stream.Stream;
public class ServerMain {
public class MavenDaemon {
public static void main(String[] args) throws Exception {
// Disable URL caching so that the JVM does not try to cache resources
@@ -64,7 +64,7 @@ public class ServerMain {
try {
return super.findClass(name);
} catch (ClassNotFoundException e) {
return ServerMain.class.getClassLoader().loadClass(name);
return MavenDaemon.class.getClassLoader().loadClass(name);
}
}
};