ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russ Baker <rba...@NETdelivery.com>
Subject RE: Package javax.servlet.http not found in import
Date Mon, 04 Jun 2001 16:33:42 GMT
Pinar,

The reason why you are getting that error message is because of this
directive:

packagenames="d:\ap20\java\struts.jar"

you should be using package names, not the name of the jar.  I don't have
struts on my machine, but for Tomcat, the package names are usually
org.apache.*, that is what the directive is looking for.  You should go to
this page and read about what Ant is looking for:

http://jakarta.apache.org/ant/manual/CoreTasks/javadoc.html

-Russ

-----Original Message-----
From: Pinar Bicioglu [mailto:pinarbici@hotmail.com]
Sent: Monday, June 04, 2001 10:26 AM
To: ant-user@jakarta.apache.org
Subject: RE: Package javax.servlet.http not found in import


Russ,

I'm using Tomcat. So servlet.jar file is in 
"D:\Tomcat\jakarta-tomcat-3.2.2b3\lib" along with ant.jar, jasper.jar. 
jaxp.jar. parser.jar. servlet.jar, webserver.jar.
I set my classpath to d:\Tomcat\jakarta-tomcat-3.2.2b3\lib\servlet.jar by 
going start->settings->controlpanel->sytems
And when I check the classpath on Dos window it's seen that classpath has 
been set to "D:\Tomcat\jakarta-tomcat-3.2.2b3\lib"

And I have the following code in my build.xml file.

<property name="dist" value="d:\ap20\java" />
<property name="build" value="d:\ap20\java\org\apache\struts\form"/>

<target name="packages" depends="compile">
<jar jarfile="${dist}/struts.jar"
     basedir="${build}"
    includes="**/*.class" />
   </target>

    <target name="javadoc" depends="packages,compile">
        <javadoc sourcepath="d:\ap20\java"
          packagenames="d:\ap20\java\struts.jar"
          destdir="${javadoc.home}"
          classpath="D:\Tomcat\jakarta-tomcat-3.2.2b3\lib\servlet.jar"
          author="true"
          version="true"
          use="true"
          windowtitle="${app.name} ${version} API"
          doctitle="${app.name}"/>
     </target>

And I am getting the following error message :

D:\ap20>ant javadoc
Buildfile: build.xml

prepare:

compile:

packages:

javadoc:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] Loading source file d:\ap20\java\struts.jar...
  [javadoc] d:\ap20\java\struts.jar: Class or interface declaration 
expected.
  [javadoc] 1 error

BUILD SUCCESSFUL

Total time: 4 seconds

Any ideas ??



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Mime
View raw message