if (dependency.getModuleRevision() == null || dependency.isCompletelyEvicted()) { continue; }
    private void generateXml(Ivy ivy, IvyNode[] dependencies, Map moduleRevToArtifactsMap, Map artifactsToCopy) {        try {            FileOutputStream fileOuputStream = new FileOutputStream(_tofile);            try {                TransformerHandler saxHandler = createTransformerHandler(fileOuputStream);                                saxHandler.startDocument();                saxHandler.startElement(null, "modules", "modules", new AttributesImpl());                for (int i = 0; i < dependencies.length; i++) {                    IvyNode dependency = dependencies[i];                    startModule(saxHandler, dependency);                    Set artifactsOfModuleRev = (Set) moduleRevToArtifactsMap.get(dependency.getModuleRevision().getId());                    if (artifactsOfModuleRev != null) {                        for (Iterator iter = artifactsOfModuleRev.iterator(); iter.hasNext();) {                            Artifact artifact = (Artifact) iter.next();                            startArtifact(saxHandler, artifact);                            writeOriginLocationIfPresent(ivy, saxHandler, artifact);                            writeCacheLocation(ivy, saxHandler, artifact);                            Set artifactDestPaths = (Set) artifactsToCopy.get(artifact);                            for (Iterator iterator = artifactDestPaths.iterator(); iterator.hasNext();) {                                String artifactDestPath = (String) iterator.next();                                writeRetrieveLocation(saxHandler, artifactDestPath);                            }                            saxHandler.endElement(null, "artifact", "artifact");                        }                    }                    saxHandler.endElement(null, "module", "module");                }                saxHandler.endElement(null, "modules", "modules");                saxHandler.endDocument();            } finally {                fileOuputStream.close();            }        } catch (SAXException e) {            throw new BuildException("impossible to generate report", e);        } catch (TransformerConfigurationException e) {            throw new BuildException("impossible to generate report", e);        } catch (IOException e) {            throw new BuildException("impossible to generate report", e);        }    }