dcsimg
How to force Ant to compile denpendant classes that are not yet compiled.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   S_B
Posted On:   Tuesday, February 3, 2004 08:03 AM

I'm having a problem where the compilation task fails whenever a class is being compiled which requires any method, attribute, constant, etc from a different class outside of the current package. If it happens to be a class in the same package it works fine. I can't get around this issue. I have cheated it by taking the successfully compiled classes in a jar file created by WebSphere and added that to my classpath and it worked. However, this is not a solution since when doing each build with Ant a jar with the classes will not exist to begin with. I just did it as a test. Can someone PLEASE offer a way to get around this? Also, originally I told Ant to start compiling from the root of the source code - thinking it would compile each outter dependency as it needed    More>>

I'm having a problem where the compilation task fails whenever a class is being compiled which requires any method, attribute, constant, etc from a different class outside of the current package. If it happens to be a class in the same package it works fine. I can't get around this issue. I have cheated it by taking the successfully compiled classes in a jar file created by WebSphere and added that to my classpath and it worked. However, this is not a solution since when doing each build with Ant a jar with the classes will not exist to begin with. I just did it as a test. Can someone PLEASE offer a way to get around this? Also, originally I told Ant to start compiling from the root of the source code - thinking it would compile each outter dependency as it needed it. And the usual error I'm receiving when this happens is the "can't resolve symbol" error for the outside method/attribute being referenced in the class being compiled.

Thanks in advance!!

   <<Less

Re: How to force Ant to compile denpendant classes that are not yet compiled.

Posted By:   Andy_Kovtun  
Posted On:   Thursday, February 5, 2004 06:48 PM

SB,

Could it be that depending class' source resides in a different sourcetree? in that case you must add its sourcetree root into your task's sourcepath.

Well, and anyway it would be useful to run ant with -d to see what parameters does the javac receive, sometimes it could be helpful.





-andy
About | Sitemap | Contact