Reverted to old behaviour: export is skipped, when maven.test.skip=true
authorKai Moritz <kai@juplo.de>
Wed, 18 Sep 2013 21:59:13 +0000 (23:59 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 18 Sep 2013 22:50:34 +0000 (00:50 +0200)
src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java
src/site/apt/configuration.apt
src/site/apt/index.apt
src/site/apt/pitfalls.apt
src/site/site.xml

index 5c3b5c7..2e232bf 100644 (file)
@@ -153,7 +153,7 @@ public class Hbm2DdlMojo extends AbstractMojo
    * The excecution is skipped automatically, if no modified or newly added
    * annotated classes are found and the dialect was not changed.
    *
    * The excecution is skipped automatically, if no modified or newly added
    * annotated classes are found and the dialect was not changed.
    *
-   * @parameter property="hibernate.export.skip" default-value="false"
+   * @parameter property="maven.test.skip" default-value="false"
    */
   private boolean skip;
 
    */
   private boolean skip;
 
index ea11db0..a093413 100644 (file)
@@ -160,23 +160,11 @@ Configuration Examples
 </plugin>
 ---------------
 
 </plugin>
 ---------------
 
-  There are some seldom used parameters, that can only be configured throug
-  this method:
+  The parameter <<hibernateProperties>> (name of the hibernate-properties-file
+  to use, defaults to <<hibernate.properties>>) can only be configured through
+  this approach.
 
 
-    * <<delimiter>> the delimiter used in the generated sql-script
-
-    * <<format>> wether the generated sql-script is formatted, or not
-
-    * <<hibernateProperties>> name of the hibernate-properties-file
-
-    * <<outputFile>> name of the generated sql-script
-
-    * <<target>> create database or generate sql-script or both
-
-    * <<type>> create or drop the database or do both or nothing
-      (just validate the annotation-configuration)
-
-  For explanations, see the
+  For more explanations, see the
   {{{./export-mojo.html} Documentation of the export-Mojo}}.
 
 {Configuration-Method-Precedence}
   {{{./export-mojo.html} Documentation of the export-Mojo}}.
 
 {Configuration-Method-Precedence}
index c918892..6311684 100644 (file)
@@ -3,6 +3,9 @@ A simple Plugin for generating a Database-Schema from Hibernate 4 Mapping-Annota
   <<hibernate4-maven-plugin>> is a plugin for generating a database-schema
   from your Hibernate-4-Mappings and create or update your database
   accordingly.
   <<hibernate4-maven-plugin>> is a plugin for generating a database-schema
   from your Hibernate-4-Mappings and create or update your database
   accordingly.
+  Its main usage is to automatically create and populate a test-database
+  for unit-tests in cooperation with the
+  {{{http://mojo.codehaus.org/dbunit-maven-plugin/} dbunit-maven-plugin}}.
 
   The plugin was designed with three main goals in mind:
 
 
   The plugin was designed with three main goals in mind:
 
index 0640e7f..24909a5 100644 (file)
@@ -5,7 +5,7 @@ Known Pitfalls
   The default-configuration uses the EXPORT-target of the SchemaExport-Tool.
   If you do not need to create a database with the evaluated schema, you can
   use the NONE- or the SCRIPT-target.
   The default-configuration uses the EXPORT-target of the SchemaExport-Tool.
   If you do not need to create a database with the evaluated schema, you can
   use the NONE- or the SCRIPT-target.
-  This can be achieved with the commandline-parameter
+  This can be achieved with the command-line parameter
   <<<-Dhibernate.export.target=SCRIPT>>> or with the following configuration:
 
 ------------
   <<<-Dhibernate.export.target=SCRIPT>>> or with the following configuration:
 
 ------------
@@ -128,27 +128,18 @@ Known Pitfalls
 [INFO] Skipping schema generation!
 -------------
 
 [INFO] Skipping schema generation!
 -------------
 
-  If one always uses <<<mvn clen>>> for cleanup, this will not happen.
+  If one always uses <<<mvn clean>>> for cleanup, this will not happen.
   Otherwise the recreation must be {{{./force.html}forced}}:
 
 -------------
 mvn hibernate4:export -Dhibernate.export.force=true
 -------------
 
   Otherwise the recreation must be {{{./force.html}forced}}:
 
 -------------
 mvn hibernate4:export -Dhibernate.export.force=true
 -------------
 
-* The hibernate4:export goal is executed, even if <<<maven.test.skip>>> is
-  <<<true>>>
+* The hibernate4:export goal is not executed, when tests are skipped
 
 
-  Up to version 1.0.2 the hibernate4-maven-plugin automatically skipped
-  its execution, when <<<maven.test.skip>>> was set to <<<true>>>. Starting
-  with version 1.0.3 this behaviour was changed. The plugin now only skips
-  its execution, when explicitliy told so via the configuration-parameter
-  <<<skip>>> or via the property <<<hibernate.export.skip>>>.
-
-  This change was made, because in some use-cases it is necessary, that the
-  database-schema is always build and/or exported, even if the tests are
-  skipped, which was not possible with the old behaviour.
-
-  If you need/like the old behaviour, you can turn it on in your configuration:
+  The hibernate4-maven-plugin automatically skips its execution, when
+  <<<maven.test.skip>>> is set to <<<true>>>. If you need it to be always
+  executed, you can configure that explicitly like this:
 
 ------------
 <plugin>
 
 ------------
 <plugin>
@@ -156,7 +147,10 @@ mvn hibernate4:export -Dhibernate.export.force=true
   <artifactId>hibernate4-maven-plugin</artifactId>
   ...
   <configuration>
   <artifactId>hibernate4-maven-plugin</artifactId>
   ...
   <configuration>
-    <skip>${maven.test.skip}</skip>
+    <skip>false</skip>
   </configuration>
 </plugin>
 ------------
   </configuration>
 </plugin>
 ------------
+
+  Background-information for this design-decission can be found on the extra
+  page {{{./skip.html}To skip or not to skip: that is the question}}...
\ No newline at end of file
index fcc5932..f54b001 100644 (file)
@@ -21,6 +21,7 @@
       <item name="Configuration Examples" href="configuration.html"/>
       <item name="Parameter Documentation" href="export-mojo.html"/>
       <item name="Enable Debug-Output" href="debugging.html"/>
       <item name="Configuration Examples" href="configuration.html"/>
       <item name="Parameter Documentation" href="export-mojo.html"/>
       <item name="Enable Debug-Output" href="debugging.html"/>
+      <item name="Skipping Execution" href="skip.html"/>
       <item name="Force Exceution" href="force.html"/>
       <item name="Known Pitfalls (FAQ)" href="pitfalls.html"/>
     </menu>
       <item name="Force Exceution" href="force.html"/>
       <item name="Known Pitfalls (FAQ)" href="pitfalls.html"/>
     </menu>