- }
-
- Target target = null;
- try
- {
- target = Target.valueOf(this.target.toUpperCase());
- }
- catch (IllegalArgumentException e)
- {
- getLog().error("Invalid value for configuration-option \"target\": " + this.target);
- getLog().error("Valid values are: NONE, SCRIPT, EXPORT, BOTH");
- throw new MojoExecutionException("Invalid value for configuration-option \"target\"");
- }
- Type type = null;
- try
- {
- type = Type.valueOf(this.type.toUpperCase());
- }
- catch (IllegalArgumentException e)
- {
- getLog().error("Invalid value for configuration-option \"type\": " + this.type);
- getLog().error("Valid values are: NONE, CREATE, DROP, BOTH");
- throw new MojoExecutionException("Invalid value for configuration-option \"type\"");
- }
-
- if (target.equals(Target.SCRIPT) || target.equals(Target.NONE))
- {
- project.getProperties().setProperty(EXPORT_SKIPPED_PROPERTY, "true");
- }
- if (
- !modified
- && !target.equals(Target.SCRIPT)
- && !target.equals(Target.NONE)
- && !force
- )
- {
- getLog().info("No modified annotated classes or mapping-files found and dialect unchanged.");
- getLog().info("Skipping schema generation!");
- project.getProperties().setProperty(EXPORT_SKIPPED_PROPERTY, "true");
- return;
- }
-
- getLog().info("Gathered hibernate-configuration (turn on debugging for details):");
- for (Entry<Object,Object> entry : properties.entrySet())
- getLog().info(" " + entry.getKey() + " = " + entry.getValue());