return;
}
File domainInfoXML = new File(infoDir, DomainConstants.DOMAIN_INFO_XML);
outputStream = new FileOutputStream(domainInfoXML);
ObjectFactory objFactory = new ObjectFactory();
DomainInfo domainInfo = objFactory.createDomainInfo();
String javaHome = System.getenv(JAVA_HOME);
if (javaHome == null || javaHome.isEmpty()) {
javaHome = System.getProperty("java.home");
}
domainInfo.setJavahome(javaHome);
domainInfo.setMwhome(System.getProperty(SystemPropertyConstants.PRODUCT_ROOT_PROPERTY));
TemplateRef templateRef = new TemplateRef();
templateRef.setName(templateInfo.getName());
templateRef.setVersion(templateInfo.getVersion());
templateRef.setLocation(domainTemplate.getLocation());
domainInfo.setDomainTemplateRef(templateRef);
JAXBContext context = JAXBContext.newInstance(ObjectFactory.class.getPackage().getName());
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_ENCODING, "UTF-8");
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);