The deprecation of Nashorn by Oracle has posed a challenge for my Apache Ant build scripts, where I heavily rely on it.
Below is a brief example of my usage:
try{load("nashorn:mozilla_compat.js");}catch(e){;}
importClass(java.io.File);
var sourceName = project.getProperty("build.source.dir") + "/" +project.getProperty("teiFile") + ".xml";
var targetName = project.getProperty("build.search.dir") + "/" + project.getProperty("teiFile") + ".xml";
var sourceFile = new File("", sourceName);
var targetFile = new File("", targetName);
var uptodate = targetFile.exists() && sourceFile.lastModified() < targetFile.lastModified();
var sourcePrefix = project.getProperty("teiFile");
if(!uptodate & !sourcePrefix.startsWith("G")) {
......
}
}
I have come across suggestions to use Rhino or GraalVM as alternatives, but both come with their own set of drawbacks. Any recommendations for an active and stable library would be greatly appreciated.
Thanks, Scott