repository-metadata
Metadata
Per-directory repository metadata.
package
org.apache.maven.artifact.repository.metadata
Metadata
1.0.0
groupId
1.0.0
String
The groupId that this directory represents, if any.
artifactId
1.0.0
String
The artifactId that this directory represents, if any.
version
1.0.0
String
The version that this directory represents, if any.
versioning
1.0.0
Versioning
Versioning information for the artifact.
plugins
1.0.0
The set of plugin mappings for the group.
Plugin
*
1.0.0
= 0 )
{
changed = true;
v.setLastUpdated( versioning.getLastUpdated() );
if ( versioning.getRelease() != null )
{
changed = true;
v.setRelease( versioning.getRelease() );
}
if ( versioning.getLatest() != null )
{
changed = true;
v.setLatest( versioning.getLatest() );
}
Snapshot s = v.getSnapshot();
Snapshot snapshot = versioning.getSnapshot();
if ( snapshot != null )
{
if ( s == null )
{
s = new Snapshot();
v.setSnapshot( s );
changed = true;
}
// overwrite
if ( s.getTimestamp() == null ? snapshot.getTimestamp() != null
: !s.getTimestamp().equals( snapshot.getTimestamp() ) )
{
s.setTimestamp( snapshot.getTimestamp() );
changed = true;
}
if ( s.getBuildNumber() != snapshot.getBuildNumber() )
{
s.setBuildNumber( snapshot.getBuildNumber() );
changed = true;
}
if ( s.isLocalCopy() != snapshot.isLocalCopy() )
{
s.setLocalCopy( snapshot.isLocalCopy() );
changed = true;
}
}
}
}
return changed;
}
]]>
Versioning
1.0.0
Versioning information for an artifact.
latest
1.0.0
String
What the latest version in the directory is, including snapshots.
release
1.0.0
String
What the latest version in the directory is, of the releases.
snapshot
1.0.0
Snapshot
The current snapshot data in use for this version.
versions
1.0.0
Versions available for the artifact.
String
*
lastUpdated
1.0.0
String
When the metadata was last updated.
1.0.0
public void updateTimestamp()
{
setLastUpdatedTimestamp( new java.util.Date() );
}
public void setLastUpdatedTimestamp( java.util.Date date )
{
java.util.TimeZone timezone = java.util.TimeZone.getTimeZone( "UTC" );
java.text.DateFormat fmt = new java.text.SimpleDateFormat( "yyyyMMddHHmmss" );
fmt.setTimeZone( timezone );
setLastUpdated( fmt.format( date ) );
}
Snapshot
1.0.0
Snapshot data for the current version.
timestamp
1.0.0
The time it was deployed.
String
buildNumber
1.0.0
The incremental build number.
int
localCopy
1.0.0
Whether to use a local copy instead (with filename that includes the base version).
boolean
false
Plugin
1.0.0
Mapping information for a single plugin within this group.
NOTE: plugin version is _NOT_ included here, since it is resolved using a separate algorithm.
name
String
true
1.0.0
Display name for the plugin.
prefix
String
true
1.0.0
The plugin invocation prefix (i.e. eclipse for eclipse:eclipse).
artifactId
String
true
1.0.0
The plugin artifactId.