|Re: M2Eclipse & Multiple JVMs [message #23898 is a reply to message #23856]
||Wed, 25 March 2009 15:40
Originally posted by: igor.ifedorenko.com|
To make sure I understand the problem correctly.
1. All your code, both handwritten and generated, compiles and
presumably runs with java 1.4.
2. Most of your projects can be built with java 1.4.
3. Some of your projects require java 1.5 to run the build.
If this is correct, then you need to run Eclipse with 1.5 JVM, but add
1.4 JVM in "Installed JREs" Eclipse Java preferences. During import, m2e
will set project java compliance level based on maven-compiler-plugin
configuration (which I assume is 1.4). This way m2e will use 1.5 JVM to
run the build but the code will compile and run with Java 1.4.
Nick Sorokin wrote:
> I 'm currently working with multi-module Maven managed application
> intended to be compiled and operate with Java 1.4. However, some modules
> generate Java code from application model and require Java 1.5 (at
> least) to build the artefacts, mainly additional Java source. All
> modules can be successfully build by Maven from the command line
> assuning that required JVMs are installed.
> The problems started when I tried to perform the same tasks within
> Eclipse using m2eclipse plugin. The configuration I'm using consists of:
> - Windows XP operating system
> - Eclipse 3.4.0.v20080522
> - Subclipse plugin 1.4.8 from tigris.org
> - Maven integration for Eclipse 0.9.7.200902090947
> - Maven2 version 2.0.7
> - Java JDK 1.6.0_12 for Eclipse
> - Java JDK 1.4.2_16 for application - this is configured as default for
> Eclipse instance used by the application.
> - Subversion 1.5.4 for code repository
> What I would like to achieve is a complete clean build of the modules
> within Eclipse during initial checkout of the projects from the code
> repository. Unfortunately, the modules that require the JDK alternative
> to default JDK fail during "Check out as Maven Project" operation from
> Subversion Repository Exploring perspective. The failed project can be
> successfully re-built after initial import by additional run of the
> Maven build configuration where proper settings for JVM are set.
> My understanding is that all Maven builds are controlled through
> M2Eclipse. At the moment I can select maven profiles that wil be made
> active during project checkout. So, the questions are:
> 1. Is it possible to specify required JVM for build in the module' pom,
> e.g. specific profile or properies that can be used for maven execution?
> 2. If answer to Q1 is negative, then is there a maven2 plugin that will
> execute another maven plugin in a separate process and will allow to
> select JVM for the execution and specify the relevant parameters?
> Thanks in advance - your help and suggestions will be very appreciated
> Nick Sorokin
Powered by FUDForum
. Page generated in 0.02832 seconds