Hi Martijn

On Sun, 2006-09-10 at 16:09 +0200, Martijn Dashorst wrote:
> Probably the defaults for your jvm are too low. You can (read: should
> be able to) increase the memory available for your Java runtime
> environment by setting the following (assuming you use bash as a
> shell):
> 
> export JAVA_OPTS=-Xmx512m
> 
> This should give you enough memory for maven to run in.

Thank you for your answer. I tried setting it like this, but this did
not work, maybe because of this here:

[WARNING] Failed to initialize environment variable resolver. Skipping
environment substitution in settings.

So i changed it directly in the file /usr/local/maven/bin/mvn, by
changing

exec "$JAVACMD" \
  $MAVEN_OPTS \
  -classpath "${M2_HOME}"/core/boot/classworlds-*.jar \
  "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
  "-Dmaven.home=${M2_HOME}"  \
  ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS

to

exec "$JAVACMD" -Xmx512m \
  $MAVEN_OPTS \
  -classpath "${M2_HOME}"/core/boot/classworlds-*.jar \
  "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
  "-Dmaven.home=${M2_HOME}"  \
  ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS

Now mvn is starting, but it really seems like I don't have enough
memory:

[EMAIL PROTECTED]:~/modules/sudokusolver$ mvn package
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Sudoku Solver
[INFO]    task-segment: [package]
[INFO]
----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Surefire report
directory: /home/autobuild/modules/sudokusolver/target/surefire-reports
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] unable to create new native thread
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.OutOfMemoryError: unable to create new native thread

So I tried it with -Xmx32m as my provider told me to do so, but then I
get:

[INFO] [surefire:test]
[INFO] Surefire report
directory: /home/autobuild/modules/sudokusolver/target/surefire-reports
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------

I think the surefire-report does not get the -Xmx32m argument?

Do you have another hint for me how I could fix this?

Thank you

Elias




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to