Montag, 17. Oktober 2011

Chaining your ant build files - common build problems


This is a small collection of problems that might appear for the first time, when you start to chain your build files to build up the magic button: build all projects and create deployable.

Example how to build the top-level-chain:

 
 
   
  Calling ant build for client module core... 
  
  
  ...
  
  Calling ant build for the client application... 
  
  
  Calling ant build for the server... 
  
  
 




Heap space problems

Error:
Not enought heap space
    [mxmlc] Fehler: Java heap space

Solution:
Add the jvmargs for heap adjustment to the mxmlc-Task and set fork to true. Example:
<mxmlc ...="" fork="yes" jvmargs="-Xms512m -Xmx512m">




Accidently forked?
Error:
BUILD FAILED
java.io.IOException: Cannot run program "javac.exe"
...
... build.xml:41: Error running javac.exe compiler
... org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:508)

Solution
<javac ...="" fork="false">


Forgot to fork?
Error:
...\build.xml:13: compc task failed
Solution:
<compc ...="" fork="yes">

Problems with flex-config.xml
Error:
[mxmlc] command line: Fehler: „flex-config.xml“ konnte nicht geöffnet werden
...\build.xml:47: mxmlc task failed
Solution:
<mxmlc ...="" fork="yes"></mxmlc></compc></javac></mxmlc>




Keine Kommentare:

Kommentar veröffentlichen