Re: annotations are not supported in -source 1.3

2008-06-29 Thread James William Dumay
Buters,

Ahh, thats because annotations are 1.5 only.

You might want to configure the source and target parameters of the
compiler plugin in your build like the following:

build
plugins
plugin
artifactIdmaven-compiler-plugin/artifactId
version2.0.2/version
configuration
source1.5/source
target1.5/target
/configuration
/plugin
/plugins
/build

Cheers
James

On Sun, 2008-06-29 at 17:16 -0700, buters wrote:
 Hi,
 
 I've executed junit tests with Maven and get such error:
 'annotations are not supported in -source 1.3
 use -source 5 or higher to enable annotations
 @Before'
 Which source is meant here? How can I solve this?
 
 Thanks beforehand,
 regards, buters


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-09-17 Thread Kyle.Bober

Thank you everyone for your replies. I knew it was something straight forward
and simple that I was overlooking! In regards to the repostings I am not
sure why that happened. My apologizes for the inconvenience and annoyance
this may have caused some.

-Kyle


Graham Leggett wrote:
 
 On Thu, September 13, 2007 3:24 pm, Kyle.Bober wrote:
 
 I have been using Maven for quite sometime and this is the first JDK6
 project
 POM I have created. I am running into a compilation issue using the
 compiler:compile goal... This is what I get

 annotations are not supported in -source 1.3
 (use -source 5 or higher to enable annotations)
 @WebService
 
 I suspect the compiler plugin is adding a -source parameter to the compile
 step, and defaulting it to v1.3. Our poms enforce JDK v5 only, we define
 this in our root pom for the compiler plugin:
 
 configuration
   source1.5/source
   target1.5/target
 /configuration
 
 Regards,
 Graham
 --
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/JDK6-compilation-issue-using-Maven2---annotations-are-not-supported-in--source-1.3-tf4435690s177.html#a12735443
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-09-13 Thread Larry Meadors
http://docs.codehaus.org/display/MAVEN/Java+5+Annotations+for+Plugins

On 9/13/07, Kyle.Bober [EMAIL PROTECTED] wrote:

 I have been using Maven for quite sometime and this is the first JDK6 project
 POM I have created. I am running into a compilation issue using the
 compiler:compile goal... This is what I get

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

 I have my JAVA_HOME env variable set to point to JDK6 and I can compile the
 java file fine using javac command but when I try using mvn compile I
 receive the above error... I feel like a goof not being able to figure this
 one out. Is there a way to set in the Maven POM file the JDK version to
 compile against???

 Thanks for anyone's help in advance...

 -Kyle
 --
 View this message in context: 
 http://www.nabble.com/annotations-are-not-supported-in--source-1.3-tf4435690s177.html#a12654771
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-09-13 Thread Graham Leggett
On Thu, September 13, 2007 3:24 pm, Kyle.Bober wrote:

 I have been using Maven for quite sometime and this is the first JDK6
 project
 POM I have created. I am running into a compilation issue using the
 compiler:compile goal... This is what I get

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

I suspect the compiler plugin is adding a -source parameter to the compile
step, and defaulting it to v1.3. Our poms enforce JDK v5 only, we define
this in our root pom for the compiler plugin:

configuration
  source1.5/source
  target1.5/target
/configuration

Regards,
Graham
--



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-09-13 Thread Gisbert Amm

See also http://jira.codehaus.org/browse/MCOMPILER-57

-Gisbert

Kyle.Bober wrote:

I have been using Maven for quite sometime and this is the first JDK6 project
POM I have created. I am running into a compilation issue using the
compiler:compile goal... This is what I get

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

I have my JAVA_HOME env variable set to point to JDK6 and I can compile the
java file fine using javac command but when I try using mvn compile I
receive the above error... I feel like a goof not being able to figure this
one out. Is there a way to set in the Maven POM file the JDK version to
compile against???

Thanks for anyone's help in advance...

-Kyle


--
Gisbert Amm
Softwareentwickler Infrastruktur

WEB.DE GmbH
Brauerstraße 48 · D-76135 Karlsruhe
Tel. +49-721-91374-4224 · Fax +49-721-91374-2740
[EMAIL PROTECTED] · http://www.web.de/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-09-13 Thread Kyle.Bober

Thanks for all the help guys! In actuality all I needed to do was add the
following:

build
plugins  
  plugin
artifactIdmaven-compiler-plugin/artifactId
configuration
  source1.6/source
  target1.6/target
/configuration
  /plugin
/plugins
  /build

Everything compiled fine after that... Lesson learned...
-- 
View this message in context: 
http://www.nabble.com/JDK6-compilation-issue-using-Maven2---annotations-are-not-supported-in--source-1.3-tf4435690s177.html#a12655881
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-08-17 Thread Gisbert Amm

Just for the reference:

http://jira.codehaus.org/browse/MCOMPILER-57

-Gisbert

Mathias P.W Nilsson wrote:

I get this error message when I run mvn compile

annotations are not supported in -source 1.3
(try -source 1.5 to enable annotations)

How is that? When I check java -version I get

java version 1.5.0_07
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)

Why can't I compile? 


--
Gisbert Amm
Softwareentwickler Infrastruktur

WEB.DE GmbH
Brauerstraße 48 · D-76135 Karlsruhe
Tel. +49-721-91374-4224 · Fax +49-721-91374-2740
[EMAIL PROTECTED] · http://www.web.de/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-08-16 Thread Wayne Fay
Google.com maven compile source target

Wayne

On 8/16/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

 I get this error message when I run mvn compile

 annotations are not supported in -source 1.3
 (try -source 1.5 to enable annotations)

 How is that? When I check java -version I get

 java version 1.5.0_07
 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
 Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)

 Why can't I compile?
 --
 View this message in context: 
 http://www.nabble.com/annotations-are-not-supported-in--source-1.3-tf4281106s177.html#a12186205
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-08-16 Thread Mathias P.W Nilsson

Yes thanks I read it in a thread on this forum.

I do't get this maven thing. My respository is full of hibernate all all
that need to be there. When I compile

package javax.persistence does not exist and every other package as well
I see the javax.presistence in my M2_REPO variable in eclipse and can expand
it but not compile. Life where easier with ant :,(
-- 
View this message in context: 
http://www.nabble.com/annotations-are-not-supported-in--source-1.3-tf4281106s177.html#a12186976
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-08-16 Thread Wayne Fay
Simply having the files in your repo is not sufficient. You must add
dependencies in your pom for each artifact that your project
requires at compile, test, or runtime.

I highly recommend you read one of the free pdf/ebooks on Maven -- one
is from www.devzuz.com and another is from www.sonatype.com.

Wayne

On 8/16/07, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

 Yes thanks I read it in a thread on this forum.

 I do't get this maven thing. My respository is full of hibernate all all
 that need to be there. When I compile

 package javax.persistence does not exist and every other package as well
 I see the javax.presistence in my M2_REPO variable in eclipse and can expand
 it but not compile. Life where easier with ant :,(
 --
 View this message in context: 
 http://www.nabble.com/annotations-are-not-supported-in--source-1.3-tf4281106s177.html#a12186976
 Sent from the Maven - Users mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: annotations are not supported in -source 1.3

2007-08-16 Thread Mathias P.W Nilsson

But I have? I've posted my pom and hibernate is in the dependency!
-- 
View this message in context: 
http://www.nabble.com/annotations-are-not-supported-in--source-1.3-tf4281106s177.html#a12187764
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]