|
11 | 11 |
|
12 | 12 | from ...config import GlobalSettings |
13 | 13 | from ...env import EnvironmentSpec |
14 | | -from ...env.builder import filter_managed_components |
15 | 14 | from ...env.jar import parse_manifest, read_raw_manifest |
16 | 15 | from ...parse.coordinate import Coordinate |
| 16 | +from ...parse.endpoint import Endpoint |
17 | 17 | from ...styles import COORD_HELP_FULL |
18 | 18 | from ..args import build_parsed_args |
19 | 19 | from ..console import console_print |
@@ -431,28 +431,23 @@ def _print_deps(ctx, endpoint, list_mode: bool): |
431 | 431 | context = create_maven_context(args, config.to_dict()) |
432 | 432 | builder = create_environment_builder(args, config.to_dict(), context) |
433 | 433 |
|
434 | | - # Parse coordinates into components |
| 434 | + # Parse coordinates into dependencies |
435 | 435 | if args.is_spec_mode(): |
436 | 436 | spec_file = args.get_spec_file() |
437 | 437 | if not spec_file.exists(): |
438 | 438 | _log.error(f"{spec_file} not found") |
439 | 439 | ctx.exit(1) |
440 | 440 | spec = EnvironmentSpec.load(spec_file) |
441 | | - components = [] |
442 | | - for coord_str in spec.coordinates: |
443 | | - coord = _parse_coord_or_die(ctx, coord_str) |
444 | | - version = coord.version or "RELEASE" |
445 | | - component = context.project(coord.groupId, coord.artifactId).at_version( |
446 | | - version |
447 | | - ) |
448 | | - components.append(component) |
449 | | - boms = None # No BOM management for spec mode |
| 441 | + coordinates = [ |
| 442 | + Coordinate.parse(coord_str) for coord_str in spec.coordinates |
| 443 | + ] |
| 444 | + dependencies = builder._coordinates_to_dependencies(coordinates) |
450 | 445 | else: |
451 | 446 | if not endpoint: |
452 | 447 | _log.error("No endpoint specified") |
453 | 448 | ctx.exit(1) |
454 | | - components, coordinates, _ = builder._parse_endpoint(endpoint) |
455 | | - boms = filter_managed_components(components, coordinates) |
| 449 | + parsed = Endpoint.parse(endpoint) |
| 450 | + dependencies = builder._coordinates_to_dependencies(parsed.coordinates) |
456 | 451 |
|
457 | | - print_dependencies(components, context, boms=boms, list_mode=list_mode) |
| 452 | + print_dependencies(dependencies, context, list_mode=list_mode) |
458 | 453 | ctx.exit(0) |
0 commit comments