Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding classpath dependencies

Status
Not open for further replies.

thanray

Programmer
Sep 12, 2005
1
SE
Hi,

Im trying to compile 6 different sub projects. Basically im calling all the sub projects (where some are depended on some other jar) build file from main build file, with
<ant dir=.. target=.. >
The problem comes when i trying to set classpath using classrefid on the subprojects.
I have a property file, importing this as an xml file and using &property to load it in to the all sub-projects.

I set classpath to all sub projects by this:
<path dir.. id=depend.id>
< pathelement location= >

and using them on <javac .. classpathref="depended.id"

On first project it work well.. but on second build file it cant recognize any class files, even if they are in classpath. (i tried to get get it as stirning )

So even they are in classpath and the jar file includes the necessary class files to compile it WONT WORK..

is there any other solution to set dependencies classpath than using <path> ??
 
I had the same problem. As long as each subproject is in different targets you have to do the path multiple times.

One solution is to have classpath set in build.properties file and use it as a variable. That might solve your problem.

Else have Path in each target and it will work

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top