diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java
index 7f80c89ed..c77a7ef34 100644
--- a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java
+++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaModelCloner.java
@@ -247,6 +247,21 @@ public class ArchivaModelCloner
return cloned;
}
+ public static SnapshotVersion clone( SnapshotVersion snapshotVersion )
+ {
+ if ( snapshotVersion == null )
+ {
+ return null;
+ }
+
+ SnapshotVersion cloned = new SnapshotVersion();
+
+ cloned.setTimestamp( snapshotVersion.getTimestamp() );
+ cloned.setBuildNumber( snapshotVersion.getBuildNumber() );
+
+ return cloned;
+ }
+
public static VersionedReference clone( VersionedReference versionedReference )
{
if ( versionedReference == null )
@@ -506,4 +521,9 @@ public class ArchivaModelCloner
return ret;
}
+
+ public static List cloneAvailableVersions( List availableVersions )
+ {
+ return cloneSimpleStringList( availableVersions );
+ }
}
diff --git a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaRepositoryMetadataKey.java b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaRepositoryMetadataKey.java
index d4274cba5..d329ef0a5 100644
--- a/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaRepositoryMetadataKey.java
+++ b/archiva-base/archiva-model/src/main/java/org/apache/maven/archiva/model/jpox/ArchivaRepositoryMetadataKey.java
@@ -19,7 +19,7 @@ package org.apache.maven.archiva.model.jpox;
* under the License.
*/
-import org.apache.maven.archiva.model.AbstractProjectKey;
+import org.apache.maven.archiva.model.AbstractVersionedKey;
import java.io.Serializable;
@@ -30,7 +30,7 @@ import java.io.Serializable;
* @version $Id$
*/
public class ArchivaRepositoryMetadataKey
- extends AbstractProjectKey
+ extends AbstractVersionedKey
implements Serializable
{
diff --git a/archiva-base/archiva-model/src/main/mdo/archiva-base.xml b/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
index 39ad54774..cde06e0bb 100644
--- a/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
+++ b/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
@@ -475,6 +475,16 @@
+
+
+
String
true
- The Group ID of the repository content.
+ The Group ID of the metadata.
String
true
- The Artifact ID of the repository content.
+ The Artifact ID of the metadata.
+
+
+
+ version
+ true
+ 1.0.0+
+ String
+ true
+
+ The Version of the metadata.
+
+
+
+ latestVersion
+ false
+ 1.0.0+
+ false
+ String
+
+ The latest version id.
@@ -517,6 +549,19 @@
The released version id.
+
+ snapshotVersion
+ false
+ 1.0.0+
+ false
+
+ The snapshot version id.
+
+
+ SnapshotVersion
+ 1
+
+
availableVersions
false
@@ -531,17 +576,27 @@
- lastModified
+ lastUpdated
+ false
+ 1.0.0+
+ String
+ true
+
+ When the metadata was last updated.
+
+
+
+ fileLastModified
false
1.0.0+
Date
true
- The Last Modified Timestamp of this artifact.
+ The Last Modified Timestamp of this file.
- size
+ fileSize
false
1.0.0+
long
@@ -571,8 +626,54 @@
+
+
+ 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 ) );
+ }
+
+
+
+
+ SnapshotVersion
+ The Snapshot Version
+ 1.0.0+
+
+
+ timestamp
+ String
+ false
+ true
+
+ The unique timestamp for the snapshot version.
+
+
+
+ buildNumber
+ int
+ false
+ true
+ The incremental build number of the snapshot.
+
+
+
+
+
+