hibernate-schema-plugin

Maven plugin for exporting Hibernate schema

Лицензия

Лицензия

Категории

Категории

Hibernate Данные ORM
Группа

Группа

com.vecna
Идентификатор

Идентификатор

hibernate-schema-plugin
Последняя версия

Последняя версия

2.8
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

hibernate-schema-plugin
Maven plugin for exporting Hibernate schema
Организация-разработчик

Организация-разработчик

Vecna Technologies
Система контроля версий

Система контроля версий

https://github.com/vecnatechnologies/hibernate-schema-plugin

Скачать hibernate-schema-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.vecna</groupId>
    <artifactId>hibernate-schema-plugin</artifactId>
    <version>2.8</version>
</plugin>

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
com.vecna : maven-commons jar 0.0.2
org.hibernate : hibernate-core jar 4.2.6.Final
org.slf4j : slf4j-api jar 1.5.8
com.vecna : dbDiff-hibernate jar 2.2
org.hibernate : hibernate-tools jar 4.0.0-CR1
com.thoughtworks.qdox : qdox jar 1.12

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

Модули Проекта

Данный проект не имеет модулей.

Maven Hibernate Plugin

About

This plugin exports/validates Hibernate schema as part of a Maven build process.

Features

  • Hibernate 4 support
  • Envers support/detection
  • Support for multiple cfg.xml
  • Mapped classes and hbm.xml can be specified in the cfg.xml and/or as plugin properties
  • Hibernate properties can be supplied by one or more .properties files and/or as plugin properties
  • Full schema validation including column types, foreign keys, and indices.

Usage

Specifying the Hibernate configuration is fairly straightforward (see below).

<plugin>
  <groupId>com.vecna</groupId>
  <artifactId>hibernate-schema-plugin</artifactId>
  <configuration>
    <configFiles>
      <configFile>module1.cfg.xml</configFile>
      <configFile>module2.cfg.xml</configFile>
    </configFiles>
    <additionalMappings>
      <additionalMapping>MyClass.hbm.xml</additionalMapping>
    </additionalMappings>
    <additionalClasses>
      <additionalMapping>org.package.MyAnnotatedClass</additionalMapping>
    </additionalClasses>
    <properties>
      <hibernate.connection.url>jdbc:postgresql://localhost/mydb</hibernate.connection.url>
    </properties>
  </configuration>
  <dependencies>
    <dependency>
      <groupId>postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>8.4</version>
    </dependency>
  </dependencies>
</plugin>

Key points are:

  • Specify connection parameters (inline in the POM or via one or more .properties files) and dialect
  • Add the JDBC driver as a plugin dependency (if it's not a project dependency)

Since version 2, this plugin works with Hibernate 4. For Hibernate 3 support, use versions 1.x.

Goals

  • export: export the Hibernate schema into a file and/or a live database
  • validate: validate the Hibernate configuration against a live database
  • update: generate update scripts (this goal is very basic - it runs Hibernate's SchemaExport and only handles new columns)
  • doc: generate schema documentation from javadocs

Credits

Originally developed by Vecna Technologies, Inc. and open sourced as part of its community service program. See the LICENSE file for more details. Vecna Technologies encourages employees to give 10% of their paid working time to community service projects. To learn more about Vecna Technologies, its products and community service programs, please visit http://www.vecna.com.

com.vecna

Vecna Technologies, Inc.

Версии библиотеки

Версия
2.8
2.7
2.6
2.5
2.4
2.3
2.2
2.1
2.0
2.0-RC1
1.3
1.2
1.1
1.0