You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Hansen <ma...@agileitinc.com> on 2008/09/08 05:51:18 UTC

macosx problem with forkMode and maven-surefire-plugin

I'm running MVN with JDK1.6.0 on MacOSX.  When I set forkMode to point 
to my JDK1.4.2, I'm still getting the JDK1.6.0 version of classes.jar on 
the classpath.  Has anybody else experienced this problem?

-- Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: macosx problem with forkMode and maven-surefire-plugin

Posted by Brett Porter <br...@gmail.com>.
I'm not sure what the difference is as it's not happening here.
Here are some env vars I have set:

$ echo $JAVA_HOME
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home

$ echo $PATH
/Applications/maven/apache-maven-2.0.10-RC11/bin:/opt/local/bin:/opt/local/sbin:/Users/brett/bin:/usr/local/bin:/usr/local/mysql/bin:/Library/PostgreSQL8/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin/

$ echo $M2_HOME
/Applications/maven/apache-maven-2.0.10-RC11/


2008/9/10 Mark Hansen <ma...@agileitinc.com>

> Brett,
>
> I tried 2.0.10-RC11, but I'm still getting the same error.  The MacOSX
> 1.6.0 classes.jar is showing up on the surefire test classpath.  See below
> (snippet) from the JUnit test report.
>
>   <property  value="... <snip/>  ... :
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/classes.jar:
>  ... <snip/> ..." name="surefire.test.class.path"/>
>
>
>
> Brett Porter wrote:
>
>> You're correct. I found with a test project that the correct runtime JAR
>> is
>> used, but the wrong JVM. However, using 2.0.10-RC11 corrects the problem,
>> and it was also fine under 2.0.8.
>> - Brett
>>
>> 2008/9/9 Mark Hansen <ma...@agileitinc.com>
>>
>>
>>
>>> Maven version: 2.0.9
>>> Java version: 1.6.0_05
>>> OS name: "mac os x" version: "10.5.4" arch: "x86_64" Family: "mac"
>>>
>>>          <plugin>
>>>              <groupId>org.apache.maven.plugins</groupId>
>>>              <artifactId>maven-surefire-plugin</artifactId>
>>>              <configuration>
>>>                  <forkMode>once</forkMode>
>>>                  <jvm>${jdk142.home}/bin/java</jvm>
>>>                  <systemProperties>
>>>                      <!-- Individual JUnit test uses these properties to
>>> create classloaders.  -->
>>>                      <property>
>>>                          <name>tomcat.port</name>
>>>                          <value>${tomcat.port}</value>
>>>                      </property>
>>>                      <property>
>>>                          <name>weblogic.server.port</name>
>>>                          <value>${weblogic.port}</value>
>>>                      </property>
>>>                      <property>
>>>                          <name>sl-ant.dir</name>
>>>                          <value>${sl.ant.dir}</value>
>>>                      </property>
>>>                      <property>
>>>                          <name>java6.home</name>
>>>                          <value>${java6.home}</value>
>>>                      </property>
>>>                      <property>
>>>                          <name>servicelayer.home.url</name>
>>>                          <value>${servicelayer.home.url}</value>
>>>                      </property>
>>>                      <property>
>>>                          <name>servicelayer.home</name>
>>>                          <value>${servicelayer.home}</value>
>>>                      </property>
>>>                      <property>
>>>                          <name>m2.repo</name>
>>>                          <value>${m2.repo}</value>
>>>                      </property>
>>>                  </systemProperties>
>>>              </configuration>
>>>          </plugin>
>>>
>>>
>>>
>>>
>>> Brett Porter wrote:
>>>
>>>
>>>
>>>> can you paste in the surefire plugin configuration that you are using
>>>> exactly?
>>>> Cheers,
>>>> Brett
>>>>
>>>> 2008/9/8 Mark Hansen <ma...@agileitinc.com>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>> I'm running MVN with JDK1.6.0 on MacOSX.  When I set forkMode to point
>>>>> to
>>>>> my JDK1.4.2, I'm still getting the JDK1.6.0 version of classes.jar on
>>>>> the
>>>>> classpath.  Has anybody else experienced this problem?
>>>>>
>>>>> -- Mark
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: macosx problem with forkMode and maven-surefire-plugin

