Skip to content

Commit 5a12b4e

Browse files
committed
Tidy up
1 parent a6adc76 commit 5a12b4e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

maven-plugin/src/main/java/eu/maveniverse/maven/toolbox/plugin/GavTreeMojo.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ public class GavTreeMojo extends AbstractMojo {
3535
private String gav;
3636

3737
/**
38-
* The resolution scope to display, accepted values are "main-runtime", "main-compile", "test-runtime" or
39-
* "test-compile".
38+
* The resolution scope to display, accepted values are "runtime", "compile", "test", etc.
4039
*/
41-
@Parameter(property = "scope", defaultValue = "main-runtime", required = true)
40+
@Parameter(property = "scope", defaultValue = "runtime", required = true)
4241
private String scope;
4342

4443
/**
@@ -59,7 +58,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
5958
try (Context context = runtime.create(ContextOverrides.create().build())) {
6059
ToolboxCommando toolboxCommando = ToolboxCommando.getOrCreate(runtime, context);
6160
toolboxCommando.tree(
62-
ResolutionScope.parse(scope), toolboxCommando.loadGav(gav, boms), false, new Slf4jOutput(logger));
61+
ResolutionScope.parse(scope), toolboxCommando.loadGav(gav, boms), verbose, new Slf4jOutput(logger));
6362
} catch (RuntimeException e) {
6463
throw new MojoExecutionException(e);
6564
} catch (ArtifactDescriptorException e) {

maven-plugin/src/main/java/eu/maveniverse/maven/toolbox/plugin/TreeMojo.java

+10-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import eu.maveniverse.maven.mima.context.ContextOverrides;
1212
import eu.maveniverse.maven.mima.context.Runtime;
1313
import eu.maveniverse.maven.mima.context.Runtimes;
14-
import eu.maveniverse.maven.toolbox.shared.ResolutionRoot;
1514
import eu.maveniverse.maven.toolbox.shared.ResolutionScope;
1615
import eu.maveniverse.maven.toolbox.shared.Slf4jOutput;
1716
import eu.maveniverse.maven.toolbox.shared.ToolboxCommando;
@@ -31,10 +30,9 @@ public class TreeMojo extends AbstractMojo {
3130
private final Logger logger = LoggerFactory.getLogger(getClass());
3231

3332
/**
34-
* The resolution scope to display, accepted values are "main-runtime", "main-compile", "test-runtime" or
35-
* "test-compile".
33+
* The resolution scope to display, accepted values are "runtime", "compile", "test", etc.
3634
*/
37-
@Parameter(property = "scope", defaultValue = "main-runtime", required = true)
35+
@Parameter(property = "scope", defaultValue = "runtime", required = true)
3836
private String scope;
3937

4038
/**
@@ -53,12 +51,15 @@ public class TreeMojo extends AbstractMojo {
5351
public void execute() throws MojoExecutionException, MojoFailureException {
5452
Runtime runtime = Runtimes.INSTANCE.getRuntime();
5553
try (Context context = runtime.create(ContextOverrides.create().build())) {
56-
ResolutionRoot root = MavenProjectHelper.toRoot(
57-
mavenProject,
58-
artifactHandlerManager,
59-
context.repositorySystemSession().getArtifactTypeRegistry());
6054
ToolboxCommando.getOrCreate(runtime, context)
61-
.tree(ResolutionScope.parse(scope), root, false, new Slf4jOutput(logger));
55+
.tree(
56+
ResolutionScope.parse(scope),
57+
MavenProjectHelper.toRoot(
58+
mavenProject,
59+
artifactHandlerManager,
60+
context.repositorySystemSession().getArtifactTypeRegistry()),
61+
verbose,
62+
new Slf4jOutput(logger));
6263
} catch (RuntimeException e) {
6364
throw new MojoExecutionException(e.getCause());
6465
}

0 commit comments

Comments
 (0)