Package bm.repositories
Class RepoFile
java.lang.Object
bm.repositories.RepoFile
Data holder for a typical maven repository file with group, name and version.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfilename()Returns the file name created from name, version and type asname-version-classifier.typewhere the "-classifier" part is optional.Returns the file name created from name, version and type asname-version.typestatic RepoFilefromGradleShort(String groupNameVersionClassifier, String type) Creates the object.Creates a repository URL path and appends it to the given repository base URL.
-
Field Details
-
group
group name of the artifact -
name
name of the artifact -
version
version of the artifact -
classifier
classifier of the artifact, may benull
-
-
Constructor Details
-
RepoFile
Creates the object- Parameters:
group- artifact groupname- artifact nameversion- artifact versiontype- typically the file extension, though without the dot
-
-
Method Details
-
fromGradleShort
public static RepoFile fromGradleShort(String groupNameVersionClassifier, String type) throws BuildProblemException Creates the object.- Parameters:
groupNameVersionClassifier- must have the formgroup:name:version:classifier, where the classifier is optional, i.e. after a split on ':' it must have 3 or 4 elements.- Returns:
- the created
RepoFile - Throws:
BuildProblemException
-
repoUrl
Creates a repository URL path and appends it to the given repository base URL. This works withhttps://repo1.maven.orgbut may work with others.- Parameters:
repoBaseUrl- to prefix to the constructed path- Returns:
- basically repoBaseUrl + group/name/version/filename() with the dots in group being replaced by '/'
- Throws:
BuildProblemException
-
fetch
- Throws:
BuildProblemException
-
asTarget
-
filename
Returns the file name created from name, version and type asname-version.type- Parameters:
directory- to prefix to the returned name- Returns:
- the path to the artifact file
-
filename
Returns the file name created from name, version and type asname-version-classifier.typewhere the "-classifier" part is optional.- Returns:
- the path to the artifact file
-