class GroupRepositoryMetadata extends AbstractRepositoryMetadata {
    private final String groupId;

    public GroupRepositoryMetadata(String groupId) {
        super(new Metadata());
        this.groupId = groupId;
    }

    public boolean storedInGroupDirectory() {
        return true;
    }

    public boolean storedInArtifactVersionDirectory() {
        return false;
    }

    public String getGroupId() {
        return groupId;
    }

    public String getArtifactId() {
        return null;
    }

    public String getBaseVersion() {
        return null;
    }

    public void addPluginMapping(String goalPrefix, String artifactId) {
        addPluginMapping(goalPrefix, artifactId, artifactId);
    }

    public void addPluginMapping(String goalPrefix, String artifactId, String name) {<FILL_FUNCTION_BODY>}

    public Object getKey() {
        return groupId;
    }

    public boolean isSnapshot() {
        return false;
    }

    public ArtifactRepository getRepository() {
        return null;
    }

    public void setRepository(ArtifactRepository remoteRepository) {
        // intentionally blank
    }
}

        List<Plugin> plugins = getMetadata().getPlugins();
        boolean found = false;
        for (Iterator<Plugin> i = plugins.iterator(); i.hasNext() && !found; ) {
            Plugin plugin = i.next();
            if (plugin.getPrefix().equals(goalPrefix)) {
                found = true;
            }
        }
        if (!found) {
            Plugin plugin = new Plugin();
            plugin.setPrefix(goalPrefix);
            plugin.setArtifactId(artifactId);
            plugin.setName(name);

            getMetadata().addPlugin(plugin);
        }
    
<methods>public java.lang.String extendedToString() ,public java.lang.String getLocalFilename(org.apache.maven.artifact.repository.ArtifactRepository) ,public org.apache.maven.artifact.repository.metadata.Metadata getMetadata() ,public int getNature() ,public org.apache.maven.artifact.repository.ArtifactRepositoryPolicy getPolicy(org.apache.maven.artifact.repository.ArtifactRepository) ,public java.lang.String getRemoteFilename() ,public void merge(org.apache.maven.repository.legacy.metadata.ArtifactMetadata) ,public void merge(org.apache.maven.artifact.metadata.ArtifactMetadata) ,public void setMetadata(org.apache.maven.artifact.repository.metadata.Metadata) ,public void storeInLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.artifact.repository.ArtifactRepository) throws org.apache.maven.artifact.repository.metadata.RepositoryMetadataStoreException,public java.lang.String toString() <variables>private static final java.lang.String LS,private org.apache.maven.artifact.repository.metadata.Metadata metadata