http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html
Use "1.7". /Anders On Thu, Jul 23, 2015 at 5:20 PM, Magnanao, Hector <hector.magna...@sap.com> wrote: > Where do I configure the plugin for java 7 ? > > -----Original Message----- > From: Quentin Caillard [mailto:quentin.caill...@ariadnext.com] > Sent: Wednesday, July 22, 2015 4:25 PM > To: Maven Users List > Subject: Re: how do i fix this error > > Hi, > > you must configure the maven compiler plugin for java 7. It's java 5 by > default. > > On Wed, Jul 22, 2015 at 10:40 PM, Magnanao, Hector < > hector.magna...@sap.com> > wrote: > > > I'm converting my ant build to maven using the ant plugin. When I try to > > compile my source code, I get this similar errors. Can someone help me > > with the resolution ? > > > > [ERROR] Failed to execute goal > > org.apache.maven.plugins:maven-compiler-plugin:3.1:compile > > (default-compile) on project foundation: Compilation failure: Compilation > > failure: > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/util/jdbc/SqlProfiler.java:[333,55] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/util/jdbc/SqlListeners.java:[109,48] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/validator/ValidatorException.java:[59,42] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/db/Query.java:[37,66] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/db/DBTransactionManager.java:[54,60] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/db/txhistory/TxHistory.java:[132,86] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/db/DBPool.java:[260,47] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/db/txhistory/TxTable.java:[44,78] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/util/threadlocal/ThreadCache.java:[53,56] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/util/concurrent/AsyncList.java:[17,50] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/db/txhistory/TxHistoryUtils.java:[47,72] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/util/ReplacementBuffer.java:[162,69] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/util/AppEnv.java:[115,83] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/db/DBService.java:[457,58] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/service/Standalone.java:[86,13] > > try-with-resources is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable try-with-resources) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/service/Standalone.java:[88,52] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/thread/ThreadProperties.java:[22,77] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > [ERROR] > > > /C:/Foundation/foundation/src/main/java/com/mycompany/app/db/ThreadCacheConfig.java:[40,62] > > diamond operator is not supported in -source 1.5 > > [ERROR] (use -source 7 or higher to enable diamond operator) > > > > Hector Magnanao Jr. > > SCM Analyst > > > > Fieldglass, Inc. > > O: (331) 702-6142 > > M: (773) 474-3051 > > hector.magna...@sap.com > > www.fieldglass.com > > > > Fieldglass is now part of SAP > > > > This email contains confidential information. If you are not the > intended > > recipient, do not read, distribute or reproduce this transmission > > (including any attachments). If you have received this email in error, > > please notify the sender by email reply. > > > > > > > -- > *Quentin CAILLARD* > *Software Engineering* > Email : q...@ariadnext.com > Phone : +33 (0)2 30 960 874 > Fax : +33 (0)2 30 960 423 > > *AriadNEXT SAS* > 80 av des Buttes de Coësmes > 35700 RENNES - FRANCE > http://www.ariadnext.com > > -- > > > Ce message et toutes les pièces jointes sont confidentiels et établis à > l'intention exclusive de son ou ses destinataires. Si vous avez reçu ce > message par erreur, merci d'en avertir immédiatement l'émetteur et de > détruire le message. Toute modification, édition, utilisation ou diffusion > non autorisée est interdite. L'émetteur décline toute responsabilité au > titre de ce message s'il a été modifié, déformé, falsifié, infecté par un > virus ou encore édité ou diffusé sans autorisation. > > This message and any attachments are confidential and intended for the > named addressee(s) only. If you have received this message in error, please > notify immediately the sender, then delete the message. Any unauthorized > modification, edition, use or dissemination is prohibited. The sender shall > not be liable for this message if it has been modified, altered, falsified, > infected by a virus or even edited or disseminated without authorization. >