class VersionsMetadata extends MavenMetadata {

    private final Artifact artifact;

    VersionsMetadata(Artifact artifact, Date timestamp) {
        super(createRepositoryMetadata(artifact), (Path) null, timestamp);
        this.artifact = artifact;
    }

    VersionsMetadata(Artifact artifact, Path path, Date timestamp) {
        super(createRepositoryMetadata(artifact), path, timestamp);
        this.artifact = artifact;
    }

    private static Metadata createRepositoryMetadata(Artifact artifact) {<FILL_FUNCTION_BODY>}

    @Override
    protected void merge(Metadata recessive) {
        Versioning versioning = metadata.getVersioning();
        versioning.setLastUpdatedTimestamp(timestamp);

        if (recessive.getVersioning() != null) {
            if (versioning.getLatest() == null) {
                versioning.setLatest(recessive.getVersioning().getLatest());
            }
            if (versioning.getRelease() == null) {
                versioning.setRelease(recessive.getVersioning().getRelease());
            }

            Collection<String> versions =
                    new LinkedHashSet<>(recessive.getVersioning().getVersions());
            versions.addAll(versioning.getVersions());
            versioning.setVersions(new ArrayList<>(versions));
        }
    }

    public Object getKey() {
        return getGroupId() + ':' + getArtifactId();
    }

    public static Object getKey(Artifact artifact) {
        return artifact.getGroupId() + ':' + artifact.getArtifactId();
    }

    @Deprecated
    @Override
    public MavenMetadata setFile(File file) {
        return new VersionsMetadata(artifact, file.toPath(), timestamp);
    }

    @Override
    public MavenMetadata setPath(Path path) {
        return new VersionsMetadata(artifact, path, timestamp);
    }

    @Override
    public String getGroupId() {
        return artifact.getGroupId();
    }

    @Override
    public String getArtifactId() {
        return artifact.getArtifactId();
    }

    @Override
    public String getVersion() {
        return "";
    }

    @Override
    public Nature getNature() {
        return artifact.isSnapshot() ? Nature.RELEASE_OR_SNAPSHOT : Nature.RELEASE;
    }
}

        Metadata metadata = new Metadata();
        metadata.setGroupId(artifact.getGroupId());
        metadata.setArtifactId(artifact.getArtifactId());

        Versioning versioning = new Versioning();
        versioning.addVersion(artifact.getBaseVersion());
        if (!artifact.isSnapshot()) {
            versioning.setRelease(artifact.getBaseVersion());
        }
        if ("maven-plugin".equals(artifact.getProperty(ArtifactProperties.TYPE, ""))) {
            versioning.setLatest(artifact.getBaseVersion());
        }

        metadata.setVersioning(versioning);

        return metadata;
    
<methods>public java.io.File getFile() ,public java.nio.file.Path getPath() ,public Map<java.lang.String,java.lang.String> getProperties() ,public java.lang.String getType() ,public boolean isMerged() ,public void merge(java.io.File, java.io.File) throws RepositoryException,public void merge(java.nio.file.Path, java.nio.file.Path) throws RepositoryException,public org.eclipse.aether.metadata.Metadata setProperties(Map<java.lang.String,java.lang.String>) <variables>static final java.lang.String MAVEN_METADATA_XML,private boolean merged,protected org.apache.maven.artifact.repository.metadata.Metadata metadata,private final non-sealed java.nio.file.Path path,protected final non-sealed java.util.Date timestamp