Class MavenCentralLocation

All Implemented Interfaces:
Serializable, Location<URL>

public class MavenCentralLocation extends MavenLocation
This location provides a way to download artifacts from Maven Central, using a maven-like artifact location specification.
Note: instances of this class allow access to a single artifact and do not in any way handle Maven transitive dependencies.
Since:
6.0
Author:
Laurent Cohen
See Also:
  • Field Details

    • MAVEN_CENTRAL_URL

      public static final String MAVEN_CENTRAL_URL
      The URL for the Maven Central repository.
      See Also:
  • Constructor Details

    • MavenCentralLocation

      public MavenCentralLocation(String gav, String packaging) throws MalformedURLException
      Create this maven central location with the specified GAV string and packaging.

      Example:

      Location<URL> location = new MavenCentralLocation("org.jppf:jppf-admin:5.2.9", "jar");
      Parameters:
      gav - the maven identifier in format "groupId:artifactId:version".
      packaging - the type of packaging of the artifact: jar, war, etc.
      Throws:
      MalformedURLException - if resulting URL is incorrect.
    • MavenCentralLocation

      public MavenCentralLocation(String gav) throws MalformedURLException
      Create this maven central location with the specified GAV string and default "jar" packaging.

      Example:

      Location<URL> location = new MavenCentralLocation("org.jppf:jppf-admin:5.2.9");
      Parameters:
      gav - the maven identifier in format "groupId:artifactId:version".
      Throws:
      MalformedURLException - if resulting URL is incorrect.
    • MavenCentralLocation

      public MavenCentralLocation(String groupId, String artifactId, String version) throws MalformedURLException
      Create this maven central location with the specified group id, artifact id, version and default "jar" packaging.

      Example:

      Location<URL> location = new MavenCentralLocation("org.jppf", "jppf-admin", "5.2.9");
      Parameters:
      groupId - the maven group id.
      artifactId - the maven artifact id.
      version - the maven version of the artifact.
      Throws:
      MalformedURLException - if resulting URL is incorrect.
    • MavenCentralLocation

      public MavenCentralLocation(String groupId, String artifactId, String version, String packaging) throws MalformedURLException
      Create this maven central location with the specified group id, artifact id, version and packaging.

      Example:

      Location<URL> location = new MavenCentralLocation("org.jppf", "jppf-admin", "5.2.9", "jar");
      Parameters:
      groupId - the maven group id.
      artifactId - the maven artifact id.
      version - the maven version of the artifact.
      packaging - the type of packaging of the artifact: jar, war, etc.
      Throws:
      MalformedURLException - if resulting URL is incoreect.