title: maven-assembly-plugin gives java heap space error
body: <p>Inside a TeamCity build, there is an step to execute a maven-assembly-plugin, after waiting some time (40-50 minutes) it gives java heap space error (see the log):</p>
  
  <pre><code>[15:32:58][com.****:project] [INFO] --- maven-assembly-plugin:2.4:single (make-assembly) @ project ---
  [15:33:01][com.****:project] [INFO] Reading assembly descriptor: assembly.xml
  [16:20:02][com.****:project] [ERROR] Java heap space -&gt; [Help 1]
  </code></pre>
  
  <p>The Teamcity is being executed on a Unix environment. The maven step executes "mvn clean deploy" that works correctly on the development Windows machine.</p>
  
  <p>Already tried to set MAVEN_OPTS to:</p>
  
  <pre><code>MAVEN_OPTS = -Xms256m -Xmx1024m
  MAVEN_OPTS = -Xms512m -Xmx2048m
  </code></pre>
  
  <p>Any clue to solve this?</p>