Package com.google.code.xmltool

Examples of com.google.code.xmltool.XMLDocument


        return "";
    }

    private static void readPOM(MavenDeployerGui gui) {
        try {
            XMLDocument doc = XMLDoc.from(pom).gotoRoot();
            String ns = doc.getPefix("http://maven.apache.org/POM/4.0.0");
            if (ns.length() > 0) ns += ":";
            if (doc.hasTag("%1$sgroupId", ns)) {
                gui.groupId.setText(doc.getText("%1$sgroupId", ns));
            } else {
                gui.groupId.setText("");
            }
            if (doc.hasTag("%1$sartifactId", ns)) {
                gui.artifactId.setText(doc.getText("%1$sartifactId", ns));
            } else {
                gui.artifactId.setText("");
            }
            if (doc.hasTag("%1$sversion", ns)) {
                gui.version.setText(doc.getText("%1$sversion", ns));
            } else {
                gui.version.setText("");
            }
            if (doc.hasTag("%1$spackaging", ns)) {
                gui.packaging.setSelectedItem(doc.getText("%1$spackaging", ns));
            } else {
                gui.packaging.setSelectedItem("jar");
            }
            if (doc.hasTag("%1$sdescription", ns)) {
                gui.description.setText(doc.getText("%1$sdescription", ns));
            } else {
                gui.description.setText("");
            }
            if (doc.hasTag("%1$sdistributionManagement/%1$srepository/%1$surl", ns)) {
                gui.repositoryURL.setText(doc.getText("%1$sdistributionManagement/%1$srepository/%1$surl", ns));
            } else {
                gui.repositoryURL.setText("");
            }
            if (doc.hasTag("%1$sdistributionManagement/%1$srepository/%1$sid", ns)) {
                gui.repositoryID.setText(doc.getText("%1$sdistributionManagement/%1$srepository/%1$sid", ns));
            } else {
                gui.repositoryID.setText("");
            }
        } catch (Exception ee) {
            gui.console.setText(ExceptionUtils.asText(ee));
View Full Code Here

TOP

Related Classes of com.google.code.xmltool.XMLDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.