Search in sources :

Example 1 with ActivationOS

use of org.apache.maven.model.ActivationOS in project spring-cloud-function by spring-cloud.

the class MavenSettings method createModelActivation.

private org.apache.maven.model.Activation createModelActivation(Activation activation) {
    org.apache.maven.model.Activation modelActivation = new org.apache.maven.model.Activation();
    modelActivation.setActiveByDefault(activation.isActiveByDefault());
    if (activation.getFile() != null) {
        ActivationFile activationFile = new ActivationFile();
        activationFile.setExists(activation.getFile().getExists());
        activationFile.setMissing(activation.getFile().getMissing());
        modelActivation.setFile(activationFile);
    }
    modelActivation.setJdk(activation.getJdk());
    if (activation.getOs() != null) {
        ActivationOS os = new ActivationOS();
        os.setArch(activation.getOs().getArch());
        os.setFamily(activation.getOs().getFamily());
        os.setName(activation.getOs().getName());
        os.setVersion(activation.getOs().getVersion());
        modelActivation.setOs(os);
    }
    if (activation.getProperty() != null) {
        ActivationProperty property = new ActivationProperty();
        property.setName(activation.getProperty().getName());
        property.setValue(activation.getProperty().getValue());
        modelActivation.setProperty(property);
    }
    return modelActivation;
}
Also used : ActivationFile(org.apache.maven.model.ActivationFile) ActivationOS(org.apache.maven.model.ActivationOS) Activation(org.apache.maven.settings.Activation) ActivationProperty(org.apache.maven.model.ActivationProperty)

Example 2 with ActivationOS

use of org.apache.maven.model.ActivationOS in project spring-boot by spring-projects.

the class MavenSettings method createModelActivation.

private org.apache.maven.model.Activation createModelActivation(Activation activation) {
    org.apache.maven.model.Activation modelActivation = new org.apache.maven.model.Activation();
    modelActivation.setActiveByDefault(activation.isActiveByDefault());
    if (activation.getFile() != null) {
        ActivationFile activationFile = new ActivationFile();
        activationFile.setExists(activation.getFile().getExists());
        activationFile.setMissing(activation.getFile().getMissing());
        modelActivation.setFile(activationFile);
    }
    modelActivation.setJdk(activation.getJdk());
    if (activation.getOs() != null) {
        ActivationOS os = new ActivationOS();
        os.setArch(activation.getOs().getArch());
        os.setFamily(activation.getOs().getFamily());
        os.setName(activation.getOs().getName());
        os.setVersion(activation.getOs().getVersion());
        modelActivation.setOs(os);
    }
    if (activation.getProperty() != null) {
        ActivationProperty property = new ActivationProperty();
        property.setName(activation.getProperty().getName());
        property.setValue(activation.getProperty().getValue());
        modelActivation.setProperty(property);
    }
    return modelActivation;
}
Also used : ActivationFile(org.apache.maven.model.ActivationFile) ActivationOS(org.apache.maven.model.ActivationOS) Activation(org.apache.maven.settings.Activation) ActivationProperty(org.apache.maven.model.ActivationProperty)

Example 3 with ActivationOS

use of org.apache.maven.model.ActivationOS in project che by eclipse.

the class MavenModelUtil method convertToMavenActivationOs.

private static ActivationOS convertToMavenActivationOs(MavenActivationOS os) {
    if (os != null) {
        ActivationOS result = new ActivationOS();
        result.setArch(os.getArch());
        result.setFamily(os.getFamily());
        result.setName(os.getName());
        result.setVersion(os.getVersion());
        return result;
    }
    return null;
}
Also used : MavenActivationOS(org.eclipse.che.maven.data.MavenActivationOS) ActivationOS(org.apache.maven.model.ActivationOS)

Aggregations

ActivationOS (org.apache.maven.model.ActivationOS)3 ActivationFile (org.apache.maven.model.ActivationFile)2 ActivationProperty (org.apache.maven.model.ActivationProperty)2 Activation (org.apache.maven.settings.Activation)2 MavenActivationOS (org.eclipse.che.maven.data.MavenActivationOS)1