wood burning stoves
The moose likes Ant, Maven and Other Build Tools and the fly likes Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Error" Watch "Error" New topic


Ambika Kumar

Joined: Jan 27, 2006
Posts: 13
I have got the following error and unable to trace it. so, can you please help me to find it.

Source Code:


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

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

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

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


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


Error :

No source files and no packages have been specified.

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

We have a forum devoted to Ant here. I will move this there for you.

[Jess in Action][AskingGoodQuestions]
Carol Enderlin
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
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?
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
<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 ]
I agree. Here's the link: http://aspose.com/file-tools
subject: Error
It's not a secret anymore!