aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant 1.7 compilation problem with Java 5 Features 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 "Ant 1.7 compilation problem with Java 5 Features" Watch "Ant 1.7 compilation problem with Java 5 Features" New topic
Author

Ant 1.7 compilation problem with Java 5 Features

Lisa Ray
Greenhorn

Joined: Mar 05, 2009
Posts: 22
Hi All,
I'm facing a strange issue while compiling an app which uses Java 5 annotations. I'm tried with JDK 5 and JDK 6 and Apacha Ant 1.7. I get the following error while executing ant either from Eclipse or command line.



My ANT_HOME is set to C:\Tools\apache-ant-1.7.1
JAVA_HOME is set to C:\Program Files\Java\jdk1.5.0_09

Further, I tried using the following options with the javac task:




Any help shall be highly appreciated.

Thanks
Lisa
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

I don't think that has anything to do with compiling Java source files - the error message is comping from the attribute-compiler task, not from the javac task. Could you post the attribute-compiler task?


JBoss In Action
Lisa Ray
Greenhorn

Joined: Mar 05, 2009
Posts: 22
Hi Peter,
Thanks for posting.

JavaRanch rocks!

I had to make two changes to get it working:

1. Add qdox 1.6 JAR to ANT
2. Tweak the attribute compiler task:


Thanks
Lisa

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant 1.7 compilation problem with Java 5 Features