Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.kuali.ole</groupId>
        <version>1.5.6.2</version>
        <artifactId>ole-liquibase</artifactId>
    </parent>
    <name>OLE Liquibase Changeset</name>
    <artifactId>ole-liquibase-changeset</artifactId>
    <properties>
        <mysql.liquibase.drop>
            DROP TABLE IF EXISTS DATABASECHANGELOG
            /
            DROP TABLE IF EXISTS DATABASECHANGELOGLOCK
            /
        </mysql.liquibase.drop>
        <mysql.liquibase.create>
            CREATE TABLE DATABASECHANGELOG (ID VARCHAR(63) NOT NULL
            , AUTHOR VARCHAR(63)
            , FILENAME VARCHAR(255)
            , DATEEXECUTED DATETIME NOT NULL
            , ORDEREXECUTED DECIMAL(22,0) NOT NULL
            , EXECTYPE VARCHAR(10) NOT NULL
            , MD5SUM VARCHAR(35)
            , DESCRIPTION VARCHAR(255)
            , COMMENTS VARCHAR(255)
            , TAG VARCHAR(255)
            , LIQUIBASE VARCHAR(20)
            , CONSTRAINT DATABASECHANGELOG_PK PRIMARY KEY(ID,AUTHOR,FILENAME)
            ) ENGINE InnoDB CHARACTER SET utf8 COLLATE utf8_bin
            /
            CREATE TABLE DATABASECHANGELOGLOCK (ID DECIMAL(22,0) NOT NULL
            , LOCKED DECIMAL(1,0) NOT NULL
            , LOCKGRANTED DATETIME
            , LOCKEDBY VARCHAR(255)
            , CONSTRAINT DATABASECHANGELOGLOCK_PK PRIMARY KEY(ID)
            ) ENGINE InnoDB CHARACTER SET utf8 COLLATE utf8_bin
            /

        </mysql.liquibase.create>
        <oracle.liquibase.drop>
            BEGIN EXECUTE IMMEDIATE 'DROP TABLE DATABASECHANGELOG'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -00942 THEN
            RAISE; END IF; END;
            /
            BEGIN EXECUTE IMMEDIATE 'DROP TABLE DATABASECHANGELOGLOCK'; EXCEPTION WHEN OTHERS THEN IF SQLCODE != -00942
            THEN RAISE; END IF; END;
            /
        </oracle.liquibase.drop>
        <oracle.liquibase.create>
            CREATE TABLE DATABASECHANGELOG (ID VARCHAR(63) NOT NULL
            , AUTHOR VARCHAR(63)
            , FILENAME VARCHAR(255)
            , DATEEXECUTED TIMESTAMP NOT NULL
            , ORDEREXECUTED DECIMAL(22,0) NOT NULL
            , EXECTYPE VARCHAR(10) NOT NULL
            , MD5SUM VARCHAR(35)
            , DESCRIPTION VARCHAR(255)
            , COMMENTS VARCHAR(255)
            , TAG VARCHAR(255)
            , LIQUIBASE VARCHAR(20)
            , CONSTRAINT DATABASECHANGELOG_PK PRIMARY KEY(ID,AUTHOR,FILENAME)
            )
            /
            CREATE TABLE DATABASECHANGELOGLOCK (ID DECIMAL(22,0) NOT NULL
            , LOCKED DECIMAL(1,0) NOT NULL
            , LOCKGRANTED TIMESTAMP
            , LOCKEDBY VARCHAR(255)
            , CONSTRAINT DATABASECHANGELOGLOCK_PK PRIMARY KEY(ID)
            )
            /
        </oracle.liquibase.create>
        <liquibase.insert>
            INSERT INTO DATABASECHANGELOGLOCK (ID,LOCKED) VALUES (1,0)
        </liquibase.insert>
    </properties>
    <profiles>
        <profile>
            <id>oracle</id>
            <properties>
                <db.vendor>oracle</db.vendor>
                <jdbc.url>jdbc:oracle:thin:@oracle.ole.kuali.org:1521:OLE</jdbc.url>
                <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
                <sql.init>
                    ${oracle.liquibase.drop}
                    ${oracle.liquibase.create}
                    ${liquibase.insert}
                </sql.init>
            </properties>
        </profile>
        <profile>
            <id>mysql</id>
            <properties>
                <db.vendor>mysql</db.vendor>
                <jdbc.url>jdbc:mysql://mysql.ole.kuali.org:3306/${sql.database}</jdbc.url>
                <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
                <sql.init>
                    ${mysql.liquibase.drop}
                    ${mysql.liquibase.create}
                    ${liquibase.insert}
                </sql.init>
            </properties>
        </profile>
        <profile>
            <id>sql</id>
            <properties>
                <sql.database>LIQUIBASEBLANK</sql.database>
                <sql.username>${sql.database}</sql.username>
                <sql.password>${sql.database}</sql.password>
                <lb.base.dir>${project.build.directory}/liquibase</lb.base.dir>
                <lb.sql.dir>${lb.base.dir}/${project.groupId.path}/sql/${db.vendor}</lb.sql.dir>
                <sql.phase>initialize</sql.phase>
                <lb.phase>process-resources</lb.phase>
                <convert.phase>process-resources</convert.phase>
                <scm.phase>process-resources</scm.phase>
                <ole.lb.sql.artifactId>ole-liquibase-sql</ole.lb.sql.artifactId>
                <converted.sql.resources>${project.build.directory}/../../../ole-sql/${ole.lb.sql.artifactId}/src/main/resources
                </converted.sql.resources>
                <converted.sql.base>${converted.sql.resources}/${project.groupId.path}/sql</converted.sql.base>
                <converted.sql.dir>${converted.sql.base}/${db.vendor}</converted.sql.dir>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.soebes.maven.plugins</groupId>
                            <artifactId>maven-echo-plugin</artifactId>
                            <version>0.1</version>
                            <executions>
                                <execution>
                                    <id>echo</id>
                                    <goals>
                                        <goal>echo</goal>
                                    </goals>
                                    <phase>validate</phase>
                                    <configuration>
                                        <echos>
                                            <echo>URL - ${jdbc.url}</echo>
                                            <echo>Username - ${sql.username}</echo>
                                            <echo>Password - ${sql.password}</echo>
                                            <echo>Driver - ${jdbc.driver}</echo>
                                        </echos>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>properties-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>init</id>
                                    <goals>
                                        <goal>read-project-properties</goal>
                                    </goals>
                                    <phase>initialize</phase>
                                    <configuration>
                                        <locations>
                                            <location>classpath:org/kuali/common/sql/sql.xml</location>
                                            <location>classpath:org/kuali/common/sql/${db.vendor}.xml</location>
                                        </locations>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>org.kuali.common</groupId>
                                    <artifactId>kuali-sql</artifactId>
                                    <version>2.0.0</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>sql-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>init</id>
                                    <goals>
                                        <goal>execute</goal>
                                    </goals>
                                    <phase>${sql.phase}</phase>
                                    <configuration>
                                        <url>${jdbc.url}</url>
                                        <driver>${jdbc.driver}</driver>
                                        <username>${sql.database}</username>
                                        <password>${sql.database}</password>
                                        <sqlCommand>${sql.init}</sqlCommand>
                                        <showSql>true</showSql>
                                        <delimiter>/</delimiter>
                                        <delimiterType>row</delimiterType>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>mysql</groupId>
                                    <artifactId>mysql-connector-java</artifactId>
                                    <version>5.1.20</version>
                                </dependency>
                                <dependency>
                                    <groupId>com.oracle</groupId>
                                    <artifactId>ojdbc6_g</artifactId>
                                    <version>11.2.0.2</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.liquibase</groupId>
                            <artifactId>liquibase-maven-plugin</artifactId>
                            <version>${plugin.liquibase.version}</version>
                            <configuration>
                                <url>${jdbc.url}</url>
                                <driver>${jdbc.driver}</driver>
                                <username>${sql.username}</username>
                                <password>${sql.password}</password>
                                <verbose>false</verbose>
                            </configuration>

                            <executions>

                                <execution>
                                    <id>bootstrap-krcr-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krcr_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krcr_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-krim-entity</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krim_entity_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krim_entity_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-krim-role-permissions</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krim_role_perm_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krim_role_perm_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-other-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_other_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_other_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>demo-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>demo_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/demo_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>mysql</groupId>
                                    <artifactId>mysql-connector-java</artifactId>
                                    <version>5.1.20</version>
                                </dependency>
                                <dependency>
                                    <groupId>com.oracle</groupId>
                                    <artifactId>ojdbc6_g</artifactId>
                                    <version>11.2.0.2</version>
                                </dependency>

                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>maven-impex-plugin</artifactId>
                            <configuration>
                                <artifactId>${ole.lb.sql.artifactId}</artifactId>
                                <metaFileSuffix>resources</metaFileSuffix>
                                <skipIrrelevantLiquibaseMetadataLines>true</skipIrrelevantLiquibaseMetadataLines>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>convert</id>
                                    <goals>
                                        <goal>convertsql</goal>
                                    </goals>
                                    <phase>${convert.phase}</phase>
                                    <configuration>
                                        <sourceDir>${lb.sql.dir}</sourceDir>
                                        <outputDir>${converted.sql.dir}</outputDir>
                                        <targetDatabase>${db.vendor}</targetDatabase>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>metainf</id>
                                    <goals>
                                        <goal>metainf</goal>
                                    </goals>
                                    <phase>${convert.phase}</phase>
                                    <configuration>
                                        <baseDir>${lb.base.dir}</baseDir>
                                        <include>**/sql/${db.vendor}/*.sql</include>
                                        <outputFile>
                                            ${converted.sql.resources}/META-INF/${project.groupId.path}/sql/${db.vendor}/${ole.lb.sql.artifactId}.resources
                                        </outputFile>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>externals-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>sync</id>
                                    <goals>
                                        <goal>dirsync</goal>
                                    </goals>
                                    <phase>${impex.copy.phase}</phase>
                                    <configuration>
                                        <newDir>${lb.sql.dir}</newDir>
                                        <oldDir>${converted.sql.dir}</oldDir>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <artifactId>maven-antrun-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>commit</id>
                                    <phase>${impex.scm.phase}</phase>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <configuration>
                                        <target>
                                            <echo>svn add --force --depth=infinity ${converted.sql.resources}</echo>
                                            <exec executable="svn" failonerror="true">
                                                <arg value="add" />
                                                <arg value="--force" />
                                                <arg value="--depth=infinity" />
                                                <arg value="${converted.sql.resources}" />
                                            </exec>
                                            <echo>svn commit -m "Automated Liquibase SQL Update"
                                                ${converted.sql.resources}
                                            </echo>
                                            <exec executable="svn" failonerror="true">
                                                <arg value="commit" />
                                                <arg value="-m" />
                                                <arg value="Automated Liquibase SQL Update" />
                                                <arg value="${converted.sql.resources}" />
                                            </exec>
                                        </target>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.soebes.maven.plugins</groupId>
                        <artifactId>maven-echo-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>properties-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>sql-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.liquibase</groupId>
                        <artifactId>liquibase-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>maven-impex-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>externals-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>inst-oracle</id>
            <properties>
                <db.vendor>oracle</db.vendor>
                <jdbc.url>jdbc:oracle:thin:@oracle.rice.kuali.org:1521:ORACLE</jdbc.url>
                <jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
                <sql.init>
                    ${oracle.liquibase.drop}
                    ${oracle.liquibase.create}
                    ${liquibase.insert}
                </sql.init>
                <sql.database>LIQUIBASEBLANK</sql.database>
                <sql.username>${sql.database}</sql.username>
                <sql.password>${sql.database}</sql.password>
                <lb.base.dir>${project.build.directory}/liquibase</lb.base.dir>
                <lb.sql.dir>${lb.base.dir}/${project.groupId.path}/sql/${db.vendor}</lb.sql.dir>
                <sql.phase>initialize</sql.phase>
                <lb.phase>process-resources</lb.phase>
                <convert.phase>process-resources</convert.phase>
                <scm.phase>process-resources</scm.phase>
                <ole.lb.sql.artifactId>ole-liquibase-sql</ole.lb.sql.artifactId>
                <converted.sql.resources>
                    ${project.build.directory}/../../../ole-sql/${ole.lb.sql.artifactId}/src/main/resources
                </converted.sql.resources>
                <converted.sql.base>${converted.sql.resources}/${project.groupId.path}/sql</converted.sql.base>
                <converted.sql.dir>${converted.sql.base}/${db.vendor}</converted.sql.dir>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.soebes.maven.plugins</groupId>
                            <artifactId>maven-echo-plugin</artifactId>
                            <version>0.1</version>
                            <executions>
                                <execution>
                                    <id>echo</id>
                                    <goals>
                                        <goal>echo</goal>
                                    </goals>
                                    <phase>validate</phase>
                                    <configuration>
                                        <echos>
                                            <echo>URL - ${jdbc.url}</echo>
                                            <echo>Username - ${sql.username}</echo>
                                            <echo>Password - ${sql.password}</echo>
                                            <echo>Driver - ${jdbc.driver}</echo>
                                        </echos>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>properties-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>init</id>
                                    <goals>
                                        <goal>read-project-properties</goal>
                                    </goals>
                                    <phase>initialize</phase>
                                    <configuration>
                                        <locations>
                                            <location>classpath:org/kuali/common/sql/sql.xml</location>
                                            <location>classpath:org/kuali/common/sql/${db.vendor}.xml</location>
                                        </locations>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>org.kuali.common</groupId>
                                    <artifactId>kuali-sql</artifactId>
                                    <version>2.0.0</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>sql-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>init</id>
                                    <goals>
                                        <goal>execute</goal>
                                    </goals>
                                    <phase>${sql.phase}</phase>
                                    <configuration>
                                        <url>${jdbc.url}</url>
                                        <driver>${jdbc.driver}</driver>
                                        <username>${sql.database}</username>
                                        <password>${sql.database}</password>
                                        <sqlCommand>${sql.init}</sqlCommand>
                                        <showSql>true</showSql>
                                        <delimiter>/</delimiter>
                                        <delimiterType>row</delimiterType>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>com.oracle</groupId>
                                    <artifactId>ojdbc6_g</artifactId>
                                    <version>11.2.0.2</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.liquibase</groupId>
                            <artifactId>liquibase-maven-plugin</artifactId>
                            <version>${plugin.liquibase.version}</version>
                            <configuration>
                                <url>${jdbc.url}</url>
                                <driver>${jdbc.driver}</driver>
                                <username>${sql.username}</username>
                                <password>${sql.password}</password>
                                <verbose>false</verbose>
                            </configuration>

                            <executions>

                                <execution>
                                    <id>bootstrap-krcr-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krcr_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krcr_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-krim-entity</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krim_entity_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krim_entity_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-krim-role-permissions</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krim_role_perm_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krim_role_perm_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-other-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_other_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_other_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>inst-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>inst_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/inst_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>com.oracle</groupId>
                                    <artifactId>ojdbc6_g</artifactId>
                                    <version>11.2.0.2</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>maven-impex-plugin</artifactId>
                            <configuration>
                                <artifactId>${ole.lb.sql.artifactId}</artifactId>
                                <metaFileSuffix>resources</metaFileSuffix>
                                <skipIrrelevantLiquibaseMetadataLines>true</skipIrrelevantLiquibaseMetadataLines>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>convert</id>
                                    <goals>
                                        <goal>convertsql</goal>
                                    </goals>
                                    <phase>${convert.phase}</phase>
                                    <configuration>
                                        <sourceDir>${lb.sql.dir}</sourceDir>
                                        <outputDir>${converted.sql.dir}</outputDir>
                                        <targetDatabase>${db.vendor}</targetDatabase>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>metainf</id>
                                    <goals>
                                        <goal>metainf</goal>
                                    </goals>
                                    <phase>${convert.phase}</phase>
                                    <configuration>
                                        <baseDir>${lb.base.dir}</baseDir>
                                        <include>**/sql/${db.vendor}/*.sql</include>
                                        <outputFile>
                                            ${converted.sql.resources}/META-INF/${project.groupId.path}/sql/${db.vendor}/${ole.lb.sql.artifactId}.resources
                                        </outputFile>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>externals-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>sync</id>
                                    <goals>
                                        <goal>dirsynconly</goal>
                                    </goals>
                                    <phase>${impex.copy.phase}</phase>
                                    <configuration>
                                        <newDir>${lb.sql.dir}</newDir>
                                        <oldDir>${converted.sql.dir}</oldDir>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.soebes.maven.plugins</groupId>
                        <artifactId>maven-echo-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>properties-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>sql-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.liquibase</groupId>
                        <artifactId>liquibase-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>maven-impex-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>externals-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>inst-mysql</id>
            <properties>
                <db.vendor>mysql</db.vendor>
                <jdbc.url>jdbc:mysql://mysql.rice.kuali.org/${sql.database}</jdbc.url>
                <jdbc.driver>com.mysql.jdbc.Driver</jdbc.driver>
                <sql.init>
                    ${mysql.liquibase.drop}
                    ${mysql.liquibase.create}
                    ${liquibase.insert}
                </sql.init>
                <sql.database>LIQUIBASEBLANK</sql.database>
                <sql.username>${sql.database}</sql.username>
                <sql.password>${sql.database}</sql.password>
                <lb.base.dir>${project.build.directory}/liquibase</lb.base.dir>
                <lb.sql.dir>${lb.base.dir}/${project.groupId.path}/sql/${db.vendor}</lb.sql.dir>
                <sql.phase>initialize</sql.phase>
                <lb.phase>process-resources</lb.phase>
                <convert.phase>process-resources</convert.phase>
                <scm.phase>process-resources</scm.phase>
                <ole.lb.sql.artifactId>ole-liquibase-sql</ole.lb.sql.artifactId>
                <converted.sql.resources>
                    ${project.build.directory}/../../../ole-sql/${ole.lb.sql.artifactId}/src/main/resources
                </converted.sql.resources>
                <converted.sql.base>${converted.sql.resources}/${project.groupId.path}/sql</converted.sql.base>
                <converted.sql.dir>${converted.sql.base}/${db.vendor}</converted.sql.dir>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.soebes.maven.plugins</groupId>
                            <artifactId>maven-echo-plugin</artifactId>
                            <version>0.1</version>
                            <executions>
                                <execution>
                                    <id>echo</id>
                                    <goals>
                                        <goal>echo</goal>
                                    </goals>
                                    <phase>validate</phase>
                                    <configuration>
                                        <echos>
                                            <echo>URL - ${jdbc.url}</echo>
                                            <echo>Username - ${sql.username}</echo>
                                            <echo>Password - ${sql.password}</echo>
                                            <echo>Driver - ${jdbc.driver}</echo>
                                        </echos>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>properties-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>init</id>
                                    <goals>
                                        <goal>read-project-properties</goal>
                                    </goals>
                                    <phase>initialize</phase>
                                    <configuration>
                                        <locations>
                                            <location>classpath:org/kuali/common/sql/sql.xml</location>
                                            <location>classpath:org/kuali/common/sql/${db.vendor}.xml</location>
                                        </locations>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>org.kuali.common</groupId>
                                    <artifactId>kuali-sql</artifactId>
                                    <version>2.0.0</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>sql-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>init</id>
                                    <goals>
                                        <goal>execute</goal>
                                    </goals>
                                    <phase>${sql.phase}</phase>
                                    <configuration>
                                        <url>${jdbc.url}</url>
                                        <driver>${jdbc.driver}</driver>
                                        <username>${sql.database}</username>
                                        <password>${sql.database}</password>
                                        <sqlCommand>${sql.init}</sqlCommand>
                                        <showSql>true</showSql>
                                        <delimiter>/</delimiter>
                                        <delimiterType>row</delimiterType>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>mysql</groupId>
                                    <artifactId>mysql-connector-java</artifactId>
                                    <version>5.1.20</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.liquibase</groupId>
                            <artifactId>liquibase-maven-plugin</artifactId>
                            <version>${plugin.liquibase.version}</version>
                            <configuration>
                                <url>${jdbc.url}</url>
                                <driver>${jdbc.driver}</driver>
                                <username>${sql.username}</username>
                                <password>${sql.password}</password>
                                <verbose>false</verbose>
                            </configuration>

                            <executions>

                                <execution>
                                    <id>bootstrap-krcr-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krcr_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krcr_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-krim-entity</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krim_entity_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krim_entity_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-krim-role-permissions</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krim_role_perm_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krim_role_perm_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-other-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_other_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_other_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>inst-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>inst_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/inst_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>mysql</groupId>
                                    <artifactId>mysql-connector-java</artifactId>
                                    <version>5.1.20</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>maven-impex-plugin</artifactId>
                            <configuration>
                                <artifactId>${ole.lb.sql.artifactId}</artifactId>
                                <metaFileSuffix>resources</metaFileSuffix>
                                <skipIrrelevantLiquibaseMetadataLines>true</skipIrrelevantLiquibaseMetadataLines>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>convert</id>
                                    <goals>
                                        <goal>convertsql</goal>
                                    </goals>
                                    <phase>${convert.phase}</phase>
                                    <configuration>
                                        <sourceDir>${lb.sql.dir}</sourceDir>
                                        <outputDir>${converted.sql.dir}</outputDir>
                                        <targetDatabase>${db.vendor}</targetDatabase>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>metainf</id>
                                    <goals>
                                        <goal>metainf</goal>
                                    </goals>
                                    <phase>${convert.phase}</phase>
                                    <configuration>
                                        <baseDir>${lb.base.dir}</baseDir>
                                        <include>**/sql/${db.vendor}/*.sql</include>
                                        <outputFile>
                                            ${converted.sql.resources}/META-INF/${project.groupId.path}/sql/${db.vendor}/${ole.lb.sql.artifactId}.resources
                                        </outputFile>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>externals-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>sync</id>
                                    <goals>
                                        <goal>dirsynconly</goal>
                                    </goals>
                                    <phase>${impex.copy.phase}</phase>
                                    <configuration>
                                        <newDir>${lb.sql.dir}</newDir>
                                        <oldDir>${converted.sql.dir}</oldDir>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.soebes.maven.plugins</groupId>
                        <artifactId>maven-echo-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>properties-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>sql-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.liquibase</groupId>
                        <artifactId>liquibase-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>maven-impex-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>externals-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>bootstrap-sql-only</id>
            <properties>
                <sql.database>LIQUIBASEBLANK</sql.database>
                <sql.username>${sql.database}</sql.username>
                <sql.password>${sql.database}</sql.password>
                <lb.base.dir>${project.build.directory}/liquibase</lb.base.dir>
                <lb.sql.dir>${lb.base.dir}/${project.groupId.path}/sql/${db.vendor}</lb.sql.dir>
                <sql.phase>initialize</sql.phase>
                <lb.phase>process-resources</lb.phase>
                <convert.phase>process-resources</convert.phase>
                <scm.phase>process-resources</scm.phase>
                <ole.lb.sql.artifactId>ole-liquibase-sql</ole.lb.sql.artifactId>
                <converted.sql.resources>
                    ${project.build.directory}/../../../ole-sql/${ole.lb.sql.artifactId}/src/main/resources
                </converted.sql.resources>
                <converted.sql.base>${converted.sql.resources}/${project.groupId.path}/sql</converted.sql.base>
                <converted.sql.dir>${converted.sql.base}/${db.vendor}</converted.sql.dir>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.soebes.maven.plugins</groupId>
                            <artifactId>maven-echo-plugin</artifactId>
                            <version>0.1</version>
                            <executions>
                                <execution>
                                    <id>echo</id>
                                    <goals>
                                        <goal>echo</goal>
                                    </goals>
                                    <phase>validate</phase>
                                    <configuration>
                                        <echos>
                                            <echo>URL - ${jdbc.url}</echo>
                                            <echo>Username - ${sql.username}</echo>
                                            <echo>Password - ${sql.password}</echo>
                                            <echo>Driver - ${jdbc.driver}</echo>
                                        </echos>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>properties-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>init</id>
                                    <goals>
                                        <goal>read-project-properties</goal>
                                    </goals>
                                    <phase>initialize</phase>
                                    <configuration>
                                        <locations>
                                            <location>classpath:org/kuali/common/sql/sql.xml</location>
                                            <location>classpath:org/kuali/common/sql/${db.vendor}.xml</location>
                                        </locations>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>org.kuali.common</groupId>
                                    <artifactId>kuali-sql</artifactId>
                                    <version>2.0.0</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>sql-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>init</id>
                                    <goals>
                                        <goal>execute</goal>
                                    </goals>
                                    <phase>${sql.phase}</phase>
                                    <configuration>
                                        <url>${jdbc.url}</url>
                                        <driver>${jdbc.driver}</driver>
                                        <username>${sql.database}</username>
                                        <password>${sql.database}</password>
                                        <sqlCommand>${sql.init}</sqlCommand>
                                        <showSql>true</showSql>
                                        <delimiter>/</delimiter>
                                        <delimiterType>row</delimiterType>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>mysql</groupId>
                                    <artifactId>mysql-connector-java</artifactId>
                                    <version>5.1.20</version>
                                </dependency>
                                <dependency>
                                    <groupId>com.oracle</groupId>
                                    <artifactId>ojdbc6_g</artifactId>
                                    <version>11.2.0.2</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.liquibase</groupId>
                            <artifactId>liquibase-maven-plugin</artifactId>
                            <version>${plugin.liquibase.version}</version>
                            <configuration>
                                <url>${jdbc.url}</url>
                                <driver>${jdbc.driver}</driver>
                                <username>${sql.username}</username>
                                <password>${sql.password}</password>
                                <verbose>false</verbose>
                            </configuration>

                            <executions>

                                <execution>
                                    <id>bootstrap-krcr-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krcr_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krcr_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-krim-entity</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krim_entity_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krim_entity_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-krim-role-permissions</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_krim_role_perm_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_krim_role_perm_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>

                                <execution>
                                    <id>bootstrap-other-data</id>
                                    <phase>${lb.phase}</phase>
                                    <goals>
                                        <goal>updateSQL</goal>
                                    </goals>
                                    <configuration>
                                        <changeLogFile>bootstrap_other_data.xml</changeLogFile>
                                        <migrationSqlOutputFile>${lb.sql.dir}/bootstrap_other_data.sql
                                        </migrationSqlOutputFile>
                                    </configuration>
                                </execution>
                            </executions>
                            <dependencies>
                                <dependency>
                                    <groupId>mysql</groupId>
                                    <artifactId>mysql-connector-java</artifactId>
                                    <version>5.1.20</version>
                                </dependency>
                                <dependency>
                                    <groupId>com.oracle</groupId>
                                    <artifactId>ojdbc6_g</artifactId>
                                    <version>11.2.0.2</version>
                                </dependency>
                            </dependencies>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>maven-impex-plugin</artifactId>
                            <configuration>
                                <artifactId>${ole.lb.sql.artifactId}</artifactId>
                                <metaFileSuffix>resources</metaFileSuffix>
                                <skipIrrelevantLiquibaseMetadataLines>true</skipIrrelevantLiquibaseMetadataLines>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>convert</id>
                                    <goals>
                                        <goal>convertsql</goal>
                                    </goals>
                                    <phase>${convert.phase}</phase>
                                    <configuration>
                                        <sourceDir>${lb.sql.dir}</sourceDir>
                                        <outputDir>${converted.sql.dir}</outputDir>
                                        <targetDatabase>${db.vendor}</targetDatabase>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>metainf</id>
                                    <goals>
                                        <goal>metainf</goal>
                                    </goals>
                                    <phase>${convert.phase}</phase>
                                    <configuration>
                                        <baseDir>${lb.base.dir}</baseDir>
                                        <include>**/sql/${db.vendor}/*.sql</include>
                                        <outputFile>
                                            ${converted.sql.resources}/META-INF/${project.groupId.path}/sql/${db.vendor}/${ole.lb.sql.artifactId}.resources
                                        </outputFile>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.kuali.maven.plugins</groupId>
                            <artifactId>externals-maven-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>sync</id>
                                    <goals>
                                        <goal>dirsynconly</goal>
                                    </goals>
                                    <phase>${impex.copy.phase}</phase>
                                    <configuration>
                                        <newDir>${lb.sql.dir}</newDir>
                                        <oldDir>${converted.sql.dir}</oldDir>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.soebes.maven.plugins</groupId>
                        <artifactId>maven-echo-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>properties-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>sql-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.liquibase</groupId>
                        <artifactId>liquibase-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>maven-impex-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.kuali.maven.plugins</groupId>
                        <artifactId>externals-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
New to GrepCode? Check out our FAQ X