<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>
  <parent>
    <groupId>org.dcm4che.jdbc.prefs</groupId>
    <artifactId>dcm4che-jdbc-prefs</artifactId>
    <version>1.1.1</version>
  </parent>
  <artifactId>dcm4che-jdbc-prefs-ejb</artifactId>
  <name>dcm4che-jdbc-prefs-ejb</name>
  <packaging>ejb</packaging>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <versionRange>[1.1.1,)</versionRange>
                    <goals>
                      <goal>java</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.mysema.maven</groupId>
                    <artifactId>maven-apt-plugin</artifactId>
                    <versionRange>[1.0.3,)</versionRange>
                    <goals>
                      <goal>process</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-ejb-plugin</artifactId>
		<version>2.3</version>
		<configuration>
			<classifier>${db}</classifier>
			<ejbVersion>3.1</ejbVersion>
			<archive>
				<manifestEntries>
					<Dependencies>org.dcm4che.conf.prefs</Dependencies>
		            <Implementation-Build>${buildNumber}</Implementation-Build>
				</manifestEntries>
			</archive>
		</configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.1.1</version>
        <executions>
          <execution>
            <id>generate-create-schema-ddl</id>
            <phase>process-classes</phase>
            <goals>
              <goal>java</goal>
            </goals>
            <configuration>
              <includePluginDependencies>true</includePluginDependencies>
              <mainClass>com.blogspot.doingenterprise.SchemaExport</mainClass>
              <arguments>
                <argument>--create</argument>
                <argument>--delimiter=;</argument>
                <argument>--output=${project.build.directory}/create-${db}.ddl</argument>
                <argument>dcm4che-jdbc-prefs</argument>
              </arguments>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.blogspot.doingenterprise</groupId>
            <artifactId>schema-export</artifactId>
            <version>2012_05_01</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>false</doCheck>
          <doUpdate>false</doUpdate>
        </configuration>
      </plugin>      
    </plugins>
    <resources>
      <resource>
        <directory>src/main/resources-${db}</directory>
        <filtering>true</filtering>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
  </build>
  <dependencies>
	<dependency>
		<groupId>org.dcm4che</groupId>
		<artifactId>dcm4che-conf-prefs</artifactId>
		<version>${dcm4che.version}</version>
		<scope>provided</scope>
	</dependency>   
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>${log4j.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.ejb</groupId>
      <artifactId>jboss-ejb-api_3.1_spec</artifactId>
      <version>1.0.2.Final</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
      <version>${jpa.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
     <groupId>org.hibernate</groupId>
     <artifactId>hibernate-core</artifactId>
     <version>${hibernate.version}</version>
     <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>${hibernate.version}</version>
      <scope>provided</scope>
    </dependency>
	<dependency>
		<groupId>javax.enterprise</groupId>
		<artifactId>cdi-api</artifactId>
		<version>1.0-SP4</version>
		<scope>provided</scope>
	</dependency>      
  </dependencies>
</project>
