class PluginInfo {
        final String groupId;

        private final String artifactId;

        private final String goalPrefix;

        private final String name;

        PluginInfo(String groupId, String artifactId, String goalPrefix, String name) {
            this.groupId = groupId;
            this.artifactId = artifactId;
            this.goalPrefix = goalPrefix;
            this.name = name;
        }
    }

    private final PluginInfo pluginInfo;

    PluginsMetadata(PluginInfo pluginInfo, Date timestamp) {
        super(createRepositoryMetadata(pluginInfo), (Path) null, timestamp);
        this.pluginInfo = pluginInfo;
    }

    PluginsMetadata(PluginInfo pluginInfo, Path path, Date timestamp) {
        super(createRepositoryMetadata(pluginInfo), path, timestamp);
        this.pluginInfo = pluginInfo;
    }

    private static Metadata createRepositoryMetadata(PluginInfo pluginInfo) {
        return Metadata.newBuilder()
                .plugins(List.of(Plugin.newBuilder()
                        .prefix(pluginInfo.goalPrefix)
                        .artifactId(pluginInfo.artifactId)
                        .name(pluginInfo.name)
                        .build()))
                .build();
    }

    @Override
    protected void merge(Metadata recessive) {<FILL_FUNCTION_BODY>

        List<Plugin> recessivePlugins = recessive.getPlugins();
        List<Plugin> plugins = metadata.getPlugins();
        if (!plugins.isEmpty()) {
            LinkedHashMap<String, Plugin> mergedPlugins = new LinkedHashMap<>();
            recessivePlugins.forEach(p -> mergedPlugins.put(p.getPrefix(), p));
            plugins.forEach(p -> mergedPlugins.put(p.getPrefix(), p));
            metadata = metadata.withPlugins(mergedPlugins.values());
        }
    
<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,static java.text.DateFormat fmt,private boolean merged,protected Metadata metadata,private final non-sealed java.nio.file.Path path,protected final non-sealed java.util.Date timestamp