StringBuffer sb = new StringBuffer();
//sb.append("-jar ");
//sb.append(m_closureJar.getAbsolutePath() + " ");
ResourceCollection c = getResources();
Iterator i = c.iterator();
long lastMod = -1;
while (i.hasNext()) {
lastMod = Math.max(lastMod, ((FileResource) i.next()).getLastModified());
}
sb.append("--js_output_file ");
sb.append(m_destinationFile.getAbsolutePath() + " ");
if (m_destinationFile.lastModified() >= lastMod) {
/*
* If the generated file is newer than the source
* files then there is no need to rebuild.
*/
return;
}
i = c.iterator();
while (i.hasNext()) {
sb.append("--js ");
sb.append(i.next() + " ");
}