Author: jeff.yuchang
Date: 2009-04-09 13:00:26 -0400 (Thu, 09 Apr 2009)
New Revision: 435
Added:
idm/trunk/distro/
idm/trunk/distro/build.properties
idm/trunk/distro/build.xml
idm/trunk/distro/config/
idm/trunk/distro/config/hibernate/
idm/trunk/distro/config/hibernate/cfg/
idm/trunk/distro/config/hibernate/cfg/foot.jboss-idm.cfg.xml
idm/trunk/distro/config/hibernate/cfg/head.jboss-idm.cfg.xml
idm/trunk/distro/config/hibernate/cfg/mapping.jboss-idm.cfg.xml
idm/trunk/distro/config/hibernate/datasource/
idm/trunk/distro/config/hibernate/datasource/db2.xml
idm/trunk/distro/config/hibernate/datasource/hsqldb.xml
idm/trunk/distro/config/hibernate/datasource/mysql.xml
idm/trunk/distro/config/hibernate/datasource/oracle.xml
idm/trunk/distro/config/hibernate/datasource/postgresql.xml
idm/trunk/distro/config/hibernate/datasource/sybase.xml
idm/trunk/distro/config/hibernate/jdbc.properties
idm/trunk/distro/config/hibernate/jdbc/
idm/trunk/distro/config/hibernate/jdbc/db2.xml
idm/trunk/distro/config/hibernate/jdbc/hsqldb.url.xml
idm/trunk/distro/config/hibernate/jdbc/hsqldb.xml
idm/trunk/distro/config/hibernate/jdbc/mysql.xml
idm/trunk/distro/config/hibernate/jdbc/oracle.xml
idm/trunk/distro/config/hibernate/jdbc/postgresql.xml
idm/trunk/distro/config/hibernate/jdbc/sybase.xml
idm/trunk/distro/pom.xml
idm/trunk/distro/src/
idm/trunk/distro/src/main/
idm/trunk/distro/src/main/java/
idm/trunk/distro/src/main/resources/
idm/trunk/distro/src/main/resources/META-INF/
idm/trunk/distro/src/main/resources/META-INF/jboss-service.xml
idm/trunk/distro/src/main/resources/jboss-idm-sql/
idm/trunk/distro/src/main/resources/jboss-idm-sql/jboss.idm.hsqldb.create.sql
idm/trunk/distro/src/test/
Log:
[JBID-70] add the initial implementation.
Added: idm/trunk/distro/build.properties
===================================================================
--- idm/trunk/distro/build.properties (rev 0)
+++ idm/trunk/distro/build.properties 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,7 @@
+config.dir=config
+db.scripts.dir=src/main/resources/jboss-idm-sql
+database=hsqldb
+tmp.dir=target/tmp
+
+connection.type=jdbc
+
Added: idm/trunk/distro/build.xml
===================================================================
--- idm/trunk/distro/build.xml (rev 0)
+++ idm/trunk/distro/build.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,75 @@
+<project name="jboss-identity" default="generateDDL"
basedir=".">
+
+ <!-- input properties -->
+ <property file="build.properties" />
+
+ <!-- derived properties -->
+ <property name="resolved.dir" value="${tmp.dir}/resolved" />
+
+ <target name="generateDDL"
depends="create.configuration.files">
+ <delete dir="${db.scripts.dir}" />
+ <mkdir dir="${db.scripts.dir}" />
+ <taskdef name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="maven.compile.classpath"/>
+ <hibernatetool destdir=".">
+ <classpath refid="maven.compile.classpath" />
+ <annotationconfiguration
configurationfile="${config.dir}/hibernate/jboss-idm.hibernate.cfg.xml"/>
+ <hbm2ddl drop="false" create="true"
export="${export}"
+
outputfilename="${db.scripts.dir}/jboss.idm.${database}.create.sql"
delimiter=";" format="true" />
+ </hibernatetool>
+ </target>
+
+ <target name="create.configuration.files"
+ depends="internal.load.hibernate.properties"
+ description="creates a full set of jboss identity configuration
files">
+
+ <delete file="${config.dir}/hibernate/jboss-idm.hibernate.cfg.xml"
/>
+ <concat
destfile="${config.dir}/hibernate/jboss-idm.hibernate.cfg.xml">
+ <filelist dir="${resolved.dir}">
+ <file name="hibernate/cfg/head.jboss-idm.cfg.xml" />
+ <file name="hibernate/${connection.type}/${database}.xml"/>
+ <file name="hibernate/cfg/mapping.jboss-idm.cfg.xml"/>
+ <file name="hibernate/cfg/foot.jboss-idm.cfg.xml"/>
+ </filelist>
+ </concat>
+
+ <echo>Created jboss-idm configuration files in ${config.dir}</echo>
+ </target>
+
+
+ <!-- internal tasks -->
+ <target name="internal.prepare">
+ <delete dir="${tmp.dir}" />
+ <mkdir dir="${resolved.dir}" />
+ <copy todir="${tmp.dir}"
+ file="${config.dir}/hibernate/jdbc.properties"
+ failonerror="false"
+ overwrite="true" />
+ <copy todir="${resolved.dir}" filtering="true">
+ <fileset dir="${config.dir}" />
+ <filterset filtersfile="${tmp.dir}/jdbc.properties">
+ <filter token="jboss.bind.address"
value="${jboss.bind.address}"/>
+ <filter token="jdbc.hsqldb.url"
value="${jdbc.hsqldb.url}" />
+ </filterset>
+ </copy>
+ </target>
+
+ <target name="internal.load.hibernate.properties"
depends="internal.prepare">
+ <copy file="${resolved.dir}/hibernate/jdbc/${database}.xml"
+ tofile="${tmp.dir}/hibernate.properties" />
+ <replace file="${tmp.dir}/hibernate.properties"
+ value="">
+ <replacetoken><![CDATA[ <property
name="]]></replacetoken>
+ </replace>
+ <replace file="${tmp.dir}/hibernate.properties"
+ value="=">
+ <replacetoken><![CDATA[">]]></replacetoken>
+ </replace>
+ <replace file="${tmp.dir}/hibernate.properties"
+ value="">
+ <replacetoken><![CDATA[</property>]]></replacetoken>
+ </replace>
+ <property file="${tmp.dir}/hibernate.properties" />
+ </target>
+
+</project>
Added: idm/trunk/distro/config/hibernate/cfg/foot.jboss-idm.cfg.xml
===================================================================
--- idm/trunk/distro/config/hibernate/cfg/foot.jboss-idm.cfg.xml
(rev 0)
+++ idm/trunk/distro/config/hibernate/cfg/foot.jboss-idm.cfg.xml 2009-04-09 17:00:26 UTC
(rev 435)
@@ -0,0 +1,3 @@
+
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file
Added: idm/trunk/distro/config/hibernate/cfg/head.jboss-idm.cfg.xml
===================================================================
--- idm/trunk/distro/config/hibernate/cfg/head.jboss-idm.cfg.xml
(rev 0)
+++ idm/trunk/distro/config/hibernate/cfg/head.jboss-idm.cfg.xml 2009-04-09 17:00:26 UTC
(rev 435)
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="show_sql">false</property>
+ <property
name="cache.use_second_level_cache">true</property>
+ <property name="cache.use_query_cache">false</property>
+
+ <property
name="current_session_context_class">thread</property>
+
+
Added: idm/trunk/distro/config/hibernate/cfg/mapping.jboss-idm.cfg.xml
===================================================================
--- idm/trunk/distro/config/hibernate/cfg/mapping.jboss-idm.cfg.xml
(rev 0)
+++ idm/trunk/distro/config/hibernate/cfg/mapping.jboss-idm.cfg.xml 2009-04-09 17:00:26
UTC (rev 435)
@@ -0,0 +1,17 @@
+
+
+ <!-- Mapping classes -->
+ <!-- all nessesary mappings are added programatically to the configuration in
the store-->
+ <!-- this is for manual SF creation-->
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateRealm"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObject"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredential"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectTextAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectBinaryAttribute"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"/>
+ <mapping
class="org.jboss.identity.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"/>
+
Added: idm/trunk/distro/config/hibernate/datasource/db2.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/db2.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/datasource/db2.xml 2009-04-09 17:00:26 UTC (rev
435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
+ <property
name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property
name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property
name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/hsqldb.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/hsqldb.xml (rev
0)
+++ idm/trunk/distro/config/hibernate/datasource/hsqldb.xml 2009-04-09 17:00:26 UTC (rev
435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property
name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property
name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property
name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/mysql.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/mysql.xml (rev
0)
+++ idm/trunk/distro/config/hibernate/datasource/mysql.xml 2009-04-09 17:00:26 UTC (rev
435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
+ <property
name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property
name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property
name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/oracle.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/oracle.xml (rev
0)
+++ idm/trunk/distro/config/hibernate/datasource/oracle.xml 2009-04-09 17:00:26 UTC (rev
435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
+ <property
name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property
name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property
name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/postgresql.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/postgresql.xml
(rev 0)
+++ idm/trunk/distro/config/hibernate/datasource/postgresql.xml 2009-04-09 17:00:26 UTC
(rev 435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ <property
name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property
name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property
name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/datasource/sybase.xml
===================================================================
--- idm/trunk/distro/config/hibernate/datasource/sybase.xml (rev
0)
+++ idm/trunk/distro/config/hibernate/datasource/sybase.xml 2009-04-09 17:00:26 UTC (rev
435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
+ <property
name="hibernate.connection.datasource">java:JbossIdm</property>
+ <property
name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
+ <property
name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
+ <property
name="jta.UserTransaction">UserTransaction</property>
Added: idm/trunk/distro/config/hibernate/jdbc/db2.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/db2.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/db2.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
+ <property
name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
+ <property
name="hibernate.connection.url">@jdbc.db2.url(a)</property>
+ <property
name="hibernate.connection.username">@jdbc.db2.username(a)</property>
+ <property
name="hibernate.connection.password">@jdbc.db2.password(a)</property>
Added: idm/trunk/distro/config/hibernate/jdbc/hsqldb.url.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/hsqldb.url.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/hsqldb.url.xml 2009-04-09 17:00:26 UTC (rev
435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property
name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property
name="hibernate.connection.url">@jdbc.hsqldb.url(a)</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
Added: idm/trunk/distro/config/hibernate/jdbc/hsqldb.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/hsqldb.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/hsqldb.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
+ <property
name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+ <property
name="hibernate.connection.url">jdbc:hsqldb:mem:.</property>
+ <property name="hibernate.connection.username">sa</property>
+ <property name="hibernate.connection.password"></property>
Added: idm/trunk/distro/config/hibernate/jdbc/mysql.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/mysql.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/mysql.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
+ <property
name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
+ <property
name="hibernate.connection.url">jdbc:mysql://@jdbc.mysql.server@:@jdbc.mysql.port@/@jdbc.mysql.database@</property>
+ <property
name="hibernate.connection.username">@jdbc.mysql.username(a)</property>
+ <property
name="hibernate.connection.password">@jdbc.mysql.password(a)</property>
\ No newline at end of file
Added: idm/trunk/distro/config/hibernate/jdbc/oracle.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/oracle.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/oracle.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,6 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
+ <property
name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
+ <property
name="hibernate.connection.url">jdbc:oracle:thin:@@jdbc.oracle.server@:@jdbc.oracle.port@:@jdbc.oracle.database@</property>
+ <property
name="hibernate.connection.username">@jdbc.oracle.username(a)</property>
+ <property
name="hibernate.connection.password">@jdbc.oracle.password(a)</property>
+ <property name="hibernate.query.substitutions">true 1, false
0</property>
Added: idm/trunk/distro/config/hibernate/jdbc/postgresql.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/postgresql.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/postgresql.xml 2009-04-09 17:00:26 UTC (rev
435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ <property
name="hibernate.connection.driver_class">org.postgresql.Driver</property>
+ <property
name="hibernate.connection.url">@jdbc.postgresql.url(a)</property>
+ <property
name="hibernate.connection.username">@jdbc.postgresql.username(a)</property>
+ <property
name="hibernate.connection.password">@jdbc.postgresql.password(a)</property>
Added: idm/trunk/distro/config/hibernate/jdbc/sybase.xml
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc/sybase.xml (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc/sybase.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,5 @@
+ <property
name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
+ <property
name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
+ <property
name="hibernate.connection.url">@jdbc.sybase.url(a)</property>
+ <property
name="hibernate.connection.username">@jdbc.sybase.username(a)</property>
+ <property
name="hibernate.connection.password">@jdbc.sybase.password(a)</property>
\ No newline at end of file
Added: idm/trunk/distro/config/hibernate/jdbc.properties
===================================================================
--- idm/trunk/distro/config/hibernate/jdbc.properties (rev 0)
+++ idm/trunk/distro/config/hibernate/jdbc.properties 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,29 @@
+jdbc.mysql.server=localhost
+jdbc.mysql.port=3306
+jdbc.mysql.database=jbossIdm
+jdbc.mysql.url=jdbc:mysql://${jdbc.mysql.server}:${jdbc.mysql.port}/${jdbc.mysql.database}
+jdbc.mysql.username=jbossIdm
+jdbc.mysql.password=
+
+jdbc.postgresql.server=localhost
+jdbc.postgresql.port=5432
+jdbc.postgresql.database=jbossIdm
+jdbc.postgresql.url=jdbc:postgresql://${jdbc.postgresql.server}:${jdbc.postgresql.port}/${jdbc.postgresql.database}
+jdbc.postgresql.username=jbossIdm
+jdbc.postgresql.password=
+
+jdbc.sybase.server=localhost
+jdbc.sybase.port=5000
+jdbc.sybase.database=jbossIdm
+jdbc.sybase.url=jdbc:sybase:Tds:${jdbc.sybase.server}:${jdbc.sybase.port}/${jdbc.sybase.database}
+jdbc.sybase.username=jbossIdm
+jdbc.sybase.password=jbossIdm
+jdbc.sybase.driver=com.sybase.jdbc3.jdbc.SybDriver
+jdbc.sybase.datasource=com.sybase.jdbc3.jdbc.SybXADataSource
+
+jdbc.oracle.server=localhost
+jdbc.oracle.port=1521
+jdbc.oracle.database=XE
+jdbc.oracle.username=jbossIdm
+jdbc.oracle.password=jbossIdm
+jdbc.oracle.url=jdbc:oracle:thin:${jdbc.oracle.username}/${jdbc.oracle.password}@${jdbc.oracle.server}:${jdbc.oracle.port}:${jdbc.oracle.database}
Added: idm/trunk/distro/pom.xml
===================================================================
--- idm/trunk/distro/pom.xml (rev 0)
+++ idm/trunk/distro/pom.xml 2009-04-09 17:00:26 UTC (rev 435)
@@ -0,0 +1,85 @@
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>distro</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jboss-sar</packaging>
+ <name>JBoss Identity IDM Distro </name>
+
+ <parent>
+ <groupId>org.jboss.identity</groupId>
+ <artifactId>idm-parent</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <relativePath>../parent</relativePath>
+ </parent>
+
+ <properties>
+ <hibernate-commons-annotations>3.0.0.ga</hibernate-commons-annotations>
+ <hibernate-tools-version>3.2.0.ga</hibernate-tools-version>
+ <hsqldb-version>1.8.0.7</hsqldb-version>
+ <idm.version>1.0.0.Alpha3</idm.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.identity</groupId>
+ <artifactId>idm</artifactId>
+ <version>${idm.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ <version>${hibernate-commons-annotations}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-tools</artifactId>
+ <version>${hibernate-tools-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>${hsqldb-version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>jboss-identity</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-ddl</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="${basedir}/build.xml"
inheritRefs="true">
+ <target name="generateDDL" />
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.0-beta-1</version>
+ <extensions>true</extensions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
+
Added: idm/trunk/distro/src/main/resources/META-INF/jboss-service.xml
===================================================================
--- idm/trunk/distro/src/main/resources/META-INF/jboss-service.xml
(rev 0)
+++ idm/trunk/distro/src/main/resources/META-INF/jboss-service.xml 2009-04-09 17:00:26 UTC
(rev 435)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+</server>
\ No newline at end of file
Added: idm/trunk/distro/src/main/resources/jboss-idm-sql/jboss.idm.hsqldb.create.sql
===================================================================
--- idm/trunk/distro/src/main/resources/jboss-idm-sql/jboss.idm.hsqldb.create.sql
(rev 0)
+++
idm/trunk/distro/src/main/resources/jboss-idm-sql/jboss.idm.hsqldb.create.sql 2009-04-09
17:00:26 UTC (rev 435)
@@ -0,0 +1,218 @@
+
+ create table identity_obj (
+ id bigint generated by default as identity (start with 1),
+ NAME varchar(255) not null,
+ IDENTITY_TYPE bigint not null,
+ REALM bigint not null,
+ primary key (id),
+ unique (NAME, IDENTITY_TYPE, REALM)
+ );
+
+ create table identity_obj_attrs (
+ ATTRIBUTE_ID bigint generated by default as identity (start with 1),
+ NAME varchar(255),
+ IDENTITY_OBJECT_ID bigint not null,
+ primary key (ATTRIBUTE_ID),
+ unique (NAME, IDENTITY_OBJECT_ID)
+ );
+
+ create table identity_obj_attrs_binary (
+ ATTRIBUTE_ID bigint not null,
+ primary key (ATTRIBUTE_ID)
+ );
+
+ create table identity_obj_attrs_binary_values (
+ identity_obj_attrs_binary_ATTRIBUTE_ID bigint not null,
+ element varbinary(255)
+ );
+
+ create table identity_obj_attrs_text (
+ ATTRIBUTE_ID bigint not null,
+ primary key (ATTRIBUTE_ID)
+ );
+
+ create table identity_obj_attrs_text_values (
+ identity_obj_attrs_text_ATTRIBUTE_ID bigint not null,
+ element varchar(255)
+ );
+
+ create table identity_obj_credential (
+ id bigint generated by default as identity (start with 1),
+ BINARY varbinary(255),
+ TEXT varchar(255),
+ IDENTITY_ID bigint not null,
+ IDENTITY_TYPE bigint not null,
+ primary key (id),
+ unique (IDENTITY_TYPE, IDENTITY_ID)
+ );
+
+ create table identity_obj_credential_properties (
+ CREDENTIAL_ID bigint not null,
+ PROPERTY varchar(255),
+ mapkey varchar(255),
+ primary key (CREDENTIAL_ID, mapkey)
+ );
+
+ create table identity_obj_credential_type (
+ id bigint generated by default as identity (start with 1),
+ NAME varchar(255),
+ primary key (id),
+ unique (NAME)
+ );
+
+ create table identity_obj_identity_obj_credential (
+ identity_obj_id bigint not null,
+ credentials_id bigint not null,
+ mapkey varchar(255),
+ primary key (identity_obj_id, mapkey),
+ unique (credentials_id)
+ );
+
+ create table identity_obj_properties (
+ IDENTITY_OBJ_ID bigint not null,
+ PROPERTY varchar(255),
+ mapkey varchar(255),
+ primary key (IDENTITY_OBJ_ID, mapkey)
+ );
+
+ create table identity_obj_type (
+ id bigint generated by default as identity (start with 1),
+ name varchar(255) not null,
+ primary key (id),
+ unique (name)
+ );
+
+ create table identity_realm (
+ id bigint generated by default as identity (start with 1),
+ NAME varchar(255) not null,
+ primary key (id),
+ unique (NAME)
+ );
+
+ create table identity_realm_properties (
+ REALM_ID bigint not null,
+ PROPERTY varchar(255),
+ mapkey varchar(255),
+ primary key (REALM_ID, mapkey)
+ );
+
+ create table identity_relationship (
+ id bigint generated by default as identity (start with 1),
+ FROM_IDENTITY bigint not null,
+ NAME bigint,
+ TO_IDENTITY bigint not null,
+ TYPE bigint not null,
+ primary key (id),
+ unique (NAME, TYPE, FROM_IDENTITY, TO_IDENTITY)
+ );
+
+ create table identity_relationship_name (
+ id bigint generated by default as identity (start with 1),
+ NAME varchar(255) not null,
+ REALM bigint not null,
+ primary key (id),
+ unique (NAME, REALM),
+ unique (NAME)
+ );
+
+ create table identity_relationship_type (
+ id bigint generated by default as identity (start with 1),
+ name varchar(255) not null,
+ primary key (id),
+ unique (name)
+ );
+
+ alter table identity_obj
+ add constraint FKF8D2BDF6842CE3F0
+ foreign key (REALM)
+ references identity_realm;
+
+ alter table identity_obj
+ add constraint FKF8D2BDF6DA527B00
+ foreign key (IDENTITY_TYPE)
+ references identity_obj_type;
+
+ alter table identity_obj_attrs
+ add constraint FK9F7B519BFDBFEE5
+ foreign key (IDENTITY_OBJECT_ID)
+ references identity_obj;
+
+ alter table identity_obj_attrs_binary
+ add constraint FKCA8615E7D110A16F
+ foreign key (ATTRIBUTE_ID)
+ references identity_obj_attrs;
+
+ alter table identity_obj_attrs_binary_values
+ add constraint FK17ED627A689A8E06
+ foreign key (identity_obj_attrs_binary_ATTRIBUTE_ID)
+ references identity_obj_attrs_binary;
+
+ alter table identity_obj_attrs_text
+ add constraint FKA5AB9093D110A16F
+ foreign key (ATTRIBUTE_ID)
+ references identity_obj_attrs;
+
+ alter table identity_obj_attrs_text_values
+ add constraint FK73D4CE4EE52BFC6E
+ foreign key (identity_obj_attrs_text_ATTRIBUTE_ID)
+ references identity_obj_attrs_text;
+
+ alter table identity_obj_credential
+ add constraint FK53DC4A40B7A4FA37
+ foreign key (IDENTITY_TYPE)
+ references identity_obj_credential_type;
+
+ alter table identity_obj_credential
+ add constraint FK53DC4A40FDE4B747
+ foreign key (IDENTITY_ID)
+ references identity_obj;
+
+ alter table identity_obj_credential_properties
+ add constraint FK3A86B092DF01FC5
+ foreign key (CREDENTIAL_ID)
+ references identity_obj_credential;
+
+ alter table identity_obj_identity_obj_credential
+ add constraint FKAA860AF77FD4BF0F
+ foreign key (identity_obj_id)
+ references identity_obj;
+
+ alter table identity_obj_identity_obj_credential
+ add constraint FKAA860AF7AE83A700
+ foreign key (credentials_id)
+ references identity_obj_credential;
+
+ alter table identity_obj_properties
+ add constraint FK4565EF1C7FD4BF0F
+ foreign key (IDENTITY_OBJ_ID)
+ references identity_obj;
+
+ alter table identity_realm_properties
+ add constraint FKE679EE444A7D622C
+ foreign key (REALM_ID)
+ references identity_realm;
+
+ alter table identity_relationship
+ add constraint FK3EED1419D5BB51F7
+ foreign key (TYPE)
+ references identity_relationship_type;
+
+ alter table identity_relationship
+ add constraint FK3EED1419D5B52899
+ foreign key (NAME)
+ references identity_relationship_name;
+
+ alter table identity_relationship
+ add constraint FK3EED1419B097E0BE
+ foreign key (FROM_IDENTITY)
+ references identity_obj;
+
+ alter table identity_relationship
+ add constraint FK3EED1419C52050D
+ foreign key (TO_IDENTITY)
+ references identity_obj;
+
+ alter table identity_relationship_name
+ add constraint FK5E36C6F1842CE3F0
+ foreign key (REALM)
+ references identity_realm;