X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=src%2Fsite%2Fxhtml%2Fpitfalls.xhtml;h=a29abba090e06d334316a8213145b17516bfdda1;hb=f286f6e2e7b2ef518853320e5438c06c2f681a53;hp=50006953f49f302c55157ea5aa97f1fc90454e57;hpb=64900890db2575b7a28790c5e4d5f45083ee94b3;p=hibernate4-maven-plugin diff --git a/src/site/xhtml/pitfalls.xhtml b/src/site/xhtml/pitfalls.xhtml index 50006953..a29abba0 100644 --- a/src/site/xhtml/pitfalls.xhtml +++ b/src/site/xhtml/pitfalls.xhtml @@ -4,6 +4,7 @@ +

Known Pitfalls (FAQ)

Annotated classes in dependencies are not found.

hibernate4-maven-plugin by default scans dependencies in the scope @@ -151,7 +152,7 @@ mvn hibernate4:export -Dhibernate.export.force=true executed, you can configure that explicitly like this:

->plugin<
+<plugin>
   <groupId>de.juplo</groupId>
   <artifactId>hibernate4-maven-plugin</artifactId>
   ...
@@ -163,5 +164,34 @@ mvn hibernate4:export -Dhibernate.export.force=true
Background-information for this design-decission can be found on the extra page To skip or not to skip: that is the question...

+

I do not want my dependencies to be scanned for hibernate annotations

+

+ If you do not want your dependencies to be scanned for hibernate annotations, + you can pass -Dhibernate.export.scan_dependencies=none to maven + or set scanDependencies to none in the configuration + of the plugin like this: +

+
+<plugin>
+  <groupId>de.juplo</groupId>
+  <artifactId>hibernate4-maven-plugin</artifactId>
+  ...
+  <configuration>
+    <scanDependencies>none</scanDependencies>
+  </configuration>
+</plugin>
+

No annotated classes found

+

+ If you are working under Windows and get the error-message + No annotated classes found in directory C:\projects\X Y Z\path-to-project\target\classes, + but you are really sure, that there are annotated classes in that + directory, you are expiriencing a bug, in the scannotation-library, that + was closed in version 1.1.0 of the hibernate-maven-plugin. +

+

+ + You should consider to upgrade to that version of the plugin. + +