11
11
import eu .maveniverse .maven .mima .context .ContextOverrides ;
12
12
import eu .maveniverse .maven .mima .context .Runtime ;
13
13
import eu .maveniverse .maven .mima .context .Runtimes ;
14
- import eu .maveniverse .maven .toolbox .shared .ResolutionRoot ;
15
14
import eu .maveniverse .maven .toolbox .shared .ResolutionScope ;
16
15
import eu .maveniverse .maven .toolbox .shared .Slf4jOutput ;
17
16
import eu .maveniverse .maven .toolbox .shared .ToolboxCommando ;
@@ -31,10 +30,9 @@ public class TreeMojo extends AbstractMojo {
31
30
private final Logger logger = LoggerFactory .getLogger (getClass ());
32
31
33
32
/**
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.
36
34
*/
37
- @ Parameter (property = "scope" , defaultValue = "main- runtime" , required = true )
35
+ @ Parameter (property = "scope" , defaultValue = "runtime" , required = true )
38
36
private String scope ;
39
37
40
38
/**
@@ -53,12 +51,15 @@ public class TreeMojo extends AbstractMojo {
53
51
public void execute () throws MojoExecutionException , MojoFailureException {
54
52
Runtime runtime = Runtimes .INSTANCE .getRuntime ();
55
53
try (Context context = runtime .create (ContextOverrides .create ().build ())) {
56
- ResolutionRoot root = MavenProjectHelper .toRoot (
57
- mavenProject ,
58
- artifactHandlerManager ,
59
- context .repositorySystemSession ().getArtifactTypeRegistry ());
60
54
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 ));
62
63
} catch (RuntimeException e ) {
63
64
throw new MojoExecutionException (e .getCause ());
64
65
}
0 commit comments