Posted by Mark Hansen <ma...@agileitinc.com>.
Brett,

I tried 2.0.10-RC11, but I'm still getting the same error.  The MacOSX 
1.6.0 classes.jar is showing up on the surefire test classpath.  See 
below (snippet) from the JUnit test report.

    <property  value="... <snip/>  ... : 
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/classes.jar:  
... <snip/> ..." name="surefire.test.class.path"/>


Brett Porter wrote:
> You're correct. I found with a test project that the correct runtime JAR is
> used, but the wrong JVM. However, using 2.0.10-RC11 corrects the problem,
> and it was also fine under 2.0.8.
> - Brett
>
> 2008/9/9 Mark Hansen <ma...@agileitinc.com>
>
>   
>> Maven version: 2.0.9
>> Java version: 1.6.0_05
>> OS name: "mac os x" version: "10.5.4" arch: "x86_64" Family: "mac"
>>
>>           <plugin>
>>               <groupId>org.apache.maven.plugins</groupId>
>>               <artifactId>maven-surefire-plugin</artifactId>
>>               <configuration>
>>                   <forkMode>once</forkMode>
>>                   <jvm>${jdk142.home}/bin/java</jvm>
>>                   <systemProperties>
>>                       <!-- Individual JUnit test uses these properties to
>> create classloaders.  -->
>>                       <property>
>>                           <name>tomcat.port</name>
>>                           <value>${tomcat.port}</value>
>>                       </property>
>>                       <property>
>>                           <name>weblogic.server.port</name>
>>                           <value>${weblogic.port}</value>
>>                       </property>
>>                       <property>
>>                           <name>sl-ant.dir</name>
>>                           <value>${sl.ant.dir}</value>
>>                       </property>
>>                       <property>
>>                           <name>java6.home</name>
>>                           <value>${java6.home}</value>
>>                       </property>
>>                       <property>
>>                           <name>servicelayer.home.url</name>
>>                           <value>${servicelayer.home.url}</value>
>>                       </property>
>>                       <property>
>>                           <name>servicelayer.home</name>
>>                           <value>${servicelayer.home}</value>
>>                       </property>
>>                       <property>
>>                           <name>m2.repo</name>
>>                           <value>${m2.repo}</value>
>>                       </property>
>>                   </systemProperties>
>>               </configuration>
>>           </plugin>
>>
>>
>>
>>
>> Brett Porter wrote:
>>
>>     
>>> can you paste in the surefire plugin configuration that you are using
>>> exactly?
>>> Cheers,
>>> Brett
>>>
>>> 2008/9/8 Mark Hansen <ma...@agileitinc.com>
>>>
>>>
>>>
>>>       
>>>> I'm running MVN with JDK1.6.0 on MacOSX.  When I set forkMode to point to
>>>> my JDK1.4.2, I'm still getting the JDK1.6.0 version of classes.jar on the
>>>> classpath.  Has anybody else experienced this problem?
>>>>
>>>> -- Mark
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>         
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: macosx problem with forkMode and maven-surefire-plugin

Posted by Brett Porter <br...@gmail.com>.
You're correct. I found with a test project that the correct runtime JAR is
used, but the wrong JVM. However, using 2.0.10-RC11 corrects the problem,
and it was also fine under 2.0.8.
- Brett

2008/9/9 Mark Hansen <ma...@agileitinc.com>

