Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] How m2e can select a specific jdk version when working with several jdk versions?

How does this work during command line build?

--
Regards,
Igor

On 2014-04-16, 8:44, Laurent TOURREAU wrote:
Hi
I work with several Java modules which have different JDK versions in the same Eclipse workspace.
For instance:
-Module A -> JDK 1.6.0_24
-Module B-> JDK 1.6.0_37

I must use JDK6 update 24 for module A, no higher version is supported.
I use Eclipse 4.3.2 (Kepler SR-2)

Module A pom.xml compiler plugin section is :
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>3.1</version>
           <configuration>
             <verbose>true</verbose>
             <fork>true</fork>
             <executable>C:\Program Files\Java\jdk1.6.0_24\bin\javac</executable>
             <compilerVersion>1.6</compilerVersion>
             <source>1.6</source>
             <target>1.6</target>
           </configuration>
         </plugin>

Module B pom.xml compiler plugin section is :
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>3.1</version>
           <configuration>
             <source>1.6</source>
             <target>1.6</target>
           </configuration>
         </plugin>

On Eclipse Preferences->Java->Installed JREs->Execution Environments I have the following compatible JREs for JavaSE-1.6 execution environment:
jdk1.6.0_24 [perfect match]
jdk1.6.0_37 [perfect match]

When I update Maven Project for both A and B projects, I get the following JRE System Library : JavaSE-1.6 for each project.

My problem :
For module A and B the jdk version used is 1.6.0_37 (I see that when I expand JRE System Library item in Package Explorer tab).

It's ok for module B. But for module A I would like to have jdk1.6.0_24 instead.

Any clue how can I achieve this with m2e plugin (the plugin seems to ignore the forked jdk I defined in plugin section)? Is there a feature request opened for that?

Cordialement / Best regards

Laurent TOURREAU



Back to the top