I'm referring to the dependency resolution. Checking the Configuration
Details you mentioned, I was able to determine Eclipse was indeed still
being started by a JRE VM. Then I was able to look up the Eclipse
documentation and see that the first VM found in the system PATH is used
to start Eclipse (unless you specify -vm); the Installed JREs preference
is only useful for launching additional VMs after Eclipse is started, I
guess. So we were able to take care of the problem by having those users
add their JDK\bin directories to the front of their PATH. 

Thanks a bunch for the pointer in the right direction!

Chris

> -----Original Message-----
> From: Schulz, Daniel [mailto:[EMAIL PROTECTED] 
> Sent: Friday, 10 November, 2006 03:15
> To: user@m2eclipse.codehaus.org
> Subject: RE: [m2eclipse-user] Java.home strangeness?
> 
> hi chris,
> 
> what do you mean? "m2 build" or dependency resolution to 
> build up the m2 classpath container.
> 
> the m2 build is an external tool (and runs as a forked jvm 
> process). check the runtime jre setting of "m2 build" in your 
> external tools configuration. 
> 
> the dependency resolution for the classpath container is done 
> by calling maven (embedder) inside the eclipse jvm. you can 
> specify the eclipse jvm by starting eclipse with the "-vm" 
> parameter and check java.home of eclipse with 
> [Eclipse]->Help->About Eclipse SDK->[Configuration Details].
> 
> daniel 
> 
> 
> -----Original Message-----
> From: Chris Hilton [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 10, 2006 1:19 AM
> To: user@m2eclipse.codehaus.org
> Subject: [m2eclipse-user] Java.home strangeness?
> 
> 
> Given the following project pom.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?><project>
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>Ack</groupId>
>   <artifactId>Ack</artifactId>
>   <version>0.0.1</version>
>   <description></description>
>       <dependencies>
>         <dependency>
>           <groupId>com.sun</groupId>
>           <artifactId>tools</artifactId>
>           <version>1.5.0</version>
>           <scope>system</scope>
>           <systemPath>${java.home}/../lib/tools.jar</systemPath>
>         </dependency>
>       </dependencies>
> </project>
> 
> Most of our developers have no problems. Some few, however, 
> have been seeing an error in the M2 console  with a missing 
> artifact. It appeared we had traced it down to the Installed 
> JRE preference, which was pointing to a JRE (not JDK) 
> directory. No problem, we should just be able to point to the 
> JDK, right? So we changed the Installed JRE preference to a 
> JDK, still can't resolve. Stop and restart Eclipse, still 
> can't resolve. Change the JAVA_HOME environment variable to 
> the JDK, stop and restart Eclipse, still can't resolve. By 
> changing the systemPath to a junk.jar file, we were able to 
> finally determine that the ${java.home} is apparently still 
> referring to the old JRE location, despite our best efforts 
> to point it elsewhere.
> 
> It seems like this would be an Eclipse issue, but since we've 
> done what I thought would be required in Eclipse, I have to 
> ask: is there something in the m2Eclipse plugin that is 
> causing it run against the old JRE? Any other ideas on how to 
> run against the correct JDK Java home?
> 
> Chris Hilton
> 

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to