[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 523
  • Last Modified:

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/ValueBase.java:[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?
1 Solution
The error message comes as a result of running which command?
MeenuNagpalAuthor Commented:
I executed "mvn install"
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.


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

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now