mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-12 05:59:33 +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>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.graalvm.nativeimage</groupId>
|
<groupId>org.graalvm.nativeimage</groupId>
|
||||||
<artifactId>svm</artifactId>
|
<artifactId>svm</artifactId>
|
||||||
@@ -34,6 +29,11 @@
|
|||||||
<artifactId>jline-terminal-jansi</artifactId>
|
<artifactId>jline-terminal-jansi</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
<artifactId>junit-jupiter</artifactId>
|
<artifactId>junit-jupiter</artifactId>
|
||||||
|
@@ -22,8 +22,9 @@ public class ClientLayout extends Layout {
|
|||||||
final Properties mvndProperties = loadMvndProperties();
|
final Properties mvndProperties = loadMvndProperties();
|
||||||
final Path pwd = Paths.get(".").toAbsolutePath().normalize();
|
final Path pwd = Paths.get(".").toAbsolutePath().normalize();
|
||||||
|
|
||||||
|
final Path mvndHome = findMavenHome(mvndProperties);
|
||||||
ENV_INSTANCE = new ClientLayout(
|
ENV_INSTANCE = new ClientLayout(
|
||||||
findMavenHome(mvndProperties),
|
mvndHome,
|
||||||
pwd,
|
pwd,
|
||||||
findMultiModuleProjectDirectory(pwd),
|
findMultiModuleProjectDirectory(pwd),
|
||||||
findJavaHome(mvndProperties),
|
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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ClientLayout [localMavenRepository=" + localMavenRepository + ", settings=" + settings + ", javaHome="
|
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>
|
<name>Maven Daemon</name>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-classic</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jboss.fuse.mvnd</groupId>
|
<groupId>org.jboss.fuse.mvnd</groupId>
|
||||||
<artifactId>mvnd-client</artifactId>
|
<artifactId>mvnd-client</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.maven</groupId>
|
<groupId>org.apache.maven</groupId>
|
||||||
|
5
pom.xml
5
pom.xml
@@ -51,6 +51,11 @@
|
|||||||
<artifactId>logback-classic</artifactId>
|
<artifactId>logback-classic</artifactId>
|
||||||
<version>${logback.version}</version>
|
<version>${logback.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.slf4j</groupId>
|
||||||
|
<artifactId>slf4j-simple</artifactId>
|
||||||
|
<version>${slf4j.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.codehaus.groovy</groupId>
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
|
Reference in New Issue
Block a user