wood burning stoves 2.0*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Error" Watch "Error" New topic
Author

Error

Ambika Kumar
Greenhorn

Joined: Jan 27, 2006
Posts: 13
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
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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


[Jess in Action][AskingGoodQuestions]
Carol Enderlin
drifter
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