程序包 com.alazeprt
类 Dependency
java.lang.Object
com.alazeprt.Dependency
Represents a Maven dependency and provides methods for retrieving sub-dependencies.
Also provides methods for parsing dependency information and obtaining URLs.
-
构造器概要
构造器构造器说明Dependency(String dependency) Initializes a dependency with default central URL.Dependency(String dependency, String centralUrl) Initializes a dependency with a custom central URL.Dependency(String groupId, String artifactId, String version) Initializes a dependency using groupId, artifactId, and version. -
方法概要
修饰符和类型方法说明Gets the shortening name of the dependency.Recursively retrieves all sub-dependencies of this dependency.Parses and constructs the URL of the dependency.
-
构造器详细资料
-
Dependency
Initializes a dependency with default central URL.- 参数:
dependency- Shortening name of the dependency
-
Dependency
Initializes a dependency with a custom central URL.- 参数:
dependency- Shortening name of the dependencycentralUrl- Link to the central repository where the dependency is located
-
Dependency
Initializes a dependency using groupId, artifactId, and version.- 参数:
groupId- GroupId of the dependencyartifactId- ArtifactId of the dependencyversion- Version of the dependency
-
-
方法详细资料
-
getDependency
Gets the shortening name of the dependency.- 返回:
- Dependency shortening name
-
parseDependency
Parses and constructs the URL of the dependency.- 返回:
- URL where the dependency is located
-
getSubDependencies
public List<Dependency> getSubDependencies() throws org.codehaus.plexus.util.xml.pull.XmlPullParserException, IOExceptionRecursively retrieves all sub-dependencies of this dependency.- 返回:
- List of all sub-dependencies that need to be downloaded (including itself)
- 抛出:
IOException- If unable to connect to the dependency's URLorg.codehaus.plexus.util.xml.pull.XmlPullParserException- If the XML file of the dependency cannot be parsed
-