Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] How to specify JVM args?

Igor,

I just noticed I did make a mistake before... I think I ran the wrong maven target when I reported the JVM properties.  Trying again, the properties are included in the JVM though I don't notice the proxying actually happening:

 /usr/local/glassfish3/jdk/bin/java -Dmaven.home=/usr/local/apache-maven-2.2.1 -Dclassworlds.conf=/home/kbarlow/workspace/.metadata/.plugins/org.eclipse.m2e.launching/launches/m2conf322191688177308761.tmp -Dmaven.bootclasspath=/usr/local/apache-maven-2.2.1/boot/classworlds-1.1.jar -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8889 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8889 -Dfile.encoding=UTF-8 -classpath /usr/local/apache-maven-2.2.1/boot/classworlds-1.1.jar org.codehaus.classworlds.Launcher -B -s /home/kbarlow/.m2/settings.xml clean install

Keith


On Thu, Aug 29, 2013 at 2:02 PM, Keith Barlow <kbarlow@xxxxxxxxx> wrote:
Thanks for verifying... I am glad to hear it is/should be working.  I am running m2e 1.4 on Juno.  I will verify my settings and, if I can't find some mistake I made, update to Kelper and m2e 1.5.

Thanks again.

Keith


On Thu, Aug 29, 2013 at 1:51 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx> wrote:
I am not sure what's going on, to be honest. I just verified this works
with a recent m2e 1.5 running on Kepler and I expect 1.4 to work the
same.

What m2e and eclipse versions do you use? Can you check if
fresh/clean m2e 1.4 on kepler standard distro have the same problem?

/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java -Dmaven.home=/opt/apache-maven-3.0.5 -Dclassworlds.conf=/workspaces/clm-dev/.metadata/.plugins/org.eclipse.m2e.launching/launches/m2conf6781247038845319467.tmp -Dmaven.bootclasspath=/opt/apache-maven-3.0.5/boot/plexus-classworlds-2.4.jar -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8889 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8889 -Dfile.encoding=UTF-8 -classpath /opt/apache-maven-3.0.5/boot/plexus-classworlds-2.4.jar org.codehaus.plexus.classworlds.launcher.Launcher -B -s /Users/igor/.m2/settings.xml

--
Regards,
Igor


On 2013-08-29 1:28 PM, Keith Barlow wrote:
I don't see them as getting passed to the JVM:

  /usr/local/glassfish3/jdk/bin/java
-Dmaven.home=/usr/local/apache-maven-2.2.1
-Dclassworlds.conf=/home/kbarlow/workspace/.metadata/.plugins/org.eclipse.m2e.launching/launches/m2conf929383344193547816.tmp
-Dmaven.bootclasspath=/usr/local/apache-maven-2.2.1/boot/classworlds-1.1.jar
-Dfile.encoding=UTF-8 -classpath
/usr/local/apache-maven-2.2.1/boot/classworlds-1.1.jar
org.codehaus.classworlds.Launcher -B -s /home/kbarlow/.m2/settings.xml test

In regards to necessity, I suppose it's not absolutely necessary but
would be convenient.  I typically use the standard Eclipse JUnit launch
configurations to run unit tests individually while coding.  However, we
do have an automated build manager that is going to run unit tests
through maven.  So I was trying to make sure the unit tests were
executing properly for an automated environment.  In this particular
instance, I was finding that some of my setUps and tearDowns were not
configured properly to reset state and were interfering with other
tests.  It's proxying is useful for debugging to isolate problems.

Thanks.

Keith




