mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-11 05:30:08 +00:00
Replace logback-classic with slf4j-simple in the client get a smaller excutable and easier log config
This commit is contained in:
@@ -15,11 +15,6 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.graalvm.nativeimage</groupId>
|
||||
<artifactId>svm</artifactId>
|
||||
@@ -34,6 +29,11 @@
|
||||
<artifactId>jline-terminal-jansi</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
|
@@ -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);
|
||||
// }
|
||||
}
|
||||
}
|
@@ -14,9 +14,19 @@
|
||||
<name>Maven Daemon</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jboss.fuse.mvnd</groupId>
|
||||
<artifactId>mvnd-client</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
|
5
pom.xml
5
pom.xml
@@ -51,6 +51,11 @@
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-simple</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
|
Reference in New Issue
Block a user