Class MavenMetadata
- java.lang.Object
-
- org.eclipse.jetty.start.fileinits.MavenMetadata
-
public class MavenMetadata extends java.lang.Object
Simple parser for maven-metadata.xml files
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MavenMetadata.Snapshot
-
Constructor Summary
Constructors Constructor Description MavenMetadata(java.nio.file.Path metadataXml)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getArtifactId()
java.lang.String
getGroupId()
java.lang.String
getLastUpdated()
MavenMetadata.Snapshot
getSnapshot(java.lang.String classifier, java.lang.String extension)
java.lang.String
getSnapshotBuildNumber()
java.util.Collection<MavenMetadata.Snapshot>
getSnapshots()
java.lang.String
getSnapshotTimestamp()
java.lang.String
getVersion()
static boolean
isExpiredTimestamp(java.lang.String lastUpdated)
Tests the current time against the provided timestamp.
-
-
-
Method Detail
-
getGroupId
public java.lang.String getGroupId()
-
getArtifactId
public java.lang.String getArtifactId()
-
getVersion
public java.lang.String getVersion()
-
getLastUpdated
public java.lang.String getLastUpdated()
-
getSnapshotTimestamp
public java.lang.String getSnapshotTimestamp()
-
getSnapshotBuildNumber
public java.lang.String getSnapshotBuildNumber()
-
getSnapshots
public java.util.Collection<MavenMetadata.Snapshot> getSnapshots()
-
getSnapshot
public MavenMetadata.Snapshot getSnapshot(java.lang.String classifier, java.lang.String extension)
-
isExpiredTimestamp
public static boolean isExpiredTimestamp(java.lang.String lastUpdated)
Tests the current time against the provided timestamp.If the current time is the next day from the provided timestamp, it is considered expired.
- Parameters:
lastUpdated
- the time representing the last update- Returns:
- true if it's the next day from the timestamp (or later)
-
-