When trying to enhance classes annotated with @Entity or @Embeddable at build-time, on Windows, hibernate-enhance-maven-plugin logs an error "Unable to delete class file [xxx.class]" for every class it processes.
See the attached test project (hbm-enhance-test.zip) to reproduce this issue.
Here is the relevant part of the Maven log:
[INFO] — hibernate-enhance-maven-plugin:4.3.8.Final:enhance (default) @ hbm-enhance-test — [INFO] Started enhance plugin..... [INFO] Processing Composite class file [hbm.test.Address]. [ERROR] Unable to delete class file [Address.class] [INFO] Processing Entity class file [hbm.test.Director]. [ERROR] Unable to delete class file [Director.class] [INFO] Processing Entity class file [hbm.test.Movie]. [ERROR] Unable to delete class file [Movie.class] [INFO] Processing Entity class file [hbm.test.Theatre]. [ERROR] Unable to delete class file [Theatre.class] [INFO] Enhance plugin completed. [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------
Note that the build doesn't fail, but the compiled classes are not enhanced. Running mvn compile -debug doesn't give more details about the error.
|