You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by pranay agarwal <st...@gmail.com> on 2012/01/20 14:48:01 UTC

how to check/change the jdk version used by maven

hi, i am using maven to compile some java classes .One of the classes has
an annotation(@Override) so when i run mvn compile then i get errror that:

 annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)
        @Override

 annotations are not supported in
-source 1.3
(use -source 5 or higher to enable annotations)
        @Override

Although the java version in my system is jdk 1.6.29 still i can't
understand this error.
So i there a way by which i can check the jdk version maven is using and
perhaps change it.
Or, is there any other solution?
Thanks.

Re: how to check/change the jdk version used by maven

Posted by Stephen Connolly <st...@gmail.com>.
http://www.jonathanbaldwin.co.uk/storage/philosophy-images/my_teaching_philosophy/Teaching_Philosophy_2.030-001.png?__SQUARESPACE_CACHEVERSION=1280687591239

On 20 January 2012 14:44, Knut Aksnes-NOR <Kn...@jeppesen.com> wrote:
> Adding this to your pom should fix it:
>
> <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>        <version>2.3.2</version>
>        <configuration>
>                <source>1.6</source>
>                <target>1.6</target>
>        </configuration>
> </plugin>
>
> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com]
> Sent: 20. januar 2012 15:40
> To: Maven Users List
> Subject: Re: how to check/change the jdk version used by maven
>
> First read this http://bit.ly/AC5nO7 and then for extra bonus marks see http://to.justpitch.me/AF1FDx
>
> On 20 January 2012 13:48, pranay agarwal <st...@gmail.com> wrote:
>> hi, i am using maven to compile some java classes .One of the classes
>> has an annotation(@Override) so when i run mvn compile then i get errror that:
>>
>>  annotations are not supported in -source 1.3 (use -source 5 or higher
>> to enable annotations)
>>        @Override
>>
>>  annotations are not supported in
>> -source 1.3
>> (use -source 5 or higher to enable annotations)
>>        @Override
>>
>> Although the java version in my system is jdk 1.6.29 still i can't
>> understand this error.
>> So i there a way by which i can check the jdk version maven is using
>> and perhaps change it.
>> Or, is there any other solution?
>> Thanks.
>
> ---------------------------------------------------------------------
> 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: how to check/change the jdk version used by maven

Posted by Knut Aksnes-NOR <Kn...@jeppesen.com>.
Adding this to your pom should fix it:

<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-compiler-plugin</artifactId>
	<version>2.3.2</version>
	<configuration>
		<source>1.6</source>
		<target>1.6</target>
	</configuration>
</plugin>

-----Original Message-----
From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com] 
Sent: 20. januar 2012 15:40
To: Maven Users List
Subject: Re: how to check/change the jdk version used by maven

First read this http://bit.ly/AC5nO7 and then for extra bonus marks see http://to.justpitch.me/AF1FDx

On 20 January 2012 13:48, pranay agarwal <st...@gmail.com> wrote:
> hi, i am using maven to compile some java classes .One of the classes 
> has an annotation(@Override) so when i run mvn compile then i get errror that:
>
>  annotations are not supported in -source 1.3 (use -source 5 or higher 
> to enable annotations)
>        @Override
>
>  annotations are not supported in
> -source 1.3
> (use -source 5 or higher to enable annotations)
>        @Override
>
> Although the java version in my system is jdk 1.6.29 still i can't 
> understand this error.
> So i there a way by which i can check the jdk version maven is using 
> and perhaps change it.
> Or, is there any other solution?
> Thanks.

---------------------------------------------------------------------
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: how to check/change the jdk version used by maven

Posted by Stephen Connolly <st...@gmail.com>.
First read this http://bit.ly/AC5nO7 and then for extra bonus marks
see http://to.justpitch.me/AF1FDx

On 20 January 2012 13:48, pranay agarwal <st...@gmail.com> wrote:
> hi, i am using maven to compile some java classes .One of the classes has
> an annotation(@Override) so when i run mvn compile then i get errror that:
>
>  annotations are not supported in -source 1.3
> (use -source 5 or higher to enable annotations)
>        @Override
>
>  annotations are not supported in
> -source 1.3
> (use -source 5 or higher to enable annotations)
>        @Override
>
> Although the java version in my system is jdk 1.6.29 still i can't
> understand this error.
> So i there a way by which i can check the jdk version maven is using and
> perhaps change it.
> Or, is there any other solution?
> Thanks.

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