maven fork a new jvm to run scalac (by default) so MAVEN_OPTS is not used to
launch scalac you need to define the  (like David P said)
        <configuration>
          <jvmArgs>
            <jvmArg>-Xmx1024m</jvmArg>
          </jvmArgs>

if you want to customize the jvm args

/davidB

On Tue, Jun 9, 2009 at 17:45, Kevin Wright <[email protected]>wrote:

> It might be permgen space, I'm currently using:
>
> MAVEN_OPTS=-Xms1024m -Xmx1024m -XX:MaxPermSize=256m
> -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC
>
> *-Xms1024m -Xmx1024m* set the min and max the same, so no dynamic
> reallocation will happen, should be faster :)
> *-XX:MaxPermSize=256m* sets the size of the permenant generation, you
> usually need this if you have a large heap
> *-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC* enables the G1 garbage
> collector (this need the LATEST java update), which seems to be a bit
> faster.
>
>
> On Tue, Jun 9, 2009 at 4:14 PM, [email protected] <
> [email protected]> wrote:
>
>>
>> Hi :
>>
>>   When my project grows, it seems a mvn clean following a mvn test
>> would generally causes OutOfMemoryException, even with a set
>> MAVEN_OPTS=-Xms512M -Xmx1024M.
>> I got this error :
>>
>> [WARNING] Exception in thread "main" java.lang.OutOfMemoryError: Java
>> heap space
>>
>> [WARNING]       at scala.StringBuilder$.scala$StringBuilder$$copyOf
>> (StringBuilde
>> r.scala:867)
>> [WARNING]       at scala.StringBuilder.expandCapacity
>> (StringBuilder.scala:112)
>> [WARNING]       at scala.StringBuilder.append(StringBuilder.scala:246)
>> [WARNING]       at scala.StringBuilder.append(StringBuilder.scala:234)
>> [WARNING]       at scala.tools.nsc.symtab.Symbols$Symbol.fullNameString
>> (Symbols.
>> scala:1241)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM
>> $BytecodeGenerator.javaName
>> (GenJVM.scala:1583)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator
>> $$anonfun
>> $genBlock$1$1.apply(GenJVM.scala:971)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator
>> $$anonfun
>> $genBlock$1$1.apply(GenJVM.scala:868)
>> [WARNING]       at scala.Iterator$class.foreach(Iterator.scala:414)
>> [WARNING]       at scala.runtime.BoxedArray$AnyIterator.foreach
>> (BoxedArray.scala
>> :45)
>> [WARNING]       at scala.Iterable$class.foreach(Iterable.scala:256)
>> [WARNING]       at scala.runtime.BoxedArray.foreach(BoxedArray.scala:
>> 24)
>> [WARNING]       at scala.tools.nsc.backend.icode.BasicBlocks
>> $BasicBlock.foreach(
>> BasicBlocks.scala:130)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM
>> $BytecodeGenerator.genBlock
>> $1(GenJVM.scala:868)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM
>> $BytecodeGenerator.genBlock
>> s$1(GenJVM.scala:791)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM
>> $BytecodeGenerator.genCode(
>> GenJVM.scala:1415)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM
>> $BytecodeGenerator.genMetho
>> d(GenJVM.scala:594)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator
>> $$anonfun
>> $genClass$4.apply(GenJVM.scala:216)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator
>> $$anonfun
>> $genClass$4.apply(GenJVM.scala:216)
>> [WARNING]       at scala.List.foreach(List.scala:841)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM
>> $BytecodeGenerator.genClass
>> (GenJVM.scala:216)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun
>> $run$2.ap
>> ply(GenJVM.scala:55)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun
>> $run$2.ap
>> ply(GenJVM.scala:55)
>> [WARNING]       at scala.Iterator$class.foreach(Iterator.scala:414)
>> [WARNING]       at scala.collection.Map$$anon$6.foreach(Map.scala:123)
>> [WARNING]       at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase.run
>> (GenJVM.scala:
>> 55)
>> [WARNING]       at scala.tools.nsc.Global$Run.compileSources
>> (Global.scala:574)
>> [WARNING]       at scala.tools.nsc.Global$Run.compile(Global.scala:
>> 667)
>> [WARNING]       at scala.tools.nsc.Main$.process(Main.scala:73)
>> [WARNING]       at scala.tools.nsc.Main$.main(Main.scala:87)
>> [WARNING]       at scala.tools.nsc.Main.main(Main.scala)
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] BUILD FAILURE
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] command line returned non-zero value:1
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 1 minute 4 seconds
>> [INFO] Finished at: Tue Jun 09 23:10:56 CST 2009
>> [INFO] Final Memory: 16M/508M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to