Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Trying to invoke javadoc tag within Ant problem.

 
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there,

In my build.xml file, this is the code snippet for my <javadoc> target:



The property variables (such as ${src.dir}) are specified in a build.properties file that looks like this:



This is the output when I run it from the command line:



I didn't think it was so hard just to generate javadoc using Ant, apparently there something that I am doing wrong....

I would appreciate any suggestions....

Thanks again and Happy Holidays,
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Run the script with -verbose or -debug.

My first guess is that the specified source dir doesn't exist or is empty.
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The specified source directory does exist... That's how I can achieve creating an executable jar from the "deploy" ant target.

Under my {src.dir}, do I have to follow the packaging conventions that I place for package at the top of my src files? I didn't think that this was necessary...

This is what I am trying to convey...

if you have a file called, HelloWorld.java and inside it you have the code:

package org.untz;

Should the {src.dir} structure look like this:

src
|
---
org
|
---
|
untz
|
--
HelloWorld.java

I didn't think that I needed to do this, because when you compile it with the -d argument, doesn't it make the <org> and <untz> directories for me?

Yes, I don't understand what I am not getting correct with my JavaDoc tag...

Can anyone put this in their own sample code and see if they can get it working?

Thanks again!

Happy Holidays!

Peace to all!
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I'm sure that's what your source directory should look like. I don't understand why the -d option of the compiler should have anything to do with it, though, so I might be missing something.
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't quite understand what you were trying to convey...

Do I need to put sub-directories under 'src' that follow my package's structure? What exactly am I doing wrong with this javadoc target?

Lots of thanks!

-Unnsse M. Khan
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Unnsse Khan:

Do I need to put sub-directories under 'src' that follow my package's structure?



Yes.

Does that solve your problem?
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ilja,

I created the directory structure, in order, to have it correlate with the package scheme specified in the source files.

That I don't believe fixed the problem, what fixed the problem was including the <packageset> tag in the Ant target:



Also, I didn't have the <sourcepath> listed as an attribute for the <javadoc> tag, I had it nested in the <classpath>. Well, it works now!

Happy Holidays!

See you next year,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic