projects
/
hibernate4-maven-plugin
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated documentation
[hibernate4-maven-plugin]
/
src
/
main
/
java
/
de
/
juplo
/
plugins
/
hibernate
/
AbstractSchemaMojo.java
diff --git
a/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java
b/src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java
index
2295968
..
d4386eb
100644
(file)
--- a/
src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java
+++ b/
src/main/java/de/juplo/plugins/hibernate/AbstractSchemaMojo.java
@@
-136,7
+136,7
@@
public abstract class AbstractSchemaMojo extends AbstractMojo
* If set to <code>true</code>, the execution is skipped.
* <p>
* A skipped execution is signaled via the maven-property
* If set to <code>true</code>, the execution is skipped.
* <p>
* A skipped execution is signaled via the maven-property
- * <code>${hibernate.
export
.skipped}</code>.
+ * <code>${hibernate.
schema
.skipped}</code>.
* <p>
* The execution is skipped automatically, if no modified or newly added
* annotated classes are found and the dialect was not changed.
* <p>
* The execution is skipped automatically, if no modified or newly added
* annotated classes are found and the dialect was not changed.
@@
-641,6
+641,21
@@
public abstract class AbstractSchemaMojo extends AbstractMojo
thread.setContextClassLoader(contextClassLoader);
}
}
thread.setContextClassLoader(contextClassLoader);
}
}
+ catch (MojoExecutionException e)
+ {
+ tracker.failed();
+ throw e;
+ }
+ catch (MojoFailureException e)
+ {
+ tracker.failed();
+ throw e;
+ }
+ catch (RuntimeException e)
+ {
+ tracker.failed();
+ throw e;
+ }
finally
{
/** Remember mappings and configuration */
finally
{
/** Remember mappings and configuration */
@@
-1066,8
+1081,10
@@
public abstract class AbstractSchemaMojo extends AbstractMojo
packageName = name;
}
packageName = name;
}
-
if (!packages.contains(packageName)
)
+
while (packageName != null
)
{
{
+ if (packages.contains(packageName))
+ return;
String resource = packageName.replace('.', '/') + "/package-info.class";
InputStream is = classLoaderService.locateResourceStream(resource);
if (is == null)
String resource = packageName.replace('.', '/') + "/package-info.class";
InputStream is = classLoaderService.locateResourceStream(resource);
if (is == null)
@@
-1085,6
+1102,11
@@
public abstract class AbstractSchemaMojo extends AbstractMojo
sources.addPackage(packageName);
}
packages.add(packageName);
sources.addPackage(packageName);
}
packages.add(packageName);
+ int i = packageName.lastIndexOf('.');
+ if (i < 0)
+ packageName = null;
+ else
+ packageName = packageName.substring(0,i);
}
}
catch (Exception e)
}
}
catch (Exception e)