Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set the sourcepath for classes in ant-project

 
Andy Jung
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When using Roel's great ant-project in order to generate the javadocs I encounter the following problem:
documentation using annotation @Override and {@inheritDoc} is not performed when applied to subclasses
of classes that don't origin in my own project.
For this to happen I have to include these foreign sources to the sourcepath property.
How can I do this (including the sources of Sun's standard API)?
How to extend the following ant-property dir.source in order to have the sourcepath-variable properly set?



Kind regards,
Andy
 
Roel De Nijs
Sheriff
Posts: 9828
103
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For this to happen I have to include these foreign sources to the sourcepath property.
Which foreign sources are you talking about? You should reference nothin more than classes from the latest SDK.
 
Andy Jung
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:You should reference nothin more than classes from the latest SDK.

And thats exactly what I actually want to do (foreign = not my classes in my own project = latest SDK).

But that's the problem, only my classes can be referenced correctly not the ones in the latest SDK.
But as said before this is only the case when using @Override and {@inheritDoc}.
 
Roel De Nijs
Sheriff
Posts: 9828
103
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I use my own Ant build script javadoc is automatically generated for classes from the latest SDK.

For example this code (from 1 of my classes):

results in the following javadoc:
hashCode

public int hashCode()

Overrides:
hashCode in class Object


Kind regards,
Roel
 
Andy Jung
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this is because you use the Eclipse-IDE ?
At work I use this too and I don't have problems with this either.
For the assignment I use NetBeans IDE and get those problems.
But actually I thought this is a matter of the doclet and not a matter of the IDE?

But anyways, thanks for the great ant-script you provided, it probably saved me a lot of time and maybe life, we'll see

 
Roel De Nijs
Sheriff
Posts: 9828
103
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andy Jung wrote:I think this is because you use the Eclipse-IDE ?
That's the one I use, simply the best!
 
Dick Smith
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran the ANT script via Eclipse. Eclipse lets you configure ANT. Hope this helps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic