output.getParentFile().mkdirs();
}
PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(output), "UTF-8"));
try {
IvySettings settings = IvyContext.getContext().getSettings();
IvyVariableContainer variables = new IvyVariableContainerWrapper(settings.getVariableContainer());
variables.setVariable("ivy.pom.license", SKIP_LINE, true);
variables.setVariable("ivy.pom.header", SKIP_LINE, true);
variables.setVariable("ivy.pom.groupId", SKIP_LINE, true);
variables.setVariable("ivy.pom.artifactId", SKIP_LINE, true);
variables.setVariable("ivy.pom.version", SKIP_LINE, true);
variables.setVariable("ivy.pom.packaging", SKIP_LINE, true);
variables.setVariable("ivy.pom.name", SKIP_LINE, true);
variables.setVariable("ivy.pom.description", SKIP_LINE, true);
variables.setVariable("ivy.pom.url", SKIP_LINE, true);
if (options.getLicenseHeader() != null) {
variables.setVariable("ivy.pom.license", options.getLicenseHeader(), true);
}
if (options.isPrintIvyInfo()) {
String header = "<!--\n"
+ " Apache Maven 2 POM generated by Apache Ivy\n"
+ " " + Ivy.getIvyHomeURL() + "\n"
+ " Apache Ivy version: " + Ivy.getIvyVersion()
+ " " + Ivy.getIvyDate() + "\n"
+ "-->";
variables.setVariable("ivy.pom.header", header, true);
}
setModuleVariables(md, variables, options);
boolean dependenciesPrinted = false;