@Override public long lastModified() { return jar.lastModified(); }
dot.updateModified(srce.lastModified(), srce + " (" + srce.lastModifiedReason() + ")"); for (Entry<String, Map<String, Resource>> e : srce.getDirectories() .entrySet()) {
@Override public long lastModified() { return jar.lastModified(); }
@Override public long lastModified() { return jar.lastModified(); }
@Override public long lastModified() { return jar.lastModified(); }
@Override public long lastModified() { return jar.lastModified(); }
File source = jar.getSource(); trace("check for modified build=%s file=%s, diff=%s", jar.lastModified(), output.lastModified(), jar.lastModified() - output.lastModified()); if (!output.exists() || output.lastModified() <= jar.lastModified() || force) { File op = output.getParentFile(); if (!op.exists() && !op.mkdirs()) {
File source = jar.getSource(); trace("check for modified build=%s file=%s, diff=%s", jar.lastModified(), output.lastModified(), jar.lastModified() - output.lastModified()); if (!output.exists() || output.lastModified() <= jar.lastModified() || force) { File op = output.getParentFile(); if (!op.exists() && !op.mkdirs()) {
public File saveBuild(Jar jar) throws Exception { try { File f = getOutputFile(jar.getBsn(), jar.getVersion()); String msg = ""; if (!f.exists() || f.lastModified() < jar.lastModified()) { reportNewer(f.lastModified(), jar); f.delete(); File fp = f.getParentFile(); if (!fp.isDirectory()) { if (!fp.exists() && !fp.mkdirs()) { throw new IOException("Could not create directory " + fp); } } jar.write(f); getWorkspace().changedFile(f); } else { msg = "(not modified since " + new Date(f.lastModified()) + ")"; } trace(jar.getName() + " (" + f.getName() + ") " + jar.getResources().size() + " " + msg); return f; } finally { jar.close(); } }
File source = jar.getSource(); logger.debug("check for modified build={} file={}, diff={}", jar.lastModified(), output.lastModified(), jar.lastModified() - output.lastModified()); if (!output.exists() || output.lastModified() <= jar.lastModified() || force) { File op = output.getParentFile(); IO.mkdirs(op);
public File saveBuild(Jar jar) throws Exception { try { String bsn = jar.getName(); File f = getOutputFile(bsn); String msg = ""; if (!f.exists() || f.lastModified() < jar.lastModified()) { reportNewer(f.lastModified(), jar); f.delete(); File fp = f.getParentFile(); if (!fp.isDirectory()) { if (!fp.exists() && !fp.mkdirs()) { throw new IOException("Could not create directory " + fp); } } jar.write(f); getWorkspace().changedFile(f); } else { msg = "(not modified since " + new Date(f.lastModified()) + ")"; } trace(jar.getName() + " (" + f.getName() + ") " + jar.getResources().size() + " " + msg); return f; } finally { jar.close(); } }
File source = jar.getSource(); logger.debug("check for modified build={} file={}, diff={}", jar.lastModified(), output.lastModified(), jar.lastModified() - output.lastModified()); if (!output.exists() || output.lastModified() <= jar.lastModified() || force) { File op = output.getParentFile(); IO.mkdirs(op);
public File saveBuild(Jar jar) throws Exception { try { File f = getOutputFile(jar.getBsn(), jar.getVersion()); String msg = ""; if (!f.exists() || f.lastModified() < jar.lastModified()) { reportNewer(f.lastModified(), jar); f.delete(); File fp = f.getParentFile(); if (!fp.isDirectory()) { if (!fp.exists() && !fp.mkdirs()) { throw new IOException("Could not create directory " + fp); } } jar.write(f); getWorkspace().changedFile(f); } else { msg = "(not modified since " + new Date(f.lastModified()) + ")"; } trace(jar.getName() + " (" + f.getName() + ") " + jar.getResources().size() + " " + msg); return f; } finally { jar.close(); } }
public void addClasspath(Jar jar) { if (isPedantic() && jar.getResources() .isEmpty()) warning("There is an empty jar or directory on the classpath: %s", jar.getName()); addClose(jar); classpath.add(jar); updateModified(jar.lastModified(), jar.toString()); }
public void addClasspath(Jar jar) { if (isPedantic() && jar.getResources() .isEmpty()) warning("There is an empty jar or directory on the classpath: %s", jar.getName()); addClose(jar); classpath.add(jar); updateModified(jar.lastModified(), jar.toString()); }
/** * Get the manifest and write it out separately if -savemanifest is set * * @param dot */ private void doSaveManifest(Jar dot) throws Exception { String output = getProperty(SAVEMANIFEST); if (output == null) return; File f = getFile(output); if (f.isDirectory()) { f = new File(f, "MANIFEST.MF"); } if (!f.exists() || f.lastModified() < dot.lastModified()) { IO.delete(f); File fp = f.getParentFile(); IO.mkdirs(fp); try (OutputStream out = IO.outputStream(f)) { Jar.writeManifest(dot.getManifest(), out); } changedFile(f); } }
/** * Get the manifest and write it out separately if -savemanifest is set * * @param dot */ private void doSaveManifest(Jar dot) throws Exception { String output = getProperty(SAVEMANIFEST); if (output == null) return; File f = getFile(output); if (f.isDirectory()) { f = new File(f, "MANIFEST.MF"); } if (!f.exists() || f.lastModified() < dot.lastModified()) { IO.delete(f); File fp = f.getParentFile(); IO.mkdirs(fp); try (OutputStream out = IO.outputStream(f)) { Jar.writeManifest(dot.getManifest(), out); } changedFile(f); } }
try (Resource resource = Resource.fromURL(url, getPlugin(HttpClient.class))) { Jar jar = Jar.fromResource(fileName(url.getPath()), resource); if (jar.lastModified() <= 0L) {
try (Resource resource = Resource.fromURL(url, getPlugin(HttpClient.class))) { Jar jar = Jar.fromResource(fileName(url.getPath()), resource); if (jar.lastModified() <= 0L) {
private static Tag getTagFrom(String name, Jar jar) throws Exception { Tag tag = new Tag(name); tag.addAttribute("bsn", jar.getBsn()); tag.addAttribute("name", jar.getName()); tag.addAttribute("version", jar.getVersion()); tag.addAttribute("lastmodified", jar.lastModified()); return tag; }