src/main/java/net/wasdev/wlp/common/plugins/util/InstallFeatureUtil.java
private Set<String> parseIncludeNode(Set<String> origResult, File serverFile, Element node,
            List<File> updatedParsedXmls) {
        Set<String> result = origResult;
        String includeFileName = node.getAttribute("location");
        if (includeFileName == null || includeFileName.trim().isEmpty()) {
            return result;
        }
        File includeFile = null;
        if (isURL(includeFileName)) {
            try {
                File tempFile = File.createTempFile("serverFromURL", ".xml");
                FileUtils.copyURLToFile(new URL(includeFileName), tempFile, COPY_FILE_TIMEOUT_MILLIS, COPY_FILE_TIMEOUT_MILLIS);
                includeFile = tempFile;
            } catch (IOException e) {
                // skip this xml if it cannot be accessed from URL
                warn("The server file " + serverFile + " includes a URL " + includeFileName + " that cannot be accessed. Skipping the included features.");
                debug(e);
                return result;
            }
        } else {
            includeFile = new File(includeFileName);
        }
        try {
            if (!includeFile.isAbsolute()) {
                includeFile = new File(serverFile.getParentFile().getAbsolutePath(), includeFileName)
                        .getCanonicalFile();
            } else {
                includeFile = includeFile.getCanonicalFile();
            }
        } catch (IOException e) {
            // skip this xml if its path cannot be queried
            warn("The server file " + serverFile + " includes a file " + includeFileName + " that cannot be accessed. Skipping the included features.");
            debug(e);
            return result;
        }
        if (!updatedParsedXmls.contains(includeFile)) {
            String onConflict = node.getAttribute("onConflict");
            Set<String> features = getServerXmlFeatures(null, includeFile, updatedParsedXmls);
            result = handleOnConflict(result, onConflict, features);
        }
        return result;
    }
private Set<String> parseIncludeNode(Set<String> origResult, File serverFile, Element node,
            List<File> updatedParsedXmls) {
        Set<String> result = origResult;
        String includeFileName = node.getAttribute("location");
        if (includeFileName == null || includeFileName.trim().isEmpty()) {
            return result;
        }
        File includeFile = null;
        if (isURL(includeFileName)) {
            try {
                File tempFile = File.createTempFile("serverFromURL", ".xml");
                FileUtils.copyURLToFile(new URL(includeFileName), tempFile, COPY_FILE_TIMEOUT_MILLIS, COPY_FILE_TIMEOUT_MILLIS);
                includeFile = tempFile;
            } catch (IOException e) {
                // skip this xml if it cannot be accessed from URL
                warn("The server file " + serverFile + " includes a URL " + includeFileName + " that cannot be accessed. Skipping the included features.");
                debug(e);
                return result;
            }
        } else {
            includeFile = new File(includeFileName);
        }
        try {
            if (!includeFile.isAbsolute()) {
                includeFile = new File(serverFile.getParentFile().getAbsolutePath(), includeFileName)
                        .getCanonicalFile();
            } else {
                includeFile = includeFile.getCanonicalFile();
            }
        } catch (IOException e) {
            // skip this xml if its path cannot be queried
            warn("The server file " + serverFile + " includes a file " + includeFileName + " that cannot be accessed. Skipping the included features.");
            debug(e);
            return result;
        }
        if (!updatedParsedXmls.contains(includeFile)) {
            String onConflict = node.getAttribute("onConflict");
            Set<String> features = getServerXmlFeatures(null, includeFile, updatedParsedXmls);
            result = handleOnConflict(result, onConflict, features);
        }
        return result;
    }
private Set < String > parseIncludeNode ( Set < String > origResult , File serverFile , Element node , List < File > updatedParsedXmls ) { Set < String > result = origResult ; String includeFileName = node . getAttribute ( "location" ) ; if ( includeFileName == null || includeFileName . trim ( ) . isEmpty ( ) ) { return result ; } File includeFile = null ; if ( isURL ( includeFileName ) ) { try { File tempFile = File . createTempFile ( "serverFromURL" , ".xml" ) ; FileUtils . copyURLToFile ( new URL ( includeFileName ) , tempFile , COPY_FILE_TIMEOUT_MILLIS , COPY_FILE_TIMEOUT_MILLIS ) ; includeFile = tempFile ; } catch ( IOException e ) { // skip this xml if it cannot be accessed from URL warn ( "The server file " + serverFile + " includes a URL " + includeFileName + " that cannot be accessed. Skipping the included features." ) ; debug ( e ) ; return result ; } } else { includeFile = new File ( includeFileName ) ; } try { if ( ! includeFile . isAbsolute ( ) ) { includeFile = new File ( serverFile . getParentFile ( ) . getAbsolutePath ( ) , includeFileName ) . getCanonicalFile ( ) ; } else { includeFile = includeFile . getCanonicalFile ( ) ; } } catch ( IOException e ) { // skip this xml if its path cannot be queried warn ( "The server file " + serverFile + " includes a file " + includeFileName + " that cannot be accessed. Skipping the included features." ) ; debug ( e ) ; return result ; } if ( ! updatedParsedXmls . contains ( includeFile ) ) { String onConflict = node . getAttribute ( "onConflict" ) ; Set < String > features = getServerXmlFeatures ( null , includeFile , updatedParsedXmls ) ; result = handleOnConflict ( result , onConflict , features ) ; } return result ; }
Parse features from an include node.

@param origResult
The features that have been parsed so far.
@param serverFile
The parent server XML file containing the include node.
@param node
The include node.
@param updatedParsedXmls
The list of XML files that have been parsed so far.
@return The set of features to install, or empty set if the cumulatively
parsed xml files only have featureManager sections but no
features to install, or null if there are no valid xml files or
they have no featureManager section
Parse features from an include node .