ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johannes.fi...@fwd.at
Subject Re: Tomcat JSPC Precompile using Ant - unique jsp name problem
Date Mon, 07 Apr 2003 19:35:23 GMT
Hi Steve,

Thx alot for posting your configuration details, unfortunately it hasn't 
worked out yet for me and I have to repost in this issue!
I tried using JSPC now, but it seems that the same problem happens with 
the webapp option activated. It seems the webapp option only helps if 
duplicate names occur in different webapps, not within the same webapp 
(?).

jspc task definition:
====================
<target name="jspc">

    <jspc  compiler="jasper41" destdir="src" uriroot="/jsp"
        webinc="${basedir}/webinc.xml" >
        <classpath id="jspc.classpath">
        <pathelement location="${java.home}/../lib/tools.jar"/>
        <fileset dir="${catalina.home}/server/lib">
          <include name="*.jar"/>
        </fileset>
        <fileset dir="${catalina.home}/common/lib">
          <include name="*.jar"/>
        </fileset>
        <!-- include all JARs in lib-directory -->
        <fileset dir="${build.home}/WEB-INF/lib/">
                <include name="*.jar"/>
        </fileset>

      </classpath>

           <webapp  basedir="jsp" />

    </jspc>

  </target>
====================

and here are my compile results:
====================
    [javac] Compiling 16 source files to 
E:\develop\devapp\forms\build\WEB-INF\classes
    [javac] E:\develop\forms\src\kbgverzicht\final_jsp.java:11: duplicate 
class: org.apache.jsp.final_jsp
    [javac] public class final_jsp extends HttpJspBase {
====================

Since the problem always occurs during compile, maybe should I use 
different compiler options? 
==========================================
<javac srcdir="${src.home}"
          destdir="${build.home}/WEB-INF/classes"
            debug="${compile.debug}"
      deprecation="${compile.deprecation}"
         optimize="${compile.optimize}"
       (I also tried: fork="yes" / include="mypath1" / exclude="mypath2") 
>
==========================================
*) I tried setting fork to "yes", but it didn't help. (since all *.java 
are still compiled together at a time).
*) Using "include="mydir/"" works, but I'd have to specify each directory 
separately and define a separate JSP-Task for this, which would be quite 
inconvenient? 

==>
*) Is there any standard way to loop through all subdirectories and 
compile each subdirectory separately (that would solve the problem)? Or do 
I have to write a custom task for this (which would be a general bugfix of 
the whole problem as it appears to me)?

thx alot
Johannes





"Steve Loughran" <steve_l@iseran.com> 
07.04.2003 08:07
Please respond to
"Ant Users List" <user@ant.apache.org>


To
"Ant Users List" <user@ant.apache.org>
cc

Subject
Re: Tomcat JSPC Precompile using Ant - unique jsp name problem







----- Original Message -----
From: <johannes.fiala@fwd.at>
To: "Ant Users List" <user@ant.apache.org>
Sent: Sunday, April 06, 2003 13:54
Subject: Re: Tomcat JSPC Precompile using Ant - unique jsp name problem


> Hi Steve,
>
> Does the jspc-task also work for compiling JSPs using Jasper (and solve
> the problem of similarly named JSPs)?

no, it has the same bug (which is part of jasper) unless you use the
<webapp> feature

> If yes, could you post a brief sample of your working ant 
taskdefinition?

I already have

> > <jspc destdir="build/jspc" compiler="jasper41" >
> >   <webapp basedir="src/webapp" />
> > </jspc>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message