Dependency issue using Ant from the shell

I am having trouble building my project using an Ant script from the command line using Ant.

It cannot find a specific import for a specific Java file in my project (which has almost 5000 source files as it is). The import is included in the .jar package, the location of which I set in the Ant file itself. (As a patch, along with other required JARs that are either good or not trying to be used when it fails). It crashes with javac, with a simple message "import etc.ect. * Cannot be found on line etc."

Oddly enough, I can just build the project from the Ant file using an IDE like Eclipse. Any ideas what could be wrong? Thanks!

0


a source to share


3 answers


Wow, the solution was completely unrelated. It was a silly mistake in java code where the class was trying to import. * From a directory containing only folders. For some reason, Eclipse didn't seem to mind, but javac did!



+2


a source


The Eclipse rootloader contains many classes, when you run ant from the console there is much less.



Just tell the javac task to use the required .jar and you should be fine.

0


a source


Should you post a stack trace, say "import required ..."? (I forgot the exact text). There is probably a jar in your eclipse environment that is not included in your ant script. Look in the stack trace for the missing class to identify the jar that is not included in your assembly.

0


a source







All Articles