# HG changeset patch # User Jaroslav Tulach # Date 1429513392 -10800 # Node ID 511463a1733d0dc56338c37cf5ccb48b56133e74 # Parent e678bb6beb1f74d5651ff9147ce9372b4b8b1ad9 Regenerate the JS file when it exists, but the original JAR is newer diff -r e678bb6beb1f -r 511463a1733d rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/AheadOfTime.java --- a/rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/AheadOfTime.java Wed Apr 15 17:21:28 2015 +0200 +++ b/rt/mojo/src/main/java/org/apidesign/bck2brwsr/mojo/AheadOfTime.java Mon Apr 20 10:03:12 2015 +0300 @@ -117,7 +117,7 @@ File aot = new File(mainJavaScript.getParent(), classPathPrefix); aot.mkdirs(); File js = new File(aot, n.substring(0, n.length() - 4) + ".js"); - if (js.exists()) { + if (js.lastModified() > a.getFile().lastModified()) { getLog().info("Skipping " + js + " as it already exists."); continue; } @@ -129,7 +129,7 @@ } try { - if (mainJavaScript.exists()) { + if (mainJavaScript.lastModified() > mainJar.lastModified()) { getLog().info("Skipping " + mainJavaScript + " as it already exists."); } else { getLog().info("Generating " + mainJavaScript);