Example usage for org.springframework.ide.eclipse.boot.core IMavenCoordinates getClassifier

List of usage examples for org.springframework.ide.eclipse.boot.core IMavenCoordinates getClassifier

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.boot.core IMavenCoordinates getClassifier.

Prototype

String getClassifier();

Source Link

Usage

From source file:org.springframework.ide.eclipse.boot.core.internal.MavenSpringBootProject.java

/**
 * creates and adds new dependency to the parent. formats the result.
 *///  w  ww . j a va  2 s.c o m
private Element createDependency(Element parentList, IMavenCoordinates info, String scope) {
    Element dep = createElement(parentList, DEPENDENCY);
    String groupId = info.getGroupId();
    String artifactId = info.getArtifactId();
    String version = info.getVersion();
    String classifier = info.getClassifier();

    if (groupId != null) {
        createElementWithText(dep, GROUP_ID, groupId);
    }
    createElementWithText(dep, ARTIFACT_ID, artifactId);
    if (version != null) {
        createElementWithText(dep, VERSION, version);
    }
    if (classifier != null) {
        createElementWithText(dep, CLASSIFIER, classifier);
    }
    if (scope != null && !scope.equals("compile")) {
        createElementWithText(dep, SCOPE, scope);
    }
    format(dep);
    return dep;
}