From e81ddc8283f487669808bee545f9151918e7cc27 Mon Sep 17 00:00:00 2001 From: michal Date: Thu, 15 May 2003 13:06:27 +0000 Subject: [PATCH] Initial import to CVS git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113422 13f79535-47bb-0310-9956-ffa450edef68 --- hibernate/.cvsignore | 3 + hibernate/plugin.jelly | 35 ++ hibernate/plugin.properties | 9 + hibernate/project.properties | 8 + hibernate/project.xml | 140 +++++++ .../hibernate/beans/SchemaExportBean.java | 365 ++++++++++++++++++ .../hibernate/jelly/HibernateTagLibrary.java | 77 ++++ .../hibernate/jelly/SchemaExportTag.java | 253 ++++++++++++ hibernate/xdocs/.cvsignore | 1 + hibernate/xdocs/changes.xml | 16 + hibernate/xdocs/goals.xml | 24 ++ hibernate/xdocs/index.xml | 19 + hibernate/xdocs/navigation.xml | 16 + hibernate/xdocs/properties.xml | 109 ++++++ 14 files changed, 1075 insertions(+) create mode 100644 hibernate/.cvsignore create mode 100644 hibernate/plugin.jelly create mode 100644 hibernate/plugin.properties create mode 100644 hibernate/project.properties create mode 100644 hibernate/project.xml create mode 100644 hibernate/src/main/org/apache/maven/hibernate/beans/SchemaExportBean.java create mode 100644 hibernate/src/main/org/apache/maven/hibernate/jelly/HibernateTagLibrary.java create mode 100644 hibernate/src/main/org/apache/maven/hibernate/jelly/SchemaExportTag.java create mode 100644 hibernate/xdocs/.cvsignore create mode 100644 hibernate/xdocs/changes.xml create mode 100644 hibernate/xdocs/goals.xml create mode 100644 hibernate/xdocs/index.xml create mode 100644 hibernate/xdocs/navigation.xml create mode 100644 hibernate/xdocs/properties.xml diff --git a/hibernate/.cvsignore b/hibernate/.cvsignore new file mode 100644 index 00000000..e5e33942 --- /dev/null +++ b/hibernate/.cvsignore @@ -0,0 +1,3 @@ +target +velocity.log +maven.log diff --git a/hibernate/plugin.jelly b/hibernate/plugin.jelly new file mode 100644 index 00000000..b6fac4e5 --- /dev/null +++ b/hibernate/plugin.jelly @@ -0,0 +1,35 @@ + + +> + + + + + + + + + + Exporting Hibernate Schema file + + + + + + + + + + + diff --git a/hibernate/plugin.properties b/hibernate/plugin.properties new file mode 100644 index 00000000..9fe39650 --- /dev/null +++ b/hibernate/plugin.properties @@ -0,0 +1,9 @@ +#maven.hibernate.properties= +maven.hibernate.quiet=yes +maven.hibernate.text=no +maven.hibernate.drop=no +maven.hibernate.output.dir=${maven.build.dir}/schema +maven.hibernate.output.file=${maven.hibernate.output.dir}/${maven.final.name}-schema.sql +maven.hibernate.input.dir=${maven.build.dest} +maven.hibernate.input.includes=**/*.hbm.xml +maven.hibernate.input.excludes= \ No newline at end of file diff --git a/hibernate/project.properties b/hibernate/project.properties new file mode 100644 index 00000000..56b32125 --- /dev/null +++ b/hibernate/project.properties @@ -0,0 +1,8 @@ +# ------------------------------------------------------------------- +# P R O J E C T P R O P E R T I E S +# ------------------------------------------------------------------- +maven.xdoc.date=left +maven.xdoc.version=${pom.currentVersion} +maven.license.licenseFile=${basedir}/../../../LICENSE.txt +maven.docs.outputencoding=UTF-8 + diff --git a/hibernate/project.xml b/hibernate/project.xml new file mode 100644 index 00000000..b976886a --- /dev/null +++ b/hibernate/project.xml @@ -0,0 +1,140 @@ + + + + ${basedir}/../project.xml + 3 + maven-hibernate-plugin + Maven Hibernate Plug-in + 1.0-SNAPHOT + + Java Project Management Tools + http://maven.apache.org/reference/plugins/hibernate/ + /www/maven.apache.org/reference/plugins/hibernate/ + + scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/hibernate/ + http://cvs.apache.org/viewcvs/maven/src/plugins-build/hibernate/ + + + + Michal Maczka + michal + michal.maczka@dimatics.com + Dimatics + + Java Developer + + +1 + + + + + + + hibernate + hibernate + 2.0-beta-6 + jar + + + + ant + ant + 1.5.1 + jar + + + + commons-jelly + 20030211.141339 + + + + + commons-lang + commons-lang + 1.0.1 + jar + + + + commons-beanutils + commons-beanutils + 1.6 + jar + + + + commons-dbcp + commons-dbcp + 1.0-dev + jar + + + + commons-collections + commons-collections + 2.1 + jar + + + + commons-logging + commons-logging + 1.0.2 + jar + + + + commons-pool + commons-pool + 1.0 + jar + + + + log4j + log4j + 1.2.8 + jar + + + + xerces + xmlParserAPIs + 2.2.1 + http://xml.apache.org/xerces2-j/ + + + + xerces + xerces + 2.3.0 + http://xml.apache.org/xerces2-j/ + + + + odmg + odmg + 3.0 + jar + + + + + dom4j + dom4j + 1.3 + jar + + + + cglib + cglib + 1.0 + jar + + + + + + diff --git a/hibernate/src/main/org/apache/maven/hibernate/beans/SchemaExportBean.java b/hibernate/src/main/org/apache/maven/hibernate/beans/SchemaExportBean.java new file mode 100644 index 00000000..9b5b9930 --- /dev/null +++ b/hibernate/src/main/org/apache/maven/hibernate/beans/SchemaExportBean.java @@ -0,0 +1,365 @@ +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache MavenSession" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache MavenSession", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ +package org.apache.maven.hibernate.beans; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.LinkedList; +import java.util.List; +import java.util.Properties; + +import net.sf.hibernate.HibernateException; +import net.sf.hibernate.cfg.Configuration; +import net.sf.hibernate.tool.hbm2ddl.SchemaExport; + +import org.apache.commons.lang.StringUtils; +import org.apache.tools.ant.DirectoryScanner; + +/** + * + * The Bean which serves as Proxy To Hibernate API + *
+ * + * + * + * @author Michal Maczka + * @version $Id: SchemaExportBean.java,v 1.1 2003/05/15 13:06:27 michal Exp $ + */ +public class SchemaExportBean +{ + + private String includes = null; + private String excludes = null; + private String basedir = null; + private String properties = null; + private String config = null; + private String outputFile = null; + private boolean quiet = false; + private boolean text = false; + private boolean drop = false; + + /** + * @return + */ + public String getIncludes() + { + return includes; + } + + /** + * @return + */ + public String getOutputFile() + { + return outputFile; + } + + /** + * @return + */ + public boolean getQuiet() + { + return quiet; + } + + /** + * @return + */ + public boolean getText() + { + return text; + } + + /** + * @param string + */ + public void setIncludes(String string) + { + includes = string; + } + + /** + * @param string + */ + public void setOutputFile(String string) + { + outputFile = string; + } + + /** + * @param b + */ + public void setQuiet(boolean b) + { + quiet = b; + } + + /** + * @param b + */ + public void setText(boolean b) + { + text = b; + } + + /** + * @return + */ + public String getConfig() + { + return config; + } + + /** + * @return + */ + public String getProperties() + { + return properties; + } + + /** + * @param string + */ + public void setConfig(String string) + { + config = string; + } + + /** + * @param string + */ + public void setProperties(String string) + { + properties = string; + } + + /** + * @return + */ + public String getBasedir() + { + return basedir; + } + + /** + * @return + */ + public boolean isDrop() + { + return drop; + } + + /** + * @return + */ + public String getExcludes() + { + return excludes; + } + + /** + * @param string + */ + public void setBasedir(String string) + { + basedir = string; + } + + /** + * @param b + */ + public void setDrop(boolean b) + { + drop = b; + } + + /** + * @param string + */ + public void setExcludes(String string) + { + excludes = string; + } + + /** + * + * Hibernate requires that + * Java classes (beans) are accesible on the + * classpath. As they are not in plugin classpath + * we have to take care about. + * To assure that we have them visible for plugin + * classloader + * we will make temporay change to context classloader + * which will be restored when method terminates. + * + */ + public void execute() throws Exception + { + + Thread currentThread = Thread.currentThread(); + ClassLoader oldClassLoader = currentThread.getContextClassLoader(); + try + { + + File baseDirFile = new File(getBasedir()); + URL[] urls = { baseDirFile.toURL()}; + System.out.println(urls[0]); + URLClassLoader newClassLoader = + new URLClassLoader(urls, oldClassLoader); + currentThread.setContextClassLoader(newClassLoader); + Configuration cfg = getConfiguration(); + SchemaExport schemaExport = getSchemaExport(cfg); + + if (isDrop()) + { + schemaExport.drop(!getQuiet(), !getText()); + } + else + { + schemaExport.create(!getQuiet(), !getText()); + } + } + finally + { + currentThread.setContextClassLoader(oldClassLoader); + } + } + + /** + * Builds list of files for which will be included + * in the schema. Uses ANT file scanner. + */ + private String[] getFiles() + { + + List files = new LinkedList(); + + DirectoryScanner directoryScanner = new DirectoryScanner(); + directoryScanner.setBasedir(getBasedir()); + + System.out.println("Excludes:" + getExcludes()); + System.out.println("Includes:" + getIncludes()); + System.out.println("Base dir:" + getBasedir()); + + directoryScanner.setExcludes(StringUtils.split(getExcludes(), ",")); + directoryScanner.setIncludes(StringUtils.split(getIncludes(), ",")); + + directoryScanner.scan(); + String[] includesFiles = directoryScanner.getIncludedFiles(); + for (int i = 0; i < includesFiles.length; i++) + { + File file = new File(includesFiles[i]); + if (!file.isFile()) + { + file = new File(directoryScanner.getBasedir(), includesFiles[i]); + } + files.add(file.getAbsolutePath()); + } + String[] retValue = (String[]) files.toArray(new String[0]); + return retValue; + } + + /** + * + */ + private Configuration getConfiguration() throws HibernateException + { + Configuration cfg = new Configuration(); + if (getConfig() != null) + { + cfg.configure(getConfig()); + } + + String[] files = getFiles(); + for (int i = 0; i < files.length; i++) + { + String filename = files[i]; + if (filename.endsWith(".jar")) + { + cfg.addJar(filename); + } + else + { + cfg.addFile(filename); + } + } + return cfg; + } + + private SchemaExport getSchemaExport(Configuration cfg) + throws HibernateException, IOException + { + SchemaExport schemaExport = null; + if (getProperties() == null) + { + schemaExport = new SchemaExport(cfg); + } + else + { + Properties properties = new Properties(); + properties.load(new FileInputStream(getProperties())); + schemaExport = new SchemaExport(cfg, properties); + } + System.out.println("Output file:" + getOutputFile()); + schemaExport.setOutputFile(getOutputFile()); + return schemaExport; + } + +} diff --git a/hibernate/src/main/org/apache/maven/hibernate/jelly/HibernateTagLibrary.java b/hibernate/src/main/org/apache/maven/hibernate/jelly/HibernateTagLibrary.java new file mode 100644 index 00000000..f0623820 --- /dev/null +++ b/hibernate/src/main/org/apache/maven/hibernate/jelly/HibernateTagLibrary.java @@ -0,0 +1,77 @@ +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache MavenSession" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache MavenSession", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ +package org.apache.maven.hibernate.jelly; + +import org.apache.commons.jelly.tags.core.CoreTagLibrary; + + +/** + * Hibernate tag library. + * + * @author Michal Maczka + * @version $Id: HibernateTagLibrary.java,v 1.1 2003/05/15 13:06:26 michal Exp $ + */ +public class HibernateTagLibrary extends CoreTagLibrary +{ + /** + * Create an instance of the {@link HibernateTagLibrary}, registering related + * tag libraries + */ + public HibernateTagLibrary() + { + registerTag( "schema-export", SchemaExportTag.class ); + } +} diff --git a/hibernate/src/main/org/apache/maven/hibernate/jelly/SchemaExportTag.java b/hibernate/src/main/org/apache/maven/hibernate/jelly/SchemaExportTag.java new file mode 100644 index 00000000..9f88fa4e --- /dev/null +++ b/hibernate/src/main/org/apache/maven/hibernate/jelly/SchemaExportTag.java @@ -0,0 +1,253 @@ +/* ==================================================================== + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" and + * "Apache MavenSession" must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * "Apache MavenSession", nor may "Apache" appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * ==================================================================== + */ +package org.apache.maven.hibernate.jelly; + +import org.apache.commons.jelly.JellyTagException; +import org.apache.commons.jelly.TagSupport; +import org.apache.commons.jelly.XMLOutput; +import org.apache.maven.hibernate.beans.SchemaExportBean; + +/** + * + * Jelly tag which delagates all calls + * to {@link SchemaExportBean} + * + * @author Michal Maczka + * @version $Id: SchemaExportTag.java,v 1.1 2003/05/15 13:06:25 michal Exp $ + */ +public class SchemaExportTag extends TagSupport +{ + + private SchemaExportBean bean = new SchemaExportBean(); + + /** + * + */ + protected void execute() throws JellyTagException + { + try + { + bean.execute(); + } + catch (Exception e) + { + String msg = " Schema Export failed"; + throw new JellyTagException(msg, e); + } + + } + + /** + * @see org.apache.commons.jelly.Tag#doTag(org.apache.commons.jelly.XMLOutput) + */ + public void doTag(XMLOutput arg0) throws JellyTagException + { + execute(); + } + + /** + * @return + */ + public boolean getText() + { + return bean.getText(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + public String toString() + { + return bean.toString(); + } + + /** + * @return + */ + public boolean getQuiet() + { + return bean.getQuiet(); + } + + /** + * @param string + */ + public void setExcludes(String string) + { + bean.setExcludes(string); + } + + /** + * @param b + */ + public void setDrop(boolean b) + { + bean.setDrop(b); + } + + /** + * @param string + */ + public void setIncludes(String string) + { + bean.setIncludes(string); + } + + /** + * @return + */ + public String getOutputFile() + { + return bean.getOutputFile(); + } + + /** + * @return + */ + public String getExcludes() + { + return bean.getExcludes(); + } + + /** + * @param string + */ + public void setOutputFile(String string) + { + bean.setOutputFile(string); + } + + /** + * @return + */ + public boolean isDrop() + { + return bean.isDrop(); + } + + /** + * @param string + */ + public void setConfig(String string) + { + bean.setConfig(string); + } + + /** + * @return + */ + public String getIncludes() + { + return bean.getIncludes(); + } + + /** + * @return + */ + public String getBasedir() + { + return bean.getBasedir(); + } + + /** + * @return + */ + public String getProperties() + { + return bean.getProperties(); + } + + /** + * @return + */ + public String getConfig() + { + return bean.getConfig(); + } + + /** + * @param b + */ + public void setText(boolean b) + { + bean.setText(b); + } + + /** + * @param string + */ + public void setBasedir(String string) + { + bean.setBasedir(string); + } + + /** + * @param b + */ + public void setQuiet(boolean b) + { + bean.setQuiet(b); + } + + /** + * @param string + */ + public void setProperties(String string) + { + bean.setProperties(string); + } + +} diff --git a/hibernate/xdocs/.cvsignore b/hibernate/xdocs/.cvsignore new file mode 100644 index 00000000..cb6131bb --- /dev/null +++ b/hibernate/xdocs/.cvsignore @@ -0,0 +1 @@ +stylesheets diff --git a/hibernate/xdocs/changes.xml b/hibernate/xdocs/changes.xml new file mode 100644 index 00000000..8062107d --- /dev/null +++ b/hibernate/xdocs/changes.xml @@ -0,0 +1,16 @@ + + + + Changes + Michal Maczka + + + + + + Initial plugin created + + + + + diff --git a/hibernate/xdocs/goals.xml b/hibernate/xdocs/goals.xml new file mode 100644 index 00000000..aa335cad --- /dev/null +++ b/hibernate/xdocs/goals.xml @@ -0,0 +1,24 @@ + + + + + Hibernate Plugin Goals + Michal Maczka + + + +
+ + + + + + + + +
GoalDescription
hibernate:schma-export + Creates SQL DDL file from set of *.hbm.xml files +
+
+ +
diff --git a/hibernate/xdocs/index.xml b/hibernate/xdocs/index.xml new file mode 100644 index 00000000..3065bef3 --- /dev/null +++ b/hibernate/xdocs/index.xml @@ -0,0 +1,19 @@ + + + + + Maven Hibernate Plug-in + Michal Maczka + + + +
+

+ This plugin provides easy intergration with + Hiberante 2.x for your project. +
+ For the moment the functionality is very limited. +

+
+ + diff --git a/hibernate/xdocs/navigation.xml b/hibernate/xdocs/navigation.xml new file mode 100644 index 00000000..362a6c13 --- /dev/null +++ b/hibernate/xdocs/navigation.xml @@ -0,0 +1,16 @@ + + + + Maven Hibernate Plugin + + + + + + + + + + + + diff --git a/hibernate/xdocs/properties.xml b/hibernate/xdocs/properties.xml new file mode 100644 index 00000000..0286bc44 --- /dev/null +++ b/hibernate/xdocs/properties.xml @@ -0,0 +1,109 @@ + + + + + Hibernate Settings + Michal Maczka + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyOptional?Description
maven.hibernate.propertiesNo + The location of Hibernate configuration file + (Java properties file). This file is also se in the + runtime by Hibernate for confiuraing Hibernate Session, + so it's better to keep it separatly from project's + configuration files like + project.properties etc. +
+ For description of the properties take a look + at Hibernate User Guide +
maven.hibernate.quietYes + Controls verbosity of the plugin. + Default is set to yes +
maven.hibernate.textYes + It defaults to no +
maven.hibernate.dropYes + Indicates... +
+ It defaults to no +
maven.hibernate.output.dirYes + The location of the directory where DDL SQL schema will + be generated by schema-export goal. It defaults to + ${maven.build.dir}/schema +
maven.hibernate.output.fileYes + The name of the file which will be created by schema-export + goal. It defaults to + ${maven.hibernate.output.dir}/${maven.final.name}-schema.sql. +
maven.hibernate.input.dirYes + Used to generate the url value for Gump + Indicates base directory where mapping files. It defaults + to ${maven.build.dest}. +
maven.hibernate.input.includesYes + Comma-separated list of patterns of Hiberante mapping files, + which will be included during generation process. +
+ Note: Files are relative to + ${maven.hibernate.input.dir}. +
+ By defaults all files are included: + **/*.hbm.xml. +
maven.hibernate.input.excludesYes + Comma-separated list of patterns of Hiberante mapping files, + which will be excluded during generation process. +
+ Note: Files are relative to + ${maven.hibernate.input.dir}. +
+ By default no files are excluded. +
+
+ +