X-Git-Url: https://juplo.de/gitweb/?p=hibernate4-maven-plugin;a=blobdiff_plain;f=src%2Fsite%2Fxhtml%2Fconfiguration.xhtml;h=e8c5afd592af9b47d6386318ab06904108bcf02c;hp=bfaf6fece527682180c85c6ba7ddfb65949dfca8;hb=4940080670944a15916c68fb294e18a6bfef12d5;hpb=64900890db2575b7a28790c5e4d5f45083ee94b3 diff --git a/src/site/xhtml/configuration.xhtml b/src/site/xhtml/configuration.xhtml index bfaf6fec..e8c5afd5 100644 --- a/src/site/xhtml/configuration.xhtml +++ b/src/site/xhtml/configuration.xhtml @@ -19,7 +19,7 @@
<plugin> <groupId>de.juplo</groupId> - <artifactId>hibernate4-maven-plugin</artifactId> + <artifactId>hibernate-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> @@ -33,19 +33,20 @@ But be aware, that in this case the database-url, that is build in the application is the same that is used while testing, where the database is droped and recreated by the plugin. + Because of that, - So, you should never fire up this configuration on your production + you should never fire up this configuration on your production system, or your database might be erased!- Hence, you should specify a different url for testing like in the + A better approach is, to specify a different url for testing like in the following snippet:
<plugin> <groupId>de.juplo</groupId> - <artifactId>hibernate4-maven-plugin</artifactId> + <artifactId>hibernate-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> @@ -108,7 +109,7 @@ <plugin> <groupId>de.juplo</groupId> - <artifactId>hibernate4-maven-plugin</artifactId> + <artifactId>hibernate-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> @@ -129,8 +130,8 @@ The relevant configuration-parameters are:
driverClassName
hibernateDialect
driver
dialect
url
username
password
<plugin> <groupId>de.juplo</groupId> - <artifactId>hibernate4-maven-plugin</artifactId> + <artifactId>hibernate-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution> @@ -152,8 +153,8 @@ </execution> </executions> <configuration> - <driverClassName>org.hsqldb.jdbcDriver</driverClassName> - <hibernateDialect>org.hibernate.dialect.HSQLDialect</hibernateDialect> + <driver>org.hsqldb.jdbcDriver</driver> + <dialect>org.hibernate.dialect.HSQLDialect</dialect> <url><![CDATA[jdbc:hsqldb:target/db/fotos;shutdown=true]]></url> <username>sa</username> <password></password> @@ -174,12 +175,14 @@
- +
hibernate.properties
- +
hibernate.cfg.xml
persistence.xml
- maven-properties
- plugin-configuration
If you are in doubt about where a configuration-value comes from, run - maven with the debug-output enabled:
@@ -190,13 +193,13 @@ other configuration-method.mvn -X hibernate4:export
+ maven with the debug-output enabled:mvn -X hibernate:export
and be aware, that maven-properties can be overwitten on the command-line, in your~/.m2/settings.xml
and in a profile.- If you realy need to overwrite plugin-configuration-values with + If you need to overwrite plugin-configuration-values with maven-properties, you can use maven-properties in the plugin-configuration:
<plugin> <groupId>de.juplo</groupId> - <artifactId>hibernate4-maven-plugin</artifactId> + <artifactId>hibernate-maven-plugin</artifactId> <version>${project.version}</version> <executions> <execution>