<?xml version="1.0" encoding="UTF-8"?><project>
  <parent>
    <artifactId>applications</artifactId>
    <groupId>org.apache.geronimo.applications</groupId>
    <version>1.2-beta</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>geronimo-uddi-db</artifactId>
  <name>Geronimo Applications :: UDDI Server Database</name>
  <version>1.2-beta</version>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>prepare-db</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <delete dir="${derby.system.home}"></delete>
                <mkdir dir="${derby.system.home}"></mkdir>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>sql-maven-plugin</artifactId>
        <version>1.0-beta-1</version>
        <executions>
          <execution>
            <id>create-db</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>execute</goal>
            </goals>
            <configuration>
              <driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
              <url>jdbc:derby:${derby.system.home}/UddiDatabase;create=true</url>
              <autocommit>true</autocommit>
              <onError>abort</onError>
              <delimiter>;</delimiter>
              <srcFiles>
                <srcFile>${pom.basedir}/src/main/sql/juddi.sql</srcFile>
              </srcFiles>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
            <version>${derbyVersion}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
  <distributionManagement>
    <status>deployed</status>
  </distributionManagement>
  <properties>
    <derby.system.home>${project.build.outputDirectory}/META-INF/${pom.artifactId}/var/derby</derby.system.home>
  </properties>
</project>