• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai..
I have got the following error and unable to trace it. so, can you please help me to find it.

Source Code:


<project>

<target name="clean">
<delete dir="build"/>
</target>

<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="D:\AnT" destdir="build/classes"/>
</target>

<target name="jar">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/Hello.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="Hello"/>
</manifest>
</jar>
</target>

<target name="javadoc">
<mkdir dir="build/javadoc"/>
<javadoc sourcepath="D:\AnT\Hello.java" destdir="build/javadoc" >

</javadoc>
</target>

<target name="run">
<java jar="build/jar/Hello.jar" fork="true"/>
</target>

</project>



Error :

No source files and no packages have been specified.



thanks
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a forum devoted to Ant here. I will move this there for you.
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you provide more details (see TellTheDetails)?

What target were you running (your project as shown in the post doesn't have a default target)? Did you try googling the error? The hits I got make it sound like the error is from the javadoc target.

Is that all the output it generated?

Did you try running with -v to get verbose output?

What versions of ant/java?
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<javac srcdir="D:\AnT" destdir="build/classes"/>

Are you put your src file under D:\AnT??

Not a good idea!

A suggested directory structure


[ January 29, 2006: Message edited by: Roseanne Zhang ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic