Author: jeff.yuchang
Date: 2009-12-21 23:43:43 -0500 (Mon, 21 Dec 2009)
New Revision: 431
Added:
branches/ODE/ODE-2.0-maven/dao-hibernate-db/build.xml
branches/ODE/ODE-2.0-maven/dao-hibernate-db/pom.xml
Modified:
branches/ODE/ODE-2.0-maven/pom.xml
Log:
* add pom for dao-hibernate-db module.
Added: branches/ODE/ODE-2.0-maven/dao-hibernate-db/build.xml
===================================================================
--- branches/ODE/ODE-2.0-maven/dao-hibernate-db/build.xml (rev 0)
+++ branches/ODE/ODE-2.0-maven/dao-hibernate-db/build.xml 2009-12-22 04:43:43 UTC (rev
431)
@@ -0,0 +1,97 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~
http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<project>
+
+ <property name="db.scripts.dir" value="${basedir}/target" />
+ <property name="sql.dir" value="${basedir}/src/main/sql"/>
+ <property name="dao-hibernate.classes"
value="${basedir}/../dao-hibernate/target/classes" />
+ <property name="bpel-store.classes"
value="${basedir}/../bpel-store/target/classes" />
+
+ <path id="classpath">
+ <pathelement path="${maven.runtime.classpath}"/>
+ </path>
+
+ <target name="create-schema">
+
+ <taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
+ classpathref="classpath"/>
+
+ <mkdir dir="target"/>
+ <mkdir dir="${db.scripts.dir}" />
+
+ <!-- MySQL -->
+ <create-ddl db="mysql"/>
+
+ <!-- Oracle -->
+ <create-ddl db="oracle"/>
+
+ <!-- PostgreSQL -->
+ <create-ddl db="postgres"/>
+
+ <!-- Sybase -->
+ <create-ddl db="hsql" />
+
+ <!-- MSSQL -->
+ <create-ddl db="sqlserver" />
+
+ <!-- Firebird -->
+ <create-ddl db="firebird" />
+
+ </target>
+
+ <!--
+ ============================================
+ Macro defs, no need to change anything below
+ ============================================
+ -->
+
+ <macrodef name="create-ddl">
+ <attribute name="db"/>
+
+ <sequential>
+ <echo></echo>
+ <echo>=====================</echo>
+ <echo>Create DDL @{db}</echo>
+ <schemaexport
+ properties="${sql.dir}/ode.(a){db}.properties"
+ quiet="yes"
+ text="yes"
+ drop="no"
+ delimiter=";"
+ output="${db.scripts.dir}/partial.(a){db}.sql">
+ <fileset dir="${dao-hibernate.classes}/">
+ <include name="**/*.hbm.xml"/>
+ <exclude name="**/HMessageExchangeProperty.hbm.xml"
/>
+ </fileset>
+ <fileset dir="${bpel-store.classes}/">
+ <include name="**/*.hbm.xml"/>
+ </fileset>
+ </schemaexport>
+ <concat destfile="${db.scripts.dir}/(a){db}.sql">
+ <fileset file="${sql.dir}/simplesched-(a){db}.sql"/>
+ <fileset file="${db.scripts.dir}/partial.(a){db}.sql"/>
+ </concat>
+ <echo>Done.</echo>
+ <echo>=====================</echo>
+ </sequential>
+ </macrodef>
+
+</project>
+
Added: branches/ODE/ODE-2.0-maven/dao-hibernate-db/pom.xml
===================================================================
--- branches/ODE/ODE-2.0-maven/dao-hibernate-db/pom.xml (rev 0)
+++ branches/ODE/ODE-2.0-maven/dao-hibernate-db/pom.xml 2009-12-22 04:43:43 UTC (rev 431)
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~
http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.ode</groupId>
+ <artifactId>ode-dao-hibernate-db</artifactId>
+ <name>ODE :: Hibernate DAO DDL Generation</name>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.apache.ode</groupId>
+ <artifactId>ode</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>schemagen</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <tasks>
+ <property name="maven.runtime.classpath"
refid="maven.compile.classpath"/>
+ <ant antfile="build.xml" target="create-schema"
inheritRefs="true"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: branches/ODE/ODE-2.0-maven/pom.xml
===================================================================
--- branches/ODE/ODE-2.0-maven/pom.xml 2009-12-20 11:26:46 UTC (rev 430)
+++ branches/ODE/ODE-2.0-maven/pom.xml 2009-12-22 04:43:43 UTC (rev 431)
@@ -87,8 +87,6 @@
<servicemix.version>3.3</servicemix.version>
<slf4j.version>1.4.3</slf4j.version>
<stax-api.version>1.0</stax-api.version>
- <stax.version>1.1.2-dev</stax.version>
- <xapool.version>1.4</xapool.version>
<xerces.version>2.8.1</xerces.version>
<xmlresolver.version>1.2</xmlresolver.version>
<xmlbeans.version>2.3.0</xmlbeans.version>
@@ -125,7 +123,8 @@
<module>bpel-ql</module>
<module>dao-hibernate</module>
<module>tools</module>
- <!--module>bpel-store</module-->
+ <!--module>bpel-store</module>
+ <module>dao-hibernate-db</module-->
</modules>
<build>