You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ben Siemon <be...@opower.com> on 2013/07/20 06:37:44 UTC
ForkedBooter in 2.2.1 does not honor MAVEN_OPTS
Specifically I have -Djava.awt.headless=true set in my maven options. Other
surefire booters seem to honor the headless mode and not steal focus but
the ForkedBooter still steals focus even when headless is set to true in
MAVEN_OPTS.
Running jps -v yields this view of the two maven jvms started:
Parent Maven with the correct MAVNE_OPTS
29028 Launcher -Xms2048m -Xmx4096m -XX:PermSize=1024m -XX:MaxPermSize=2048m
-Djava.awt.headless=true
-Dclassworlds.conf=/usr/local/apache-maven//bin/m2.conf
-Dmaven.home=/usr/local/apache-maven/
ForkedBooter without the maven opts. This process steals my screen each
time it runs.
29033 surefirebooter3016997434240550753.jar -XX:+HeapDumpOnOutOfMemoryError
-Xmx512M -XX:MaxPermSize=128M
maven version:
Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
Java version: 1.6.0_51
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.8.4" arch: "x86_64" Family: "mac"
Upgrading from this version is not currently possible.
I am not sure why mvn is now using this forked booter in place of the
earlier one that honored MAVEN_OPTS. It might be that upstream changes in
parent artifacts are forcing me to run the ForkedBooter instead.
Thanks for any help you can offer.
--
*Ben Siemon*
Senior Software Engineer, Engineering
*Opower* <http://www.opower.com>
We’re hiring! See jobs here <http://www.opower.com/careers>.
Re: ForkedBooter in 2.2.1 does not honor MAVEN_OPTS
Posted by Ben Siemon <be...@opower.com>.
Thanks for the help. I considered using the argLine param. Reading the docs
it seemed like that would mean setting it globally for all users in the
pom.xml. I ended up just doing
#!/bin/bash
(export _JAVA_OPTIONS=-Djava.awt.headless=true &&
/usr/local/apache-maven/bin/mvn $@)
to set it for all java processes started in that sub shell. Again, thanks
for the help!
On Mon, Jul 22, 2013 at 1:57 AM, Vincent Latombe
<vi...@gmail.com>wrote:
> Hello,
>
> This is the JVM forked to execute unit tests (through
> maven-surefire-plugin). Check [1] to set options for that jvm.
>
> [1]
>
> http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#argLine
>
> Vincent
>
>
> 2013/7/20 Ben Siemon <be...@opower.com>
>
> > Specifically I have -Djava.awt.headless=true set in my maven options.
> Other
> > surefire booters seem to honor the headless mode and not steal focus but
> > the ForkedBooter still steals focus even when headless is set to true in
> > MAVEN_OPTS.
> >
> > Running jps -v yields this view of the two maven jvms started:
> >
> > Parent Maven with the correct MAVNE_OPTS
> > 29028 Launcher -Xms2048m -Xmx4096m -XX:PermSize=1024m
> -XX:MaxPermSize=2048m
> > -Djava.awt.headless=true
> > -Dclassworlds.conf=/usr/local/apache-maven//bin/m2.conf
> > -Dmaven.home=/usr/local/apache-maven/
> >
> >
> > ForkedBooter without the maven opts. This process steals my screen each
> > time it runs.
> > 29033 surefirebooter3016997434240550753.jar
> -XX:+HeapDumpOnOutOfMemoryError
> > -Xmx512M -XX:MaxPermSize=128M
> >
> > maven version:
> >
> > Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
> > Java version: 1.6.0_51
> > Java home:
> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> > Default locale: en_US, platform encoding: MacRoman
> > OS name: "mac os x" version: "10.8.4" arch: "x86_64" Family: "mac"
> >
> > Upgrading from this version is not currently possible.
> >
> > I am not sure why mvn is now using this forked booter in place of the
> > earlier one that honored MAVEN_OPTS. It might be that upstream changes in
> > parent artifacts are forcing me to run the ForkedBooter instead.
> >
> > Thanks for any help you can offer.
> >
> > --
> > *Ben Siemon*
> > Senior Software Engineer, Engineering
> > *Opower* <http://www.opower.com>
> >
> > We’re hiring! See jobs here <http://www.opower.com/careers>.
> >
>
--
*Ben Siemon*
Senior Software Engineer, Engineering
*Opower* <http://www.opower.com>
We’re hiring! See jobs here <http://www.opower.com/careers>.
RE: ForkedBooter in 2.2.1 does not honor MAVEN_OPTS
Posted by Baptiste Mathus <bm...@batmat.net>.
Yes, it does not isolate your tests from your main maven build. So if for
example your tests require too much memory, the OOME will kill the whole
maven build.
BTW, as maven 2.x is in the title, you should be aware it's now
deprecated/end of life.
Cheers
Le 25 avr. 2014 03:22, "victropolis" <vi...@gmail.com> a écrit :
>
> Is there any downside to using <forkMode>never</forkMode>?
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/ForkedBooter-in-2-2-1-does-not-honor-MAVEN-OPTS-tp5764410p5791911.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
RE: ForkedBooter in 2.2.1 does not honor MAVEN_OPTS
Posted by victropolis <vi...@gmail.com>.
Is there any downside to using <forkMode>never</forkMode>?
--
View this message in context: http://maven.40175.n5.nabble.com/ForkedBooter-in-2-2-1-does-not-honor-MAVEN-OPTS-tp5764410p5791911.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: ForkedBooter in 2.2.1 does not honor MAVEN_OPTS
Posted by Martin Gainty <mg...@hotmail.com>.
Ben the reason why i always set forkMode to 'never' in my pom executing maven-surefire-plugin <properties>
<forkMode>never</forkMode>
</properties>
-Djava.awt.headless=true directive *presumes* you are running awt GUI
yet Iam not seeing any reference for java.awt in maven-surefire-plugin src
(2.2.1 is at least 5 years old and has been deprecated )
other than political...is there any cogent reason NOT to upgrade surefire to AT LEAST 2.4.2
?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> From: vincent.latombe@gmail.com
> Date: Mon, 22 Jul 2013 07:57:26 +0200
> Subject: Re: ForkedBooter in 2.2.1 does not honor MAVEN_OPTS
> To: users@maven.apache.org
>
> Hello,
>
> This is the JVM forked to execute unit tests (through
> maven-surefire-plugin). Check [1] to set options for that jvm.
>
> [1]
> http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#argLine
>
> Vincent
>
>
> 2013/7/20 Ben Siemon <be...@opower.com>
>
> > Specifically I have -Djava.awt.headless=true set in my maven options. Other
> > surefire booters seem to honor the headless mode and not steal focus but
> > the ForkedBooter still steals focus even when headless is set to true in
> > MAVEN_OPTS.
> >
> > Running jps -v yields this view of the two maven jvms started:
> >
> > Parent Maven with the correct MAVNE_OPTS
> > 29028 Launcher -Xms2048m -Xmx4096m -XX:PermSize=1024m -XX:MaxPermSize=2048m
> > -Djava.awt.headless=true
> > -Dclassworlds.conf=/usr/local/apache-maven//bin/m2.conf
> > -Dmaven.home=/usr/local/apache-maven/
> >
> >
> > ForkedBooter without the maven opts. This process steals my screen each
> > time it runs.
> > 29033 surefirebooter3016997434240550753.jar -XX:+HeapDumpOnOutOfMemoryError
> > -Xmx512M -XX:MaxPermSize=128M
> >
> > maven version:
> >
> > Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
> > Java version: 1.6.0_51
> > Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> > Default locale: en_US, platform encoding: MacRoman
> > OS name: "mac os x" version: "10.8.4" arch: "x86_64" Family: "mac"
> >
> > Upgrading from this version is not currently possible.
> >
> > I am not sure why mvn is now using this forked booter in place of the
> > earlier one that honored MAVEN_OPTS. It might be that upstream changes in
> > parent artifacts are forcing me to run the ForkedBooter instead.
> >
> > Thanks for any help you can offer.
> >
> > --
> > *Ben Siemon*
> > Senior Software Engineer, Engineering
> > *Opower* <http://www.opower.com>
> >
> > We’re hiring! See jobs here <http://www.opower.com/careers>.
> >
Re: ForkedBooter in 2.2.1 does not honor MAVEN_OPTS
Posted by Vincent Latombe <vi...@gmail.com>.
Hello,
This is the JVM forked to execute unit tests (through
maven-surefire-plugin). Check [1] to set options for that jvm.
[1]
http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#argLine
Vincent
2013/7/20 Ben Siemon <be...@opower.com>
> Specifically I have -Djava.awt.headless=true set in my maven options. Other
> surefire booters seem to honor the headless mode and not steal focus but
> the ForkedBooter still steals focus even when headless is set to true in
> MAVEN_OPTS.
>
> Running jps -v yields this view of the two maven jvms started:
>
> Parent Maven with the correct MAVNE_OPTS
> 29028 Launcher -Xms2048m -Xmx4096m -XX:PermSize=1024m -XX:MaxPermSize=2048m
> -Djava.awt.headless=true
> -Dclassworlds.conf=/usr/local/apache-maven//bin/m2.conf
> -Dmaven.home=/usr/local/apache-maven/
>
>
> ForkedBooter without the maven opts. This process steals my screen each
> time it runs.
> 29033 surefirebooter3016997434240550753.jar -XX:+HeapDumpOnOutOfMemoryError
> -Xmx512M -XX:MaxPermSize=128M
>
> maven version:
>
> Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
> Java version: 1.6.0_51
> Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.8.4" arch: "x86_64" Family: "mac"
>
> Upgrading from this version is not currently possible.
>
> I am not sure why mvn is now using this forked booter in place of the
> earlier one that honored MAVEN_OPTS. It might be that upstream changes in
> parent artifacts are forcing me to run the ForkedBooter instead.
>
> Thanks for any help you can offer.
>
> --
> *Ben Siemon*
> Senior Software Engineer, Engineering
> *Opower* <http://www.opower.com>
>
> We’re hiring! See jobs here <http://www.opower.com/careers>.
>