On Thu, Aug 29, 2013 at 1:00 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx
<mailto:igor@xxxxxxxxxxxxxx>> wrote:

    Check if m2e passes jvm arguments to maven process, you can see actual
    jvm execution command line by right-clicking on the jvm on Debug view,
    then selecting Properties.

    I doubt it's m2e problem, however. Most likely maven tests are executed
    in a separate jvm, so you need to configure these in surefire/failsafe
    configuration.

    Also, do you really need to run mvn test from m2e? This is not
    recommended and I should probably remove this shortcut from Run menu. I
    suggest you either run tests as regular junit tests or as mvn test from
    command line, although the latter will likely have the same problem with
    jvm arguments.

    --
    Regards,
    Igor


    On 2013-08-29 12:52 PM, Keith Barlow wrote:

        As an addon... I'd prefer not to have to modify settings.xml or
        the pom
        since that would mean global changes or project changes
        respectively.  I
        am looking for quick and simple local configuration.


        On Thu, Aug 29, 2013 at 12:50 PM, Keith Barlow
        <kbarlow@xxxxxxxxx <mailto:kbarlow@xxxxxxxxx>
        <mailto:kbarlow@xxxxxxxxx <mailto:kbarlow@xxxxxxxxx>>> wrote:

             I am asking about JVMs started from Eclipse, via the launch
             configurations.  When I do Run->Java Application,  I can
        pass proxy
             parameters to the JVM by specifying them in the Launch
        Configuration
             on the "Arguments" tab in the "VM arguments" box as follows:

             -Dhttp.proxyHost=localhost
             -Dhttp.proxyPort=8889
             -Dhttps.proxyHost=localhost
             -Dhttps.proxyPort=8889

             If I put this same information into the m2e Launch
        Configuration on
             the "JRE" tab in the VM arguments box, and run my unit tests
             (Run->Maven test), the executed unit tests are not proxied.

             Keith


             On Thu, Aug 29, 2013 at 11:54 AM, Igor Fedorenko
             <igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>
        <mailto:igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>>> wrote:

                 Are you asking about Eclipse JVM or JVM started from
        Eclipse, using
                 Run->MavenBuild or Run->JavaApplication?

                 For Eclipse JVM you need to modify eclipse.ini or use
        -vmargs
                 command
                 line parameter. For JVMs started from Eclipse, most/all
        launch
                 configuration dialogs will have a way to specify jvm
        arguments.

                 Also note that Maven (and m2e) uses http proxy
        configuration
                 specified
                 in settings.xml file and this is what I recommend using
        for Maven.

                 --
                 Regards,
                 Igor


                 On 2013-08-29 11:43 AM, Keith Barlow wrote:

                     Hiyas,

                     Quick Question:  What is the correct way to pass
        parameters
                     to the JVM
                     via build configurations in Eclipse?  I am trying
        to specify
                     JVM proxy
                     parameters:

                     -Dhttp.proxyHost=localhost
                     -Dhttp.proxyPort=8889

                     I tried specifying them on the JRE tab but they
        don't see to
                     get applied.

                     Thanks.

                     Keith
                     --
                     Keith Barlow

                     /Software Engineer/
                     *Dell Boomi*


                     ___________________________________________________

                     m2e-users mailing list
        m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>>
        https://dev.eclipse.org/____mailman/listinfo/m2e-users
        <https://dev.eclipse.org/__mailman/listinfo/m2e-users>

        <https://dev.eclipse.org/__mailman/listinfo/m2e-users
        <https://dev.eclipse.org/mailman/listinfo/m2e-users>>

                 ___________________________________________________

                 m2e-users mailing list
        m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>>
        https://dev.eclipse.org/____mailman/listinfo/m2e-users
        <https://dev.eclipse.org/__mailman/listinfo/m2e-users>


                 <https://dev.eclipse.org/__mailman/listinfo/m2e-users
        <https://dev.eclipse.org/mailman/listinfo/m2e-users>>




             --
             Keith Barlow

             /Software Engineer/
             *Dell Boomi*





        --
        Keith Barlow

        /Software Engineer/
        *Dell Boomi*


        _________________________________________________
        m2e-users mailing list
        m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        https://dev.eclipse.org/__mailman/listinfo/m2e-users
        <https://dev.eclipse.org/mailman/listinfo/m2e-users>

    _________________________________________________
    m2e-users mailing list
    m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
    https://dev.eclipse.org/__mailman/listinfo/m2e-users
    <https://dev.eclipse.org/mailman/listinfo/m2e-users>




--
Keith Barlow

/Software Engineer/
*Dell Boomi*


_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users



--
Keith Barlow

Software Engineer
Dell Boomi



--
Keith Barlow

Software Engineer
Dell Boomi

Back to the top