@@ -353,48 +353,50 @@ public boolean recordStop(Output output) {
353
353
@ Override
354
354
public boolean resolve (
355
355
ResolutionScope resolutionScope ,
356
- ResolutionRoot resolutionRoot ,
356
+ Collection < ResolutionRoot > resolutionRoots ,
357
357
boolean sources ,
358
358
boolean javadoc ,
359
359
boolean signatures ,
360
360
Output output ) {
361
361
try {
362
- DependencyResult dependencyResult = toolboxResolver .resolve (
363
- resolutionScope ,
364
- resolutionRoot .getArtifact (),
365
- resolutionRoot .getDependencies (),
366
- resolutionRoot .getManagedDependencies ());
362
+ for (ResolutionRoot resolutionRoot : resolutionRoots ) {
363
+ DependencyResult dependencyResult = toolboxResolver .resolve (
364
+ resolutionScope ,
365
+ resolutionRoot .getArtifact (),
366
+ resolutionRoot .getDependencies (),
367
+ resolutionRoot .getManagedDependencies ());
367
368
368
- output .normal ("" );
369
- if (output .isVerbose ()) {
370
- for (ArtifactResult artifactResult : dependencyResult .getArtifactResults ()) {
369
+ output .normal ("" );
370
+ if (output .isVerbose ()) {
371
+ for (ArtifactResult artifactResult : dependencyResult .getArtifactResults ()) {
372
+ output .verbose (
373
+ "{} -> {}" ,
374
+ artifactResult .getArtifact (),
375
+ artifactResult .getArtifact ().getFile ());
376
+ }
377
+ }
378
+ output .normal ("Resolved: {}" , resolutionRoot .getArtifact ());
379
+ if (output .isVerbose ()) {
371
380
output .verbose (
372
- "{} -> {}" ,
373
- artifactResult .getArtifact (),
374
- artifactResult .getArtifact ().getFile ());
381
+ " Transitive hull count: {}" ,
382
+ dependencyResult .getArtifactResults ().size ());
383
+ output .verbose (
384
+ " Transitive hull size: {}" ,
385
+ humanReadableByteCountBin (dependencyResult .getArtifactResults ().stream ()
386
+ .map (ArtifactResult ::getArtifact )
387
+ .map (Artifact ::getFile )
388
+ .filter (Objects ::nonNull )
389
+ .map (f -> {
390
+ try {
391
+ return Files .size (f .toPath ());
392
+ } catch (IOException e ) {
393
+ throw new RuntimeException (e );
394
+ }
395
+ })
396
+ .collect (Collectors .summarizingLong (Long ::longValue ))
397
+ .getSum ()));
375
398
}
376
399
}
377
- output .normal ("Resolved: {}" , resolutionRoot .getArtifact ());
378
- if (output .isVerbose ()) {
379
- output .verbose (
380
- " Transitive hull count: {}" ,
381
- dependencyResult .getArtifactResults ().size ());
382
- output .verbose (
383
- " Transitive hull size: {}" ,
384
- humanReadableByteCountBin (dependencyResult .getArtifactResults ().stream ()
385
- .map (ArtifactResult ::getArtifact )
386
- .map (Artifact ::getFile )
387
- .filter (Objects ::nonNull )
388
- .map (f -> {
389
- try {
390
- return Files .size (f .toPath ());
391
- } catch (IOException e ) {
392
- throw new RuntimeException (e );
393
- }
394
- })
395
- .collect (Collectors .summarizingLong (Long ::longValue ))
396
- .getSum ()));
397
- }
398
400
return true ;
399
401
} catch (Exception e ) {
400
402
throw new RuntimeException (e );
0 commit comments