class ProjectArtifactMetadata extends AbstractArtifactMetadata {
    private final File file;

    public ProjectArtifactMetadata(Artifact artifact) {
        this(artifact, null);
    }

    public ProjectArtifactMetadata(Artifact artifact, File file) {
        super(artifact);
        this.file = file;
    }

    public File getFile() {
        return file;
    }

    public String getRemoteFilename() {
        return getFilename();
    }

    public String getLocalFilename(ArtifactRepository repository) {
        return getFilename();
    }

    private String getFilename() {
        return getArtifactId() + "-" + artifact.getVersion() + ".pom";
    }

    public void storeInLocalRepository(ArtifactRepository localRepository, ArtifactRepository remoteRepository)
            throws RepositoryMetadataStoreException {<FILL_FUNCTION_BODY>}

    public String toString() {
        return "project information for " + artifact.getArtifactId() + " " + artifact.getVersion();
    }

    public boolean storedInArtifactVersionDirectory() {
        return true;
    }

    public String getBaseVersion() {
        return artifact.getBaseVersion();
    }

    public Object getKey() {
        return "project " + artifact.getGroupId() + ":" + artifact.getArtifactId();
    }

    public void merge(ArtifactMetadata metadata) {
        ProjectArtifactMetadata m = (ProjectArtifactMetadata) metadata;
        if (!m.file.equals(file)) {
            throw new IllegalStateException("Cannot add two different pieces of metadata for: " + getKey());
        }
    }

    public void merge(org.apache.maven.repository.legacy.metadata.ArtifactMetadata metadata) {
        this.merge((ArtifactMetadata) metadata);
    }
}

        File destination = new File(
                localRepository.getBasedir(), localRepository.pathOfLocalRepositoryMetadata(this, remoteRepository));

        // ----------------------------------------------------------------------------
        // I'm fully aware that the file could just be moved using File.rename but
        // there are bugs in various JVM that have problems doing this across
        // different filesystem. So we'll incur the small hit to actually copy
        // here and be safe. jvz.
        // ----------------------------------------------------------------------------

        try {
            Files.createDirectories(destination.toPath().getParent());
            Files.copy(file.toPath(), destination.toPath());
        } catch (IOException e) {
            throw new RepositoryMetadataStoreException("Error copying POM to the local repository.", e);
        }
    
<no_super_class>