Skip to content

Commit

Permalink
Merge pull request #167 from jonesbusy/feature/maven-debug-in-debug-mode
Browse files Browse the repository at this point in the history
Maven debug in debug mode
  • Loading branch information
jonesbusy authored Aug 9, 2024
2 parents b31eb8d + 22a624a commit 6164347
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package io.jenkins.tools.pluginmodernizer.core.config;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.net.URL;
import java.nio.file.Path;
import java.util.List;

public class Config {

@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "Because usage on ConsoleLogFilter")
public static boolean DEBUG = false;

private final String version;
private final List<String> pluginNames;
private final List<String> recipes;
Expand Down Expand Up @@ -96,6 +99,10 @@ public boolean isDryRun() {
return dryRun;
}

public boolean isDebug() {
return DEBUG;
}

public boolean isSkipPullRequest() {
return skipPullRequest;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ private InvocationRequest createInvocationRequest(Plugin plugin, String... args)
InvocationRequest request = new DefaultInvocationRequest();
request.setPomFile(plugin.getLocalRepository().resolve("pom.xml").toFile());
request.addArgs(List.of(args));
if (config.isDebug()) {
request.addArg("-X");
}
return request;
}

Expand Down

0 comments on commit 6164347

Please sign in to comment.