public class MavenURL extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FILE_SEPARATOR
Final artifact path separator.
|
Constructor and Description |
---|
MavenURL(String path)
Creates a new protocol parser.
|
Modifier and Type | Method and Description |
---|---|
String |
getArtifact()
Returns the artifact id.
|
String |
getArtifactLocalMetdataPath()
Returns the complete path to artifact local metadata file.
|
String |
getArtifactMetdataPath()
Returns the complete path to artifact metadata file.
|
String |
getArtifactPath()
Returns the complete path to artifact as stated by Maven 2 repository layout.
|
String |
getArtifactPath(String version)
Returns the complete path to artifact as stated by Maven 2 repository layout.
|
String |
getClassifier()
Returns the artifact classifier.
|
String |
getGroup()
Returns the group id of the artifact.
|
MavenRepositoryURL |
getRepositoryURL()
Returns the repository URL if present, null otherwise
|
String |
getSnapshotPath(String version,
String timestamp,
String buildnumber)
Returns the complete path to artifact for a snapshot file.
|
String |
getSnapshotVersion(String version,
String timestamp,
String buildnumber)
Returns the version for an artifact for a snapshot version.
|
String |
getType()
Returns the artifact type.
|
String |
getVersion()
Returns the artifact version.
|
String |
getVersionLocalMetadataPath(String version)
Returns the path to local metdata file corresponding to this artifact version.
|
String |
getVersionMetadataPath(String version)
Returns the path to metdata file corresponding to this artifact version.
|
static MavenURL |
parsePathWithSchemePrefix(String location)
Lets trim any kind of "mvn:" prefix before parsing
|
public static final String FILE_SEPARATOR
public MavenURL(String path) throws MalformedURLException
path
- the path part of the url (without starting mvn:)MalformedURLException
- if provided path does not comply to expected syntax or an malformed repository URLpublic static MavenURL parsePathWithSchemePrefix(String location) throws MalformedURLException
MalformedURLException
public MavenRepositoryURL getRepositoryURL()
public String getGroup()
public String getArtifact()
public String getVersion()
public String getType()
public String getClassifier()
public String getArtifactPath()
public String getArtifactPath(String version)
version
- The version of the artifact.public String getSnapshotVersion(String version, String timestamp, String buildnumber)
version
- The version of the snapshot.timestamp
- The timestamp of the snapshot.buildnumber
- The buildnumber of the snapshot.public String getSnapshotPath(String version, String timestamp, String buildnumber)
version
- The version of the snapshot.timestamp
- The timestamp of the snapshot.buildnumber
- The buildnumber of the snapshot.public String getVersionMetadataPath(String version)
version
- The version of the the metadata.public String getVersionLocalMetadataPath(String version)
version
- The version of the the metadata.public String getArtifactLocalMetdataPath()
public String getArtifactMetdataPath()
Copyright © 2021 JBoss by Red Hat. All rights reserved.