Larry Karnowski wrote:
> All,
> I've disovered the cause of my problems with the Ant build using the
> JspC task. I'm documenting the workaround here for anyone else having
> similar problems.
>
> I thought that the JSP Ant build was successful even though I was seeing
> errors with runtime compilation in Tomcat because Ant was reporting a
> BUILD SUCCESSFUL. However, after checking the generated *.java files, I
> found that the same files that were causing Tomcat to fail were also
> failing in Ant, only quietly. The JspC task was creating zero-length
> Java files that Javac was then quietly ignoring. This is because of two
> problems below:
>
> 1) Apache bug #25452
> ((http://issues.apache.org/bugzilla/show_bug.cgi?id=25452), where the
> Ant build is not notified if there are any JspC compile issues. Instead
> it creates zero-length Java files.
>
> 2) I didn't have my commons-logging-api configured correctly. I
> strongly recommend adding the following to your Java command in your Ant
> shell script to ensure proper error logging during JSP compiles:
>
> -Dorg.apache.commons.logging.Log=
org.apache.commons.logging.impl.SimpleLog > -Dorg.apache.commons.logging.simplelog.defaultlog=info
> -Dorg.apache.commons.logging.simplelog.showdatetime=true
>
> These properties will tell JspC to use the SimpleLog class which sends
> its log messages to stderr. You might still get a BUILD SUCCESSFUL
> report from Ant, but a human can look back through the build output and
> see any error messages. Also, you can do a check for empty Java files.
> (example "find builddir -name \*.java -empty")
>
> I hope this helps, and thanks to R�my for looking!
It's easy to set those properties in the Ant script. I think I'll add them.
The nightly build should have the fix and make the build fail (I didn't
try it though).
--
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
R�my Maucherat
Senior Developer & Consultant
JBoss Group (Europe) S�RL
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)