If JspC is called during an Ant build, relative values for uriRoot are resolved incorrectly if Ant has not been launched from the same directory as the build file. This will also occur if the <ant> task is used to call a sub-project in another directory. This is because uriRoot is resolved against the current working directory rather than the basedir for the Project. Adding a setProject(Project) setter and if set, using project.getBaseDir() to resolve the uriRoot fixes this. Will submit patch.
Created attachment 15570 [details] Patch
My apologies for not noticing this sooner, it also misinterprets outputDir (scratchDir). Similar thing on setOutputDir is needed: public void setOutputDir( String s ) { if( s!= null ) { if( null!=project ) { scratchDir = new File(project.getBaseDir(), s).getAbsoluteFile(); } else { scratchDir = new File(s).getAbsoluteFile(); } } else { scratchDir=null; } } Sorry, I'm no longer set up to create a formal patch for this.
Created attachment 15578 [details] Resolution patch
It's been brought to my attention that Ant already has a mechanism for resolving file paths regardless of the os/filesystem/etc. I've incorporated that and have also made sure that the webXml and webxmlFragment paths are also correctly interpreted.
Hmm, I like this patch and went to implement it, but FileUtils#getFileUtils appears to be gone...
Yeah the old factory method was newFileUtils() which was deprecated in Ant 1.6.3 (pretty recently) by getFileUtils().
OK, done. Thanks for submitting this.