Search in sources :

Example 6 with PomDependencyMgt

use of org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.PomDependencyMgt in project gradle by gradle.

the class PomReader method getDependencyMgt.

private List<PomDependencyMgt> getDependencyMgt(Element parentElement) {
    List<PomDependencyMgt> depMgmtElements = new ArrayList<PomDependencyMgt>();
    Element dependenciesElement = getFirstChildElement(parentElement, DEPENDENCY_MGT);
    dependenciesElement = getFirstChildElement(dependenciesElement, DEPENDENCIES);
    if (dependenciesElement != null) {
        NodeList childs = dependenciesElement.getChildNodes();
        for (int i = 0; i < childs.getLength(); i++) {
            Node node = childs.item(i);
            if (node instanceof Element && DEPENDENCY.equals(node.getNodeName())) {
                depMgmtElements.add(new PomDependencyMgtElement((Element) node));
            }
        }
    }
    return depMgmtElements;
}
Also used : PomDependencyMgt(org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.PomDependencyMgt) Element(org.w3c.dom.Element) NodeList(org.w3c.dom.NodeList) Node(org.w3c.dom.Node) ArrayList(java.util.ArrayList)

Aggregations

PomDependencyMgt (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.PomDependencyMgt)6 LinkedHashMap (java.util.LinkedHashMap)2 MavenDependencyKey (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.MavenDependencyKey)2 ArrayList (java.util.ArrayList)1 Map (java.util.Map)1 ModuleComponentSelector (org.gradle.api.artifacts.component.ModuleComponentSelector)1 DefaultMutableVersionConstraint (org.gradle.api.internal.artifacts.dependencies.DefaultMutableVersionConstraint)1 PomProfile (org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.data.PomProfile)1 DefaultModuleComponentSelector (org.gradle.internal.component.external.model.DefaultModuleComponentSelector)1 Element (org.w3c.dom.Element)1 Node (org.w3c.dom.Node)1 NodeList (org.w3c.dom.NodeList)1