<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.dcm4che</groupId>
    <artifactId>dcm4che-parent</artifactId>
    <version>3.3.6</version>
  </parent>
  <artifactId>dcm4che-servlet</artifactId>
  <packaging>war</packaging>
  <name>dcm4che-servlet</name>
  <description>Sample C-ECHO SCP Servlet</description>
  <dependencyManagement>
    <dependencies>
      <!-- Define the version of JBoss' Java EE 6 APIs we want to use -->
      <!-- JBoss distributes a complete set of Java EE 6 APIs including a 
        Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or a 
        collection) of artifacts. We use this here so that we always get the correct 
        versions of artifacts. Here we use the jboss-javaee-6.0 stack (you can read 
        this as the JBoss stack of the Java EE 6 APIs). You can actually use this 
        stack with any version of JBoss AS that implements Java EE 6, not just JBoss 
        AS 7! -->
      <dependency>
        <groupId>org.jboss.spec</groupId>
        <artifactId>jboss-javaee-6.0</artifactId>
        <version>3.0.1.Final</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.jboss.spec.javax.servlet</groupId>
      <artifactId>jboss-servlet-api_3.0_spec</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.ws.rs</groupId>
      <artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.dcm4che</groupId>
      <artifactId>dcm4che-conf-api</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Dependencies>org.dcm4che.conf.prefs,org.dcm4che.conf.ldap</Dependencies>
            </manifestEntries>
          </archive>
          <webResources>
          <resource>
            <directory>src/main/webapp</directory>
            <filtering>true</filtering>
          </resource>
          </webResources>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>prefs</id>
      <activation><activeByDefault>true</activeByDefault></activation>
      <properties>
        <config-class>org.dcm4che.conf.prefs.PreferencesDicomConfiguration</config-class>
      </properties>
    </profile>
    <profile>
      <id>ldap</id>
      <activation><property><name>ldap</name></property></activation>
      <properties>
        <config-class>org.dcm4che.conf.ldap.LdapDicomConfiguration</config-class>
      </properties>
      <build>
        <filters>
          <filter>src/main/filters/${ldap}.properties</filter>
        </filters>
        <resources>
          <resource>
            <directory>src/main/resources</directory>
          </resource>
          <resource>
            <directory>src/main/resources-ldap</directory>
            <filtering>true</filtering>
          </resource>
        </resources>
      </build>
    </profile>
  </profiles>

</project>