You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Barrie Treloar <ba...@gmail.com> on 2009/04/24 04:56:41 UTC

Re: org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT ignores maven-compiler-plugin

On Fri, Apr 24, 2009 at 11:41 AM, Davis Ford
<da...@zenoconsulting.biz> wrote:
> Hi, I just enabled all snapshots for plugins, and a side effect of
> this was to pull down
> org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT version of
> eclipse plugin.
>
> Now, my project breaks in eclipse b/c it sets the JDK to be (I think)
> the system default (which is JDK 1.5), but my maven-compiler-plugin
> settings in the pom specify 1.6.  So maven compiles the sources, and
> when I launch the project in eclipse, it throws an error saying the
> class version is wrong.
>
> Nothing very interesting in the config below.  This problem did not
> exist for me until I just opened up plugin snapshots -- which I think
> I'll turn off.  This is on:
> $ mvn -version
> Maven version: 2.0.9
> Java version: 1.6.0_07

It should be setting it to 1.6.

Can you check the .classpath file that gets created and look at what
kind="con" is defined? (It should be the last entry)

It should either be
  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
which takes the default JRE defined in eclipse.
Check what version that is in the eclipse preferences Java > Installed JREs.

or
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

Which will use the Execution Environment bound to JavaSE-1.6 in your
eclipse preferences Java > Installed JREs > Execution Environment.

I can't find any integration tests for 1.6 specifically but we have
ones for J2SE-1.4.

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


Re: org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT ignores maven-compiler-plugin

Posted by Barrie Treloar <ba...@gmail.com>.
On Fri, Apr 24, 2009 at 12:37 PM, Davis Ford
<da...@zenoconsulting.biz> wrote:
> My apologies Barrie...this is the con entry:
>
> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
>
> User error.  Somehow my eclipse default JDK/JRE setting got switched
> back to JDK 5.  When I refreshed using mvn eclipse:eclipse it resets
> the JDK back to default JRE_CONTAINER -- whereas only the project was
> set previously on 6.  Its the IDE setting that changed for me, and
> this was the root of my problem.  I reset this globally in Eclipse and
> all is well.

No worries.
I'm glad all is well.

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


Re: org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT ignores maven-compiler-plugin

Posted by Davis Ford <da...@zenoconsulting.biz>.
My apologies Barrie...this is the con entry:

<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>

User error.  Somehow my eclipse default JDK/JRE setting got switched
back to JDK 5.  When I refreshed using mvn eclipse:eclipse it resets
the JDK back to default JRE_CONTAINER -- whereas only the project was
set previously on 6.  Its the IDE setting that changed for me, and
this was the root of my problem.  I reset this globally in Eclipse and
all is well.

--davis

On Thu, Apr 23, 2009 at 10:56 PM, Barrie Treloar <ba...@gmail.com> wrote:
> On Fri, Apr 24, 2009 at 11:41 AM, Davis Ford
> <da...@zenoconsulting.biz> wrote:
>> Hi, I just enabled all snapshots for plugins, and a side effect of
>> this was to pull down
>> org.apache.maven.plugins:maven-eclipse-plugin:2.7-SNAPSHOT version of
>> eclipse plugin.
>>
>> Now, my project breaks in eclipse b/c it sets the JDK to be (I think)
>> the system default (which is JDK 1.5), but my maven-compiler-plugin
>> settings in the pom specify 1.6.  So maven compiles the sources, and
>> when I launch the project in eclipse, it throws an error saying the
>> class version is wrong.
>>
>> Nothing very interesting in the config below.  This problem did not
>> exist for me until I just opened up plugin snapshots -- which I think
>> I'll turn off.  This is on:
>> $ mvn -version
>> Maven version: 2.0.9
>> Java version: 1.6.0_07
>
> It should be setting it to 1.6.
>
> Can you check the .classpath file that gets created and look at what
> kind="con" is defined? (It should be the last entry)
>
> It should either be
>  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> which takes the default JRE defined in eclipse.
> Check what version that is in the eclipse preferences Java > Installed JREs.
>
> or
> <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
>
> Which will use the Execution Environment bound to JavaSE-1.6 in your
> eclipse preferences Java > Installed JREs > Execution Environment.
>
> I can't find any integration tests for 1.6 specifically but we have
> ones for J2SE-1.4.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

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