Linux command
cs-resolve 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Resolve dependencies
cs resolve [org.typelevel::cats-core:2.9.0]
Show dependency tree
cs resolve -t [org.apache.spark::spark-sql:3.4.0]
Resolve with exclusions
cs resolve [app:version] --exclude [org.slf4j:*]
Resolve from custom repository
cs resolve -r [https://repo.example.com/maven] [org.example::app:1.0]
Check for conflicts
cs resolve --conflicts [app:version]
Output as JSON
cs resolve --json [app:version]
说明
cs resolve performs Maven/Ivy dependency resolution, showing all transitive dependencies for given artifacts. It's useful for understanding dependency trees, finding version conflicts, and debugging classpath issues. The command resolves but doesn't download artifacts, making it fast for exploring dependencies. Tree view shows the dependency hierarchy, while flat view lists all resolved artifacts with their versions. Conflict detection helps identify situations where different versions of the same library are requested. The reverse dependency feature helps understand why a particular library is included.
参数
- -t, --tree
- Display dependency tree instead of flat list.
- -r _URL_, --repository _URL_
- Add a custom Maven repository.
- --exclude _PATTERN_
- Exclude artifacts matching pattern (groupId:artifactId).
- --conflicts
- Show version conflicts in dependencies.
- --json
- Output resolution result as JSON.
- --reverse
- Show reverse dependencies (what depends on what).
- --what-depends-on _COORDS_
- Show what depends on specific artifact.
- -q, --quiet
- Suppress progress output.
FAQ
What is the cs-resolve command used for?
cs resolve performs Maven/Ivy dependency resolution, showing all transitive dependencies for given artifacts. It's useful for understanding dependency trees, finding version conflicts, and debugging classpath issues. The command resolves but doesn't download artifacts, making it fast for exploring dependencies. Tree view shows the dependency hierarchy, while flat view lists all resolved artifacts with their versions. Conflict detection helps identify situations where different versions of the same library are requested. The reverse dependency feature helps understand why a particular library is included.
How do I run a basic cs-resolve example?
Run `cs resolve [org.typelevel::cats-core:2.9.0]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -t, --tree do in cs-resolve?
Display dependency tree instead of flat list.