• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse: Ant build results in "cannot find symbol"

 
Chad Schultz
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try running Ant with the "-v" option. It might tell you interesting things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic