}
}
/*
* (run)
*/
Services beans = new Services(src,"gap.data.BigTable");
if (!beans.dropTouch()){
if (!beans.getParentFile().isDirectory()){
System.err.println("Error, parent directory not found: '"+beans.getName()+"'.");
System.exit(1);
return;
}
else {
System.err.println("Error, file not writeable: '"+beans.getName()+"'.");
System.exit(1);
return;
}
}
Services servlets = new Services(src,"gap.service.Servlet");
if (!servlets.dropTouch()){
if (!servlets.getParentFile().isDirectory()){
System.err.println("Error, parent directory not found: '"+servlets.getName()+"'.");
System.exit(1);
return;
}
else {
System.err.println("Error, file not writeable: '"+servlets.getName()+"'.");
System.exit(1);
return;
}
}
int rc = 0;
try {
System.out.println("Source: "+odl.getPath());
System.out.println("Target: "+src.getPath());
lxl.List<File> products = Main.ProcessDirectories(odl,src,beans,servlets);
for (File product : products){
System.out.println("Product: "+product.getPath());
}
/*
*/
try {
File webXml = Main.ProcessServlets(servlets);
System.out.println("Product: "+webXml.getPath());
}
catch (TemplateException exc){
exc.printStackTrace();
}
catch (java.io.FileNotFoundException ignore){
}
/*
*/
if (!servlets.write()){
System.err.println("Error, services write error: '"+servlets.getResource().getPath()+"'.");
rc = 1;
}
else
System.out.println("Product: "+servlets.getName());
if (!beans.write()){
System.err.println("Error, services write error: '"+beans.getResource().getPath()+"'.");
rc = 1;
}