mvn install on Linux

I am trying to run java project on Linux with maven. Although the java version which I have installed is 1.6.0_20, I get following exception

/home/administrator/Desktop/development/eclipse/com.radsdk.framework/src/main/java/com/radsdk/[61,2] annotations are not supported in -source 1.3
(use -source 5 or higher to enable annotations)

the mvn --version returns following
Apache Maven 2.2.1 (rdebian-4)
Java version: 1.6.0_20
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8

I guess I need to change the VM configuration. Any idea?
Who is Participating?
for_yanConnect With a Mentor Commented:

from the prvious link, but corrected syntax:
You need to tell the maven-compiler-plugin to use java 1.5. Add this to your pom.xml:

Open in new window

The error message comes as a result of running which command?
MeenuNagpalAuthor Commented:
I executed "mvn install"
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Maybe you want to use newer maven - I guess the current version is 3.0.3
MeenuNagpalAuthor Commented:
@for yan I installed maven in ubuntu. I only got option to install maven2 in Synaptic package manager. Will try installing latest version manually.
you don't need to use the maven-compiler-plugin
and you probably don't want to be using 1.5 either
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.