projects
/
hibernate4-maven-plugin
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No configuration for hibernate.dialect might be a valid configuration too
[hibernate4-maven-plugin]
/
src
/
main
/
java
/
de
/
juplo
/
plugins
/
hibernate4
/
Hbm2DdlMojo.java
diff --git
a/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java
b/src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java
index
f991253
..
5c3b5c7
100644
(file)
--- a/
src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java
+++ b/
src/main/java/de/juplo/plugins/hibernate4/Hbm2DdlMojo.java
@@
-508,10
+508,10
@@
public class Hbm2DdlMojo extends AbstractMojo
getLog().debug(
"Overwriting property " +
PASSWORD + "=" + properties.getProperty(PASSWORD) +
getLog().debug(
"Overwriting property " +
PASSWORD + "=" + properties.getProperty(PASSWORD) +
- " with
the
value " + password
+ " with value " + password
);
else
);
else
- getLog().debug("Using
the value " + password
);
+ getLog().debug("Using
value " + password + " for property " + PASSWORD
);
properties.setProperty(PASSWORD, password);
}
if (hibernateDialect != null)
properties.setProperty(PASSWORD, password);
}
if (hibernateDialect != null)
@@
-520,10
+520,12
@@
public class Hbm2DdlMojo extends AbstractMojo
getLog().debug(
"Overwriting property " +
DIALECT + "=" + properties.getProperty(DIALECT) +
getLog().debug(
"Overwriting property " +
DIALECT + "=" + properties.getProperty(DIALECT) +
- " with
the
value " + hibernateDialect
+ " with value " + hibernateDialect
);
else
);
else
- getLog().debug("Using the value " + hibernateDialect);
+ getLog().debug(
+ "Using value " + hibernateDialect + " for property " + DIALECT
+ );
properties.setProperty(DIALECT, hibernateDialect);
}
if ( hibernateNamingStrategy != null )
properties.setProperty(DIALECT, hibernateDialect);
}
if ( hibernateNamingStrategy != null )
@@
-532,10
+534,13
@@
public class Hbm2DdlMojo extends AbstractMojo
getLog().debug(
"Overwriting property " +
NAMING_STRATEGY + "=" + properties.getProperty(NAMING_STRATEGY) +
getLog().debug(
"Overwriting property " +
NAMING_STRATEGY + "=" + properties.getProperty(NAMING_STRATEGY) +
- " with
the
value " + hibernateNamingStrategy
+ " with value " + hibernateNamingStrategy
);
else
);
else
- getLog().debug("Using the value " + hibernateNamingStrategy);
+ getLog().debug(
+ "Using value " + hibernateNamingStrategy + " for property " +
+ NAMING_STRATEGY
+ );
properties.setProperty(NAMING_STRATEGY, hibernateNamingStrategy);
}
properties.setProperty(NAMING_STRATEGY, hibernateNamingStrategy);
}
@@
-547,15
+552,27
@@
public class Hbm2DdlMojo extends AbstractMojo
getLog().debug("SQL-dialect unchanged.");
else
{
getLog().debug("SQL-dialect unchanged.");
else
{
- getLog().debug("SQL-dialect changed: " + dialect);
modified = true;
modified = true;
- md5s.put(DIALECT, dialect);
+ if (dialect == null)
+ {
+ getLog().debug("SQL-dialect was unset.");
+ md5s.remove(DIALECT);
+ }
+ else
+ {
+ getLog().debug("SQL-dialect changed: " + dialect);
+ md5s.put(DIALECT, dialect);
+ }
}
}
else
{
}
}
else
{
- modified = true;
- md5s.put(DIALECT, properties.getProperty(DIALECT));
+ String dialect = properties.getProperty(DIALECT);
+ if (dialect != null)
+ {
+ modified = true;
+ md5s.put(DIALECT, properties.getProperty(DIALECT));
+ }
}
/** The generated SQL varies with the envers-configuration */
}
/** The generated SQL varies with the envers-configuration */