ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niranjan Deshpande" <niranjan8...@gmail.com>
Subject need help in ant's javadoc task (from maven)
Date Fri, 06 Jun 2008 12:54:23 GMT
I am trying to generate a .properties file using javadocs in a java source
file, and i am using ant's <javadoc> task to do this.

but i am getting this error when i run the antrun plugin

generate.appcodes:
  [javadoc] Generating Javadoc
  [javadoc] Javadoc execution
  [javadoc] javadoc: Cannot find doclet class
com.company.app.util.doclet.AppCodesDoclet
  [javadoc] 1 error

Please help. Also can anyone tell me what the <path> and <pathelement>
elements are for? How are the paths relative to?

My ant build file is:


<project name="generate.appcodes" basedir=".." default="all">

 <path id="tools.classpath">
  <pathelement path="build/lib/tools.jar" />
  <pathelement path="lib/xerces.jar" />
  <pathelement path="WebContent/WEB-INF/lib/log4j-1.2.9.jar" />
 </path>

 <target name="all" depends="generate.appcodes"/>

 <target name="generate.appcodes">

  <delete file="src/main/resources/appcodes.properties" />

  <javadoc
sourcefiles="src/main/com/company/app/shared/security/AppCodes.java"
     failonerror="yes">

   <doclet name="com.company.app.util.doclet.AppCodesDoclet"
     path="${tools.classpath}">
    <param name="-outputfile"
value="../src/main/resources/appcodes.properties" />
    <param name="-sourcepath" value="src/main/resources" />
    <param name="-command" value="properties" />
   </doclet>

  </javadoc>

  <mkdir dir="target/WEB-INF/classes/resources" />
  <copy file="src/main/resources/appcodes.properties"
     todir="target/WEB-INF/classes/resources" />

 </target>

</project>




-- 
Regards,
Niranjan Deshpande

"Shut yourself from the world and create the reality you want"

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