mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-10-18 00:14:18 +00:00
Replace logback-classic with slf4j-simple in the client get a smaller excutable and easier log config
This commit is contained in:
@@ -22,8 +22,9 @@ public class ClientLayout extends Layout {
|
||||
final Properties mvndProperties = loadMvndProperties();
|
||||
final Path pwd = Paths.get(".").toAbsolutePath().normalize();
|
||||
|
||||
final Path mvndHome = findMavenHome(mvndProperties);
|
||||
ENV_INSTANCE = new ClientLayout(
|
||||
findMavenHome(mvndProperties),
|
||||
mvndHome,
|
||||
pwd,
|
||||
findMultiModuleProjectDirectory(pwd),
|
||||
findJavaHome(mvndProperties),
|
||||
@@ -79,6 +80,20 @@ public class ClientLayout extends Layout {
|
||||
}
|
||||
}
|
||||
|
||||
static Path findLogbackConfigurationFile(Properties mvndProperties, Path mvndHome) {
|
||||
String rawValue = mvndProperties.getProperty("logback.configurationFile");
|
||||
if (rawValue == null) {
|
||||
rawValue = System.getProperty("logback.configurationFile");
|
||||
}
|
||||
if (rawValue == null) {
|
||||
rawValue = System.getProperty("logback.configurationFile");
|
||||
}
|
||||
if (rawValue != null) {
|
||||
return Paths.get(rawValue).toAbsolutePath().normalize();
|
||||
}
|
||||
return mvndHome.resolve("conf/logging/logback.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ClientLayout [localMavenRepository=" + localMavenRepository + ", settings=" + settings + ", javaHome="
|
||||
|
@@ -0,0 +1,15 @@
|
||||
package org.jboss.fuse.mvnd.client.svm;
|
||||
|
||||
import org.graalvm.nativeimage.hosted.Feature;
|
||||
|
||||
import com.oracle.svm.core.annotate.AutomaticFeature;
|
||||
|
||||
@AutomaticFeature
|
||||
public class ReflectionRegistration implements Feature {
|
||||
public void beforeAnalysis(BeforeAnalysisAccess access) {
|
||||
// try {
|
||||
// } catch (NoSuchMethodException | SecurityException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user