I am using JRE 1.5. However, when I try to compile my code, it fails saying to use JRE 1.5 instead of 1.3
C: \ temp \ SpringExample> mvn -e clean install + Error stacktraces errors are included. [INFO] Project Scanning ... [INFO] --------------------------------------- -------- ------------------------- [INFO] Creating a SpringExample [INFO] task segment: [clean, install] [ INFORMATION] ----------------------------------------------- - ------------------------ [INFO] [clean: clean {execution: default-clean}] [INFO] Removing the C: \ temp \ SpringExample directory \ target [INFO] [resources: resources {execution: default-resources}] [WARNING] Using the platform encoding (actually Cp1252) to copy filtered resources, i.e. The build is platform dependent! [INFO] Copying 6 resources [INFO] [compiler: compilation {execution: default-compilation}] [INFO] Compiling 6 source files in C: \ temp \ SpringExample \ target \ classes [INFO] ------- ---------------------------------------- ---------- --------------- [ERROR] BUILD FAULT [INFO] --------------------------- -------------------- ------------------------- [INFO] Compilation error C: \ temp \ SpringExample \ src \ main \ java \ com \ mkyong \ stock \ model \ Stock.java: [45,9] annotations are not supported in source 1.3 (try -source 1.5 to enable annotations) @Override
[INFO] -------------------------------------------- --- ------------------------- [INFO] Tracing org.apache.maven.BuildFailureException: compilation failed C: \ temp \ SpringExample \ src \ main \ java \ com \ mkyong \ stock \ model \ Stock.java: [45,9] annotations are not supported in source 1.3 (try -source 1.5 to enable annotations) @Override
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Called: org.apache.maven.plugin.CompilationFailureException: compilation failed C: \ temp \ SpringExample \ src \ main \ java \ com \ mkyong \ stock \ model \ Stock.java: [45.9] annotations are not supported in source 1.3 (try -source 1.5 to enable annotations) @Override
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:516) at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more
[INFO] -------------------------------------------- --- ------------------------- [INFO] Total time: 2 seconds [INFO] Finished on: Wed Dec 22 10:04:53 IST 2010 [INFO] Final memory: 9M / 16M [INFO] ------------------------------- ---------------- ------------------------- C: \ temp \ SpringExample> javac - version javac 1.5.0_08 javac: no source files
source share