<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.overlord</groupId>
    <artifactId>overlord-commons</artifactId>
    <version>2.0.2.Final</version>
  </parent>
  <artifactId>overlord-commons-idp</artifactId>
  <packaging>war</packaging>
  <name>Overlord Commons: IDP</name>
  <description>An identity provider using PicketLink SAML.</description>

  <dependencies>
    <!-- Third Party Dependencies -->
    <dependency>
      <groupId>org.picketlink</groupId>
      <artifactId>picketlink-federation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.picketbox</groupId>
      <artifactId>picketbox</artifactId>
    </dependency>
    <dependency>
      <groupId>org.picketlink</groupId>
      <artifactId>picketlink-federation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>overlord-commons-auth</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>overlord-commons-auth-jboss7</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>overlord-commons-auth-jetty8</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>overlord-commons-auth-tomcat7</artifactId>
    </dependency>

    <!-- Provided Dependencies -->
    <dependency>
      <groupId>org.jboss.spec.javax.servlet</groupId>
      <artifactId>jboss-servlet-api_3.0_spec</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>regex-property</id>
            <goals>
              <goal>regex-property</goal>
            </goals>
            <configuration>
              <name>project.version.osgi</name>
              <value>${project.version}</value>
              <regex>-SNAPSHOT</regex>
              <replacement>.Snapshot</replacement>
              <failIfNoMatch>false</failIfNoMatch>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
          <warName>${project.artifactId}</warName>
          <attachClasses>true</attachClasses>
          <classesClassifier>classes</classesClassifier>
          <archive>
            <manifestEntries>
              <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
              <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
              <Bundle-Version>${project.version.osgi}</Bundle-Version>
              <Web-ContextPath>/overlord-idp</Web-ContextPath>
              <Webapp-Context>/overlord-idp</Webapp-Context>
              <Import-Package>
                org.apache.log4j,
                javax.servlet, javax.servlet.http,
                javax.security.auth.login,
                javax.xml.stream,
                javax.xml.stream.events,
                javax.xml.namespace,
                javax.xml.transform,
                javax.xml.transform.dom,
                javax.xml.transform.stream,
                javax.xml.parsers,
                javax.xml.datatype,
                javax.xml.crypto,
                javax.xml.crypto.dsig,
                javax.xml.bind,
                org.apache.karaf.jaas.boot.principal,
                org.eclipse.jetty.plus.jaas,
                org.xml.sax,
                org.w3c.dom,
                org.w3c.dom.ls,
                org.overlord.commons.auth.util,
                org.picketlink.identity.federation.core.interfaces
              </Import-Package>
              <Bundle-ClassPath>
                .,WEB-INF/classes,
                WEB-INF/lib/commons-logging-${version.commons-logging}.jar,
                WEB-INF/lib/jboss-logging-${version.org.jboss.logging}.jar,
                WEB-INF/lib/jbossxacml-2.0.8.Final.jar,
                WEB-INF/lib/picketbox-${picketbox.version}.jar,
                WEB-INF/lib/picketlink-common-${picketlink.version}.jar,
                WEB-INF/lib/picketlink-config-${picketlink.version}.jar,
                WEB-INF/lib/picketlink-federation-${picketlink.version}.jar,
                WEB-INF/lib/picketlink-idm-api-${picketlink.version}.jar,
                WEB-INF/lib/picketlink-idm-impl-${picketlink.version}.jar,
                WEB-INF/lib/xmlsec-1.5.1.jar
              </Bundle-ClassPath>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
