You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Adrien RUFFIE <a....@e-deal.com> on 2013/03/06 16:39:22 UTC

Jasper compilation

Hello All I search to fail following ant task, if an error occurs like this:

[jasper] GRAVE: file:C:/Java/Workspaces/Indigo/webapp/targetwebapp-Head-SNAPSHOT/admin/actor/edit.jsp (line: 487, column: 82) Attribute qualified names must be unique within an element

But the ant task doesn't fail and doesn't warn me of previous problem.

Do you know a means to fail the task at the end, and logger all problem ?

My Ant task was:

<jasper validateXml="false" uriroot="${target.dir}"
                    package="${jspc.pkg.prefix}"
                    webXmlFragment="${target.dir}/WEB-INF/generated_web.xml" outputDir="${target.dir}/WEB-INF/jspc-src"
                    verbose="${verbose}" failonerror="${failonerror}" classdebuginfo="${classdebuginfo}"
                    listerrors="${listerrors}" compilerSourceVM="${compiler.source.vm}"
                    compilerTargetVM="${compiler.target.vm}" />

       </target>

<javac srcdir="${target.dir}/WEB-INF/jspc-src"
                  destdir="${target.dir}/WEB-INF/jspc-src/classes"
                  includes="**/*.java"
                  debug="${debug}"
                  debuglevel="${debuglevel}"
                  deprecation="${deprecation}"
                  encoding="${encoding}"
                  optimize="${optimize}"
                  source="${source.version}"
                 compiler="${build.compiler}"
                 nowarn="${nowarn}" excludes="**/*.smap" >
                    <classpath>
                           <pathelement location="${target.dir}/WEB-INF/classes" />
                           <fileset dir="${target.dir}/WEB-INF/lib">
                                  <include name="*.jar" />
                           </fileset>
                           <pathelement location="${tomcat.home}/lib" />
                           <fileset dir="${tomcat.home}/lib">
                                  <include name="*.jar" />
                           </fileset>
                           <pathelement location="${tomcat.home}/lib-jsp-compilation" />
                           <fileset dir="${tomcat.home}/lib-jsp-compilation">
                                  <include name="*.jar" />
                           </fileset>
                           <fileset dir="${tomcat.home}/bin">
                                  <include name="*.jar" />
                           </fileset>
                           <pathelement location="${java.home}/../lib/tools.jar" />
                    </classpath>
                    <compilerarg line="-Xmaxerrs 5000"/>
                    <compilerarg line="-Xmaxwarns 5000"/>
                    <include name="**" />
                    <exclude name="tags/**" />
             </javac>



Thank all & best regards

Adrien RuffiƩ