public final class PomProperties extends Object
Modifier and Type | Method and Description |
---|---|
static @NotNull Properties |
create(@NotNull String groupId,
@NotNull String artifactId)
Creates and returns a new instance of Properties for the provided parameters.
|
static String |
version(@NotNull String groupId,
@NotNull String artifactId)
Returns the GAV version for the provided parameters, or "unknown" if
the version cannot be determined.
|
@NotNull public static @NotNull Properties create(@NotNull @NotNull String groupId, @NotNull @NotNull String artifactId)
The provided libraryName
is used to pick up properties from a resource named
/META-INF/maven/${groupId}/${artifactId}/pom.properties
e.g. "/META-INF/maven/net.openhft/chronicle-queue/pom.properties". If no such resource
exist, an empty Properties instance is returned.
groupId
- name of the group (e.g. net.openhft)artifactId
- name of the library (e.g. chronicle-queue)public static String version(@NotNull @NotNull String groupId, @NotNull @NotNull String artifactId)
The provided libraryName
is used the same way as for
create(String, String)
.
groupId
- name of the group (e.g. net.openhft)artifactId
- name of the library (e.g. chronicle-queue)create(String, String)
Copyright © 2023. All rights reserved.