mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-09 14:49:06 +00:00
Merge pull request #396 from gnodet/i389
Use a proper property different from the maven-buildtime-extension on…
This commit is contained in:
@@ -231,7 +231,11 @@ public enum Environment {
|
||||
* Internal property to tell the daemon which JAVA_HOME was used to start it. It needs to be passed explicitly
|
||||
* because the value may differ from what the daemon sees through <code>System.getProperty("java.home")</code>.
|
||||
*/
|
||||
MVND_JAVA_HOME("mvnd.java.home", null, null, OptionType.PATH, Flags.INTERNAL);
|
||||
MVND_JAVA_HOME("mvnd.java.home", null, null, OptionType.PATH, Flags.INTERNAL),
|
||||
/**
|
||||
* Log mojos execution time at the end of the build.
|
||||
*/
|
||||
MVND_BUILD_TIME("mvnd.buildTime", null, null, OptionType.BOOLEAN, Flags.NONE);
|
||||
|
||||
static Properties properties;
|
||||
|
||||
|
@@ -32,6 +32,7 @@ import org.apache.maven.execution.MavenSession;
|
||||
import org.apache.maven.plugin.MojoExecution;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.eclipse.sisu.Typed;
|
||||
import org.mvndaemon.mvnd.common.Environment;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -42,7 +43,6 @@ public class BuildTimeEventSpy extends AbstractEventSpy {
|
||||
|
||||
public static final int MAX_NAME_LENGTH = 58;
|
||||
public static final String DIVIDER = "------------------------------------------------------------------------";
|
||||
public static final String BUILDTIME_OUTPUT_LOG_PROPERTY = "buildtime.output.log";
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@@ -89,7 +89,8 @@ public class BuildTimeEventSpy extends AbstractEventSpy {
|
||||
break;
|
||||
|
||||
case SessionEnded:
|
||||
String prop = getExecutionProperty(event, BUILDTIME_OUTPUT_LOG_PROPERTY, "false");
|
||||
String prop = getExecutionProperty(event, Environment.MVND_BUILD_TIME.getProperty(),
|
||||
Environment.MVND_BUILD_TIME.getDefault());
|
||||
boolean output = Boolean.parseBoolean(prop);
|
||||
doReport(output);
|
||||
break;
|
||||
|
@@ -147,7 +147,7 @@ _mvnd()
|
||||
|
||||
local mvnd_opts="-1"
|
||||
local mvnd_long_opts="--completion|--purge|--serial|--status|--stop"
|
||||
local mvnd_properties="-Djava.home|-Dmaven.multiModuleProjectDirectory|-Dmaven.repo.local|-Dmaven.settings|-Dmvnd.builder|-Dmvnd.daemonStorage|-Dmvnd.debug|-Dmvnd.duplicateDaemonGracePeriod|-Dmvnd.enableAssertions|-Dmvnd.expirationCheckDelay|-Dmvnd.home|-Dmvnd.idleTimeout|-Dmvnd.jvmArgs|-Dmvnd.keepAlive|-Dmvnd.logPurgePeriod|-Dmvnd.logback|-Dmvnd.maxHeapSize|-Dmvnd.maxLostKeepAlive|-Dmvnd.minHeapSize|-Dmvnd.minThreads|-Dmvnd.noBuffering|-Dmvnd.noDaemon|-Dmvnd.propertiesPath|-Dmvnd.registry|-Dmvnd.rollingWindowSize|-Dmvnd.serial|-Dmvnd.threads|-Dstyle.color|-Duser.dir|-Duser.home"
|
||||
local mvnd_properties="-Djava.home|-Dmaven.multiModuleProjectDirectory|-Dmaven.repo.local|-Dmaven.settings|-Dmvnd.buildTime|-Dmvnd.builder|-Dmvnd.daemonStorage|-Dmvnd.debug|-Dmvnd.duplicateDaemonGracePeriod|-Dmvnd.enableAssertions|-Dmvnd.expirationCheckDelay|-Dmvnd.home|-Dmvnd.idleTimeout|-Dmvnd.jvmArgs|-Dmvnd.keepAlive|-Dmvnd.logPurgePeriod|-Dmvnd.logback|-Dmvnd.maxHeapSize|-Dmvnd.maxLostKeepAlive|-Dmvnd.minHeapSize|-Dmvnd.minThreads|-Dmvnd.noBuffering|-Dmvnd.noDaemon|-Dmvnd.propertiesPath|-Dmvnd.registry|-Dmvnd.rollingWindowSize|-Dmvnd.serial|-Dmvnd.threads|-Dstyle.color|-Duser.dir|-Duser.home"
|
||||
local opts="-am|-amd|-B|-C|-c|-cpu|-D|-e|-emp|-ep|-f|-fae|-ff|-fn|-gs|-h|-l|-N|-npr|-npu|-nsu|-o|-P|-pl|-q|-rf|-s|-T|-t|-U|-up|-V|-v|-X|${mvnd_opts}"
|
||||
local long_opts="--also-make|--also-make-dependents|--batch-mode|--strict-checksums|--lax-checksums|--check-plugin-updates|--define|--errors|--encrypt-master-password|--encrypt-password|--file|--fail-at-end|--fail-fast|--fail-never|--global-settings|--help|--log-file|--non-recursive|--no-plugin-registry|--no-plugin-updates|--no-snapshot-updates|--offline|--activate-profiles|--projects|--quiet|--resume-from|--settings|--threads|--toolchains|--update-snapshots|--update-plugins|--show-version|--version|--debug|${mvnd_long_opts}"
|
||||
|
||||
|
Reference in New Issue
Block a user