Package org.jppf.location
Class MavenCentralLocation
java.lang.Object
org.jppf.location.AbstractLocation<URL>
org.jppf.location.URLLocation
org.jppf.location.MavenLocation
org.jppf.location.MavenCentralLocation
- All Implemented Interfaces:
Serializable,Location<URL>
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 Summary
FieldsFields inherited from class org.jppf.location.AbstractLocation
eventsEnabled, listeners, path -
Constructor Summary
ConstructorsConstructorDescriptionCreate this maven central location with the specified GAV string and default "jar" packaging.MavenCentralLocation(String gav, String packaging) Create this maven central location with the specified GAV string and packaging.MavenCentralLocation(String groupId, String artifactId, String version) Create this maven central location with the specified group id, artifact id, version and default "jar" packaging.MavenCentralLocation(String groupId, String artifactId, String version, String packaging) Create this maven central location with the specified group id, artifact id, version and packaging. -
Method Summary
Methods inherited from class org.jppf.location.MavenLocation
getArtifactId, getGroupId, getOutputStream, getPackaging, getRepositoryURL, getVersion, toStringMethods inherited from class org.jppf.location.URLLocation
getInputStream, sizeMethods inherited from class org.jppf.location.AbstractLocation
addLocationEventListener, copyTo, fireLocationEvent, getPath, removeLocationEventListener, toByteArray
-
Field Details
-
MAVEN_CENTRAL_URL
The URL for the Maven Central repository.- See Also:
-
-
Constructor Details
-
MavenCentralLocation
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
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.
-