程序包 com.alazeprt

类 Dependency

java.lang.Object
com.alazeprt.Dependency

public class Dependency extends Object
Represents a Maven dependency and provides methods for retrieving sub-dependencies. Also provides methods for parsing dependency information and obtaining URLs.
  • 构造器详细资料

    • Dependency

      public Dependency(String dependency)
      Initializes a dependency with default central URL.
      参数:
      dependency - Shortening name of the dependency
    • Dependency

      public Dependency(String dependency, String centralUrl)
      Initializes a dependency with a custom central URL.
      参数:
      dependency - Shortening name of the dependency
      centralUrl - Link to the central repository where the dependency is located
    • Dependency

      public Dependency(String groupId, String artifactId, String version)
      Initializes a dependency using groupId, artifactId, and version.
      参数:
      groupId - GroupId of the dependency
      artifactId - ArtifactId of the dependency
      version - Version of the dependency
  • 方法详细资料

    • getDependency

      public String getDependency()
      Gets the shortening name of the dependency.
      返回:
      Dependency shortening name
    • parseDependency

      public String 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, IOException
      Recursively 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 URL
      org.codehaus.plexus.util.xml.pull.XmlPullParserException - If the XML file of the dependency cannot be parsed