• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issues with setting classpath in Ant BuildScript

 
Ranch Hand
Posts: 100
Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have some issues in setting the classpath for the a project for which Im trying to create a jar using the Ant build script. For eg: Consider a project A in the workspace. This project has internal dependencies with other projects in the workspace. There are project B, C, D in my workspace, which are added to the build path of the Project A. I have the below compile script in the build.xml. When I try to execute the script, the compile does not seem to happen, due to issues with classpath. Please find the code below.



When I try to execute the script, I get the error at this line '<javac srcdir="../A/src" destdir="${Classfiles}" />' saying that compilation fails. Require help in setting the classpath in the buildscript. Thanks in Advance
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should reference the bin directory, not the src directory, in the classpath (assuming you kept the default location for the compiled files), example:



Also, you have to make sure that the projects B, C and D are compiled before you can run the build for A. (You might need a master script that builds the projects in the correct order.)
 
reply
    Bookmark Topic Watch Topic
  • New Topic