aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Eclipse: Ant build results in 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 "Eclipse: Ant build results in "cannot find symbol"" Watch "Eclipse: Ant build results in "cannot find symbol"" New topic
Author

Eclipse: Ant build results in "cannot find symbol"

Chad Schultz
Greenhorn

Joined: Mar 25, 2007
Posts: 23
I've been working on a project for a while, but now my ANT build has stopped working. I'm using my company's custom scripts that extend ANT and make use of a Maven POM file. This has worked fine for weeks. It's been a while since I last did an Ant build, so I have no idea what I could have changed to result in this.

I should note that a normal build works just fine; Eclipse itself shows no errors. But when I run the ANT build, I get a number of errors. All of them state the name of the source file and "cannot find symbol." They then state the symbol is a specific class. Every error refers to the same class.

I deleted the JAR from both the project directory and the local repository so it would be forced to pull the most up-to-date company version of the JAR. I've looked at the JAR in Eclipse and opened it to make sure that, yes, it DOES include the right file, and that file DOES include the right class. I've checked to make sure it was on the build path. Does anyone have any ideas?
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2516
    
  10

forced to pull the most up-to-date company version of the JAR
Is it possible that this jar does not exist at the time that your build starts?

When you create a compile classpath from all jar files in a certain folder, and your jar file is not yet there at that moment, it might not be in the compile classpath.



Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Try running Ant with the "-v" option. It might tell you interesting things.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: Eclipse: Ant build results in "cannot find symbol"