[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Compiling Servlets
|
I have written a build.xml file which needs to compile servlets. But iajc
compiler cannot find servlet package. I am using JBoss with tomcat.
I have written my build file using guidelines from the document included with
the aspect1.1.
first of all I define the taskdef as follows:
<taskdef
resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
<classpath>
<pathelement location="${aspect.dir}/lib/aspectjtools.jar"/>
</classpath>
</taskdef>
Then I include different paths:
<path id="base.path_22">
<--! servlet jar files included from jboss -->
<pathelement location="${aspect.dir}/lib/aspectjrt.jar"/>
<pathelement location="${aspect.dir}/lib/aspectjtools.jar"/>
</path>
${classpath} = holds all the pathelements and is used below:
<target name="compile" depends="init, ejbdoclet, webdoclet" >
<mkdir dir="${build.classes.dir}"/>
<iajc
destdir="${build.classes.dir}"
debug="on"
deprecation="on"
>
<src path="${build.gen-src.dir}"/>
<src path="${build.src.dir}/main"/>
<src path="${build.src.dir}/servlet"/>
<classpath path="${classpath}" />
</iajc>
</target>
The above can compile all the java files (e.g.EJBs) but cannot compile
servlets. But I have included servlet jar files in the <path> element.
Any idea what I may be missing?
regards