plugins/org.wso2.developerstudio.eclipse.docker.distribution/src/org/wso2/developerstudio/eclipse/docker/distribution/action/DockerBuildActionUtil.java
/**
     * Read docker image details from the POM file.
     * 
     * @param pomFile pom file
     * @return value of the target repository
     */
Read docker image details from the POM file.

@param pomFile pom file
@return value of the target repository
Read docker image details from the POM file . @param pomFile pom file @return value of the target repository
public static String readDockerImageDetailsFromPomPlugin(File pomFile) {
        String repository = null;
        try {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.parse(pomFile);
            XPathExpression xpRepo = XPathFactory.newInstance().newXPath().compile(DockerProjectConstants.TARGET_REPOSITORY_XPATH);
            repository = xpRepo.evaluate(doc);
        } catch (XPathExpressionException e) {
            log.error("XPathExpressionException while reading pomfile", e);
        } catch (ParserConfigurationException e) {
            log.error("ParserConfigurationException while reading pomfile", e);
        } catch (SAXException e) {
            log.error("SAXException while reading pomfile", e);
        } catch (IOException e) {
            log.error("IOException while reading pomfile", e);
        }
        return repository;
    }
public static String readDockerImageDetailsFromPomPlugin ( File pomFile ) { String repository = null ; try { DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder builder = factory . newDocumentBuilder ( ) ; Document doc = builder . parse ( pomFile ) ; XPathExpression xpRepo = XPathFactory . newInstance ( ) . newXPath ( ) . compile ( DockerProjectConstants . TARGET_REPOSITORY_XPATH ) ; repository = xpRepo . evaluate ( doc ) ; } catch ( XPathExpressionException e ) { log . error ( "XPathExpressionException while reading pomfile" , e ) ; } catch ( ParserConfigurationException e ) { log . error ( "ParserConfigurationException while reading pomfile" , e ) ; } catch ( SAXException e ) { log . error ( "SAXException while reading pomfile" , e ) ; } catch ( IOException e ) { log . error ( "IOException while reading pomfile" , e ) ; } return repository ; }
Read docker image details from the POM file.
Read docker image details from the POM file .