> Maven version: 2.0.9
> Java version: 1.6.0_05
> OS name: "mac os x" version: "10.5.4" arch: "x86_64" Family: "mac"
>
>           <plugin>
>               <groupId>org.apache.maven.plugins</groupId>
>               <artifactId>maven-surefire-plugin</artifactId>
>               <configuration>
>                   <forkMode>once</forkMode>
>                   <jvm>${jdk142.home}/bin/java</jvm>
>                   <systemProperties>
>                       <!-- Individual JUnit test uses these properties to
> create classloaders.  -->
>                       <property>
>                           <name>tomcat.port</name>
>                           <value>${tomcat.port}</value>
>                       </property>
>                       <property>
>                           <name>weblogic.server.port</name>
>                           <value>${weblogic.port}</value>
>                       </property>
>                       <property>
>                           <name>sl-ant.dir</name>
>                           <value>${sl.ant.dir}</value>
>                       </property>
>                       <property>
>                           <name>java6.home</name>
>                           <value>${java6.home}</value>
>                       </property>
>                       <property>
>                           <name>servicelayer.home.url</name>
>                           <value>${servicelayer.home.url}</value>
>                       </property>
>                       <property>
>                           <name>servicelayer.home</name>
>                           <value>${servicelayer.home}</value>
>                       </property>
>                       <property>
>                           <name>m2.repo</name>
>                           <value>${m2.repo}</value>
>                       </property>
>                   </systemProperties>
>               </configuration>
>           </plugin>
>
>
>
>
> Brett Porter wrote:
>
>> can you paste in the surefire plugin configuration that you are using
>> exactly?
>> Cheers,
>> Brett
>>
>> 2008/9/8 Mark Hansen <ma...@agileitinc.com>
>>
>>
>>
>>> I'm running MVN with JDK1.6.0 on MacOSX.  When I set forkMode to point to
>>> my JDK1.4.2, I'm still getting the JDK1.6.0 version of classes.jar on the
>>> classpath.  Has anybody else experienced this problem?
>>>
>>> -- Mark
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: macosx problem with forkMode and maven-surefire-plugin

Posted by Mark Hansen <ma...@agileitinc.com>.
Maven version: 2.0.9
Java version: 1.6.0_05
OS name: "mac os x" version: "10.5.4" arch: "x86_64" Family: "mac"

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <forkMode>once</forkMode>
                    <jvm>${jdk142.home}/bin/java</jvm>
                    <systemProperties>
                        <!-- Individual JUnit test uses these properties 
to create classloaders.  -->
                        <property>
                            <name>tomcat.port</name>
                            <value>${tomcat.port}</value>
                        </property>
                        <property>
                            <name>weblogic.server.port</name>
                            <value>${weblogic.port}</value>
                        </property>
                        <property>
                            <name>sl-ant.dir</name>
                            <value>${sl.ant.dir}</value>
                        </property>
                        <property>
                            <name>java6.home</name>
                            <value>${java6.home}</value>
                        </property>
                        <property>
                            <name>servicelayer.home.url</name>
                            <value>${servicelayer.home.url}</value>
                        </property>
                        <property>
                            <name>servicelayer.home</name>
                            <value>${servicelayer.home}</value>
                        </property>
                        <property>
                            <name>m2.repo</name>
                            <value>${m2.repo}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>

   


Brett Porter wrote:
> can you paste in the surefire plugin configuration that you are using
> exactly?
> Cheers,
> Brett
>
> 2008/9/8 Mark Hansen <ma...@agileitinc.com>
>
>   
>> I'm running MVN with JDK1.6.0 on MacOSX.  When I set forkMode to point to
>> my JDK1.4.2, I'm still getting the JDK1.6.0 version of classes.jar on the
>> classpath.  Has anybody else experienced this problem?
>>
>> -- Mark
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: macosx problem with forkMode and maven-surefire-plugin

Posted by Brett Porter <br...@gmail.com>.
can you paste in the surefire plugin configuration that you are using
exactly?
Cheers,
Brett

2008/9/8 Mark Hansen <ma...@agileitinc.com>

> I'm running MVN with JDK1.6.0 on MacOSX.  When I set forkMode to point to
> my JDK1.4.2, I'm still getting the JDK1.6.0 version of classes.jar on the
> classpath.  Has anybody else experienced this problem?
>
> -- Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/