LOGGER.log(Level.SEVERE, "Error deploying model " +
model.getOriginalURL().toExternalForm(), ex);
}
}
ModuleJarWriter mjw = new ModuleJarWriter();
File[] dirs = tmpDir.listFiles();
if (dirs != null) {
for (File f : dirs) {
if (f.isDirectory()) {
mjw.addDirectory(f);
}
}
}
ModuleInfo mi =
new ModuleInfo(moduleName, 1, 0, 0, descriptionTF.getText());
mjw.setModuleInfo(mi);
try {
if (targetDir == null) {
targetDir = tmpDir.getParentFile();
}
moduleJar = new File(targetDir, moduleName + ".jar");
mjw.writeToJar(moduleJar);
} catch (IOException ex) {
LOGGER.log(Level.SEVERE, null, ex);
} catch (JAXBException ex) {
LOGGER.log(Level.SEVERE, null, ex);
}