MPHIBERNATE-13: added hibernate:schema-update
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116209 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d2d03e0de4
commit
081fb5be42
@ -54,6 +54,20 @@
|
||||
includes="${maven.hibernate.input.includes}"
|
||||
excludes="${maven.hibernate.input.excludes}"/>
|
||||
</goal>
|
||||
|
||||
<goal name="hibernate:schema-update" prereqs="hibernate:init" description="Update Hibernate schema">
|
||||
|
||||
<ant:echo>Updating database schema</ant:echo>
|
||||
|
||||
<h:schema-update
|
||||
properties="${maven.hibernate.properties}"
|
||||
config="${maven.hibernate.config}"
|
||||
quiet="${maven.hibernate.quiet}"
|
||||
text="${maven.hibernate.text}"
|
||||
basedir="${maven.hibernate.input.dir}"
|
||||
includes="${maven.hibernate.input.includes}"
|
||||
excludes="${maven.hibernate.input.excludes}"/>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ import org.apache.commons.jelly.tags.core.CoreTagLibrary;
|
||||
* Hibernate tag library.
|
||||
*
|
||||
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
|
||||
* @version $Id: HibernateTagLibrary.java,v 1.3 2004/07/02 07:32:52 epugh Exp $
|
||||
* @version $Id: HibernateTagLibrary.java,v 1.4 2004/11/06 21:52:23 felipeal Exp $
|
||||
*/
|
||||
public class HibernateTagLibrary extends CoreTagLibrary
|
||||
{
|
||||
@ -35,6 +35,7 @@ public class HibernateTagLibrary extends CoreTagLibrary
|
||||
public HibernateTagLibrary()
|
||||
{
|
||||
registerTag( "schema-export", SchemaExportTag.class );
|
||||
registerTag( "schema-update", SchemaUpdateTag.class );
|
||||
registerTag( "aggregate-mappings", AggregateMappingsTag.class );
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,9 +22,13 @@
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:x="jelly:xml">
|
||||
|
||||
<goal name="testPlugin" prereqs="test-hibernate-schema-export-properties,test-hibernate-schema-export-configuration,test-hibernate-aggregate-mappings">
|
||||
<goal name="testPlugin" prereqs="testSchemaExport,testSchemaUpdate,testAggregate">
|
||||
<attainGoal name="clean"/>
|
||||
</goal>
|
||||
|
||||
<goal name="testSchemaExport" prereqs="test-hibernate-schema-export-properties,test-hibernate-schema-export-configuration"/>
|
||||
<goal name="testSchemaUpdate" prereqs="test-hibernate-schema-update-properties,test-hibernate-schema-update-configuration"/>
|
||||
<goal name="testAggregate" prereqs="test-hibernate-aggregate-mappings"/>
|
||||
|
||||
<goal name="test-hibernate-schema-export-properties">
|
||||
<j:set var="maven.hibernate.properties" value="${basedir}/src/main/hibernate.properties" />
|
||||
@ -46,6 +50,27 @@
|
||||
|
||||
</goal>
|
||||
|
||||
<goal name="test-hibernate-schema-update-properties">
|
||||
<j:set var="maven.hibernate.properties" value="${basedir}/src/main/hibernate.properties" />
|
||||
<attainGoal name="clean"/>
|
||||
<attainGoal name="jar"/>
|
||||
<attainGoal name="hibernate:schema-update"/>
|
||||
|
||||
<!-- unfortunately goal does not generate a file output, so we cannot assert anything -->
|
||||
|
||||
</goal>
|
||||
|
||||
<goal name="test-hibernate-schema-update-configuration">
|
||||
<j:set var="maven.hibernate.config" value="${basedir}/target/classes/hibernate.cfg.xml" />
|
||||
<attainGoal name="clean"/>
|
||||
<attainGoal name="jar"/>
|
||||
<attainGoal name="hibernate:schema-update"/>
|
||||
|
||||
<!-- unfortunately goal does not generate a file output, so we cannot assert anything -->
|
||||
|
||||
</goal>
|
||||
|
||||
|
||||
<goal name="test-hibernate-aggregate-mappings">
|
||||
<j:if test="${maven.mode.online}">
|
||||
<j:set var="maven.hibernate.input.dir" value="${maven.build.dest},${basedir}/src/etc" />
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.3" date="in cvs">
|
||||
<action dev="felipeal" type="add" issue="MPHIBERNATE-13">Added new goal <code>hibernate:schema-update</code></action>
|
||||
<action dev="epugh" type="fix" issue="MPHIBERNATE-9">plugin:test fails without a network connection</action>
|
||||
</release>
|
||||
<release version="1.2" date="2004-08-14">
|
||||
|
||||
@ -33,7 +33,14 @@
|
||||
<tr>
|
||||
<td>hibernate:schema-export</td>
|
||||
<td>
|
||||
Creates SQL DDL file from set of *.hbm.xml files
|
||||
Creates SQL DDL file and generates the database schema from set of *.hbm.xml files
|
||||
</td>
|
||||
</tr>
|
||||
<a name="hibernate:schema-update" />
|
||||
<tr>
|
||||
<td>hibernate:schema-update</td>
|
||||
<td>
|
||||
Updates the database schema based on the set of *.hbm.xml files
|
||||
</td>
|
||||
</tr>
|
||||
<a name="hibernate:aggregate-mappings" />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user