All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.paypal.butterfly.utilities.operations.pom.PomCopyDependencies Maven / Gradle / Ivy

There is a newer version: 3.2.7
Show newest version
package com.paypal.butterfly.utilities.operations.pom;

import java.util.List;

import org.apache.maven.model.Dependency;
import org.apache.maven.model.Model;

/**
 * Copies dependencies from a POM file to another.
 * It also allows replacements plus filtering which dependencies to copy.
 *
 * @author facarvalho
 */
public class PomCopyDependencies extends AbstractPomCopyDependencies {

    private static final String DESCRIPTION = "Copy Maven dependencies from POM file %s to %s";

    public PomCopyDependencies() {
        super(DESCRIPTION);
    }

    @Override
    List getMavenDependencies(Model mavenModel) {
        return mavenModel.getDependencies();
    }

    @Override
    void addMavenDependencies(Model mavenModelTo, List dependencies) {
        dependencies.forEach(d -> mavenModelTo.addDependency(d));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy