Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dependency-reduced-pom.xml
.project
.classpath
.settings/
.factorypath

# IDEA
.idea
Expand All @@ -31,4 +32,4 @@ nb-configuration.xml
.cache/

# https://ge.apache.org
.mvn/.gradle-enterprise
.mvn/.gradle-enterprise
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ If SDKMAN! supports your operating system, it is as easy as
$ sdk install mvnd
----

If you used the manual install in the past, please make sure that the settings in `~/.m2/mvnd.properties` still make
sense. With SDKMAN!, the `~/.m2/mvnd.properties` file is typically not needed at all, because both `JAVA_HOME` and
If you used the manual installation in the past, please make sure that the settings in `~/.m2/mvnd.properties` still
make sense. With SDKMAN!, the `~/.m2/mvnd.properties` file is typically not needed at all, because both `JAVA_HOME` and
`MVND_HOME` are managed by SDKMAN!.

=== Install using https://brew.sh/[Homebrew]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.EnumSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -151,7 +152,8 @@ public static void main(String[] argv) throws Exception {

int exitCode = 0;
boolean noBuffering = batchMode || parameters.noBuffering();
try (TerminalOutput output = new TerminalOutput(noBuffering, parameters.rollingWindowSize(), logFile)) {
try (TerminalOutput output = new TerminalOutput(
noBuffering, parameters.hideBannedProjectSkips(), parameters.rollingWindowSize(), logFile)) {
try {
// Color
// We need to defer this part until the terminal is created
Expand Down Expand Up @@ -235,6 +237,15 @@ public DefaultClient(DaemonParameters parameters) {
true);
}

/**
* The environment forwarded to the daemon in the {@link Message.BuildRequest}. Defaults to the
* client's own environment; overridable so tests can run hermetically (e.g. without inheriting
* an ambient {@code MAVEN_ARGS}).
*/
protected Map<String, String> buildRequestEnvironment() {
return System.getenv();
}

@Override
public ExecutionResult execute(ClientOutput output, List<String> argv) {
LOGGER.debug("Starting client");
Expand Down Expand Up @@ -359,7 +370,7 @@ public ExecutionResult execute(ClientOutput output, List<String> argv) {
args,
parameters.userDir().toString(),
parameters.multiModuleProjectDirectory().toString(),
System.getenv()));
buildRequestEnvironment()));

output.accept(Message.buildStatus(
"Connected to daemon " + daemon.getDaemon().getId() + ", scanning for projects..."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,10 @@ public boolean noBuffering() {
return property(Environment.MVND_NO_BUFERING).orFail().asBoolean();
}

public boolean hideBannedProjectSkips() {
return property(Environment.MVND_HIDE_BANNED_PROJECT_SKIPS).orFail().asBoolean();
}

public int rollingWindowSize() {
return property(Environment.MVND_ROLLING_WINDOW_SIZE).orFail().asInt();
}
Expand Down
15 changes: 15 additions & 0 deletions common/src/main/java/org/mvndaemon/mvnd/common/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,21 @@ public enum Environment {
*/
MVND_NO_MODEL_CACHE("mvnd.noModelCache", null, Boolean.FALSE, OptionType.BOOLEAN, Flags.OPTIONAL),

/**
* If <code>true</code> (default), mvnd shows live per-test progress on each project's worker line while
* Surefire/Failsafe run tests. Set to <code>false</code> to disable the feature entirely (nothing is injected
* into the surefire/failsafe configuration and no listener is registered).
*/
MVND_TEST_PROGRESS("mvnd.testProgress", null, Boolean.TRUE, OptionType.BOOLEAN, Flags.OPTIONAL),

/**
* If <code>true</code> (default), the client omits the per-project
* <code>Skipping X / This project has been banned from the build due to previous failures.</code> blocks that
* Maven logs after a reactor failure. Set to <code>false</code> to show them. The final reactor summary (including
* its <code>... SKIPPED</code> rows) is always kept.
*/
MVND_HIDE_BANNED_PROJECT_SKIPS("mvnd.hideBannedProjectSkips", null, Boolean.TRUE, OptionType.BOOLEAN, Flags.NONE),

/**
* If <code>true</code>, the daemon will be launched in debug mode with the following JVM argument:
* <code>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000</code>; otherwise the debug argument is
Expand Down
Loading
Loading