Forward: The following prompt always appears during Maven packaging:-source 1.3 does not support generics (use-source 5 or later to enable generics)

Source: Internet
Author: User

The following prompt always appears during Maven packaging:

1.-source 1.3 does not support generics (use-source 5 or later to enable generics) List <user> userlist = new arraylist <user> ();

2.-source 1.3 does not support annotation (use-source 5 or later to enable annotation) @ WebService (endpointinterface = "com. WebService. Service. loadservice ")

 

Run the MVN-V command to view the result:

C: \ Users \ Administrator> MVN-V
Apache Maven 2.2.1 (r801777; 03:16:01 + 0800)
Java version: 1.6.0
Java home: D: \ Program Files \ Java \ jdk1.6.0 \ JRE
Default locale: zh_cn, platform encoding: GBK
OS name: "Windows Vista" version: "6.1" arch: "x86" Family: "Windows"

Obviously it has nothing to do with the configured JDK.

 

Final Solution:

In the project Pom. XML, add

<Build>
<Plugins>
<Plugin>
<Groupid> org. Apache. Maven. plugins </groupid>
<Artifactid> Maven-compiler-plugin </artifactid>
<Configuration>
<Sources> 1.5 </source>
<Target> 1.5 </Target>
</Configuration>
</Plugin>
</Plugins>
</Build>

Run MVN install, OK.

Forward: The following prompt always appears during Maven packaging:-source 1.3 does not support generics (use-source 5 or later to enable generics)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.