简体   繁体   中英

Javadoc With Ant

I try to generate my javadoc with ant. My javadoc.xml :

<?xml version="1.0"?>

<project default="main" basedir=".">
 <target name="main" >
    <javadoc packagenames="com.prosodie.volta.*"
           sourcepath="../src"
           defaultexcludes="yes"
           destdir="docs/api"
           author="true"
           version="true"
           use="true"
           windowtitle="Test API">
    </javadoc>
  </target>
</project>

When i run it i get a

...\\workspace\\volta2\\volta-rest-webservices\\ant\\javadoc.xml:14: No source files and no packages have been specified. <

I don't understand why, as i specified the src dir and packages.. My structure :

project

  ant
    javadoc.xml
  src
    main
      java
        com
          prosodie
            volta
              ...

Change your sourcepath from:

 sourcepath="../src"

To

sourcepath="../src/main/java"

As your package is within that particular folder and not in src.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM