D:\examples\annotation-processing-test>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building annotation-processing-test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ annotation-processing-test ---
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ annotation-processing-test ---
[INFO] Compiling 1 source file to D:\examples\annotation-processing-test\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: Not a valid date format yyyy/MM/xd
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.657s
[INFO] Finished at: Tue Dec 29 03:36:50 CST 2015
[INFO] Final Memory: 12M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project annotation-processing-test: Compilation failure
[ERROR] error: Not a valid date format yyyy/MM/xd
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Now change the date format on the annotation to valid one "yyyy/MM/dd" (you can set any date format which can be
parsed
to LocalDate). This time there won't be any error. Also try to change the type of field from LocalDate to say
String.
You will get type validation compiler error.