Hello all!
I am trying to build a war project. and on compile it gives me this error:
[compiler:compile] Compiling 432 source files to C:\Beta\ECORP5\ECORP5-web\target\classes ------------------------------------------------------------- COMPILATION ERROR : ------------------------------------------------------------- \Beta\fin\fin-web\src\main\java\com\comp\fin\utils\Formatter.java:[23,-1] cannot access javax.annotation.PostConstruct bad class file: C:\Beta\fin\fin-web\target\endorsed\javaee-endorsed-api-6.0.jar(javax/annotation/PostConstruct.class) class file has wrong version 50.0, should be 49.0 1 error
I am not able to get rid of this error. I am using
java 6 and jdk 1.5 here is my POM.xml or part of it without unrelated stuff:
I am using NetBeans
IDE to create an ear project and this is the POM of the war module. I am building it separately. I dont think that should be a problem.
I will appreciate if some one can tell me what is wrong here that it gives this error.
On a side note: When i created the
Maven Ear project it was using JavaEE 6 so the war module was also using JEE6 but when i added some files in the webApp directory of the war module the
JEE version changed in the war module properties to Java EE 1.4 I dont know how it is doing that and why or which file is making it change on module level.
Thanks Syed..