- This topic has 3 replies, 3 voices, and was last updated 17 years, 6 months ago by Loyal Water.
-
AuthorPosts
-
Walter StovallMemberI exported an Ant build script, and it includes a user-build via the <?eclipse.ant.import?> tag which just overrides the classpath of the exported script so the compiler can find jars in linked folder. When I launch the build script (default target of “build”) the script copies resources to the bin/ folder, starts the compiler, and then runs out of memory. I’ve increased my heap size with -Xmx1024M to no avail. And the heap display in eclipse shows 24M of 84M so that doesn’t seem like the problem anyway. The error message mentions some logged output from the compiler but I don’t know where to find that?
If I put only a few java sources on my source path the compile finishes successfully. The project also compiles correctly when eclipse builds it directly (instead of using the Ant script) but that’s not a solution for me when creating a deliverable set of programs.
Any suggestions?
Console output in eclipse:
Buildfile: D:\byers\EclipseWorkspace\FloridaDOT\ITSFiberMgmt\SpatialAgeCore\build.xml
user-init:
Overriding previous definition of reference to SpatialAgeCore.classpath
clean:
[delete] Deleting directory D:\byers\EclipseWorkspace\FloridaDOT\ITSFiberMgmt\SpatialAgeCore\bin
cleanall:
build-subprojects:
init:
[mkdir] Created dir: D:\byers\EclipseWorkspace\FloridaDOT\ITSFiberMgmt\SpatialAgeCore\bin
[copy] Copying 130 files to D:\byers\EclipseWorkspace\FloridaDOT\ITSFiberMgmt\SpatialAgeCore\bin
build-project:
[echo] SpatialAgeCore: D:\byers\EclipseWorkspace\FloridaDOT\ITSFiberMgmt\SpatialAgeCore\build.xml
[javac] Compiling 2042 source files to D:\byers\EclipseWorkspace\FloridaDOT\ITSFiberMgmt\SpatialAgeCore\bin
[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac] java.lang.OutOfMemoryErrorBUILD FAILED
D:\byers\EclipseWorkspace\FloridaDOT\ITSFiberMgmt\SpatialAgeCore\build.xml:40: Compile failed; see the compiler error output for details.Total time: 13 seconds
Walter StovallMemberUpdate: I’ve found that using fork=”yes”, and memoryMaximumSize=”256m” in the javac tag makes the code compile successfully. But I don’t want to modify the eclipse-generated file. I’d rather do this in my user-build script accessed via <?eclipse.ant.import?>. I thought I could put a “build-project” target in my user-build and have that override what’s in the eclipse-generated file. But apparently there’s something I don’t understand about this because my user-build rule is ignored.
Can you maybe see where I’m going wrong? i.e. is there something more I need to do for my user-build target to take precedence over the eclipse-generated target? Or is there another approach altogether for getting the fork & maximumMemorySize attributes into the javac tag?
I could of course just take over the whole script but for maintenance reasons it would still be nice to have eclipse include referenced projects, subprojects, classpath, etc.
Thanks for any help you might have – Walter
Riyad KallaMemberMoving to OT > Soft Dev
Loyal WaterMemberWhen you run an Ant script, it is considered an “external tool”, you can actually adjust the run-time arguments for the script from that page and give it more memory.
Also something to note is that Ant scripts execute out-of-process from the Eclipse VM, so if you are running out of memory, increasing the heap of MyEclipse won’t help.
-
AuthorPosts