Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7090153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:00:40+00:00 2026-05-28T08:00:40+00:00

I am using maven to compile some java classes. One of the classes has

  • 0

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 error:

 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T08:00:41+00:00Added an answer on May 28, 2026 at 8:00 am

    You need to instruct the maven build to set the compiler flags for compilation of java source level 1.5. This is done inside your pom.xml file, adding configuration for the maven-compiler-plugin plugin.

    For instance:

    <plugins>
    [...]
         <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>2.3.2</version>
              <executions>
                  <execution>
                      <id>default-compile</id>
                      <configuration>
                           <source>1.5</source>
                           <target>1.5</target>
                      </configuration>
                  </execution>
                  </executions>
         </plugin>
    [...]
    </plugins>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're using Maven at work at quite regularly we get the error message The
I'm using Google Protocol Buffers to generate some Java classes for my project. Using
Im using maven to checkout some projects. I don't want maven to checkout a
Im using maven to build a multi module project. But some projects are in
I am considering using Maven for a Java open source project I manage. In
I am using maven to generate a website for a Java project, which uses
I'm using maven to build the project and compile failed because I put class
I'm building a java project with maven-2 and due to some dependencies listed, and
I've got some problems using Maven on this ready-to-use project: http://wiki.javaforum.hu/display/ANDROIDSOAP/Home Basically, I just
I want to ignore some build errors at a specific directory by using maven's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.