<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>

  <groupId>edu.psu.swe.scim</groupId>
  <artifactId>scim-parent</artifactId>
  <version>2.20</version>
  <packaging>pom</packaging>
  <name>SCIM - Parent</name>
  <description>Penn State's Open Source JavaEE implmentation of the SCIM version 2.0 specification (RFC7642, RFC7643 and RFC7644)</description>
  <url>https://github.com/PennState/scim</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <version.errai>4.0.0.CR1</version.errai>
    <version.gwt>2.8.0</version.gwt>
    <version.jackson>2.8.8</version.jackson>
    <version.lombok>1.16.14</version.lombok>
    <version.lombok.plugin>${version.lombok}.0</version.lombok.plugin>
    <version.restfuse>1.2.0</version.restfuse>
  </properties>

  <modules>
    <module>scim-client</module>
    <module>scim-server</module>
    <module>scim-spec</module>
    <module>scim-tools</module>
    <module>scim-compliance</module>
    <module>scim-common</module>
    <module>scim-errai</module>
  </modules>

  <scm>
    <connection>scm:git:ssh://git@github.com:PennState/scim.git</connection>
    <developerConnection>scm:git:ssh://git@github.com:PennState/scim.git</developerConnection>
    <url>https://github.com/PennState/scim</url>
  </scm>

  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>ussmith</id>
      <name>Shawn Smith</name>
      <email>ses44@psu.edu</email>
      <url>https://github.com/ussmith</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
    <developer>
      <id>chrisharm</id>
      <name>Christopher Harm</name>
      <email>crh5255@psu.edu</email>
      <url>https://github.com/chrisharm</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
    <developer>
      <id>smoyer64</id>
      <name>Steve Moyer</name>
      <email>smoyer@psu.edu</email>
      <url>https://github.com/smoyer64</url>
      <timezone>-0500</timezone>
      <organization>The Pennsylvania State University</organization>
      <organizationUrl>https://www.psu.edu</organizationUrl>
    </developer>
  </developers>
  
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>edu.psu.swe.scim</groupId>
        <artifactId>scim-spec-protocol</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>edu.psu.swe.scim</groupId>
        <artifactId>scim-spec-schema</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>edu.psu.swe.scim</groupId>
        <artifactId>scim-common</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>edu.psu.swe.scim</groupId>
        <artifactId>scim-tools-common</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>edu.psu.swe.commons</groupId>
        <artifactId>commons-jaxrs</artifactId>
        <version>1.20</version>
      </dependency>
      <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>7.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
      </dependency>
      <dependency>
        <groupId>javax.xml</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.1</version>
      </dependency>
      <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>1.1.0.Final</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.weld.se</groupId>
        <artifactId>weld-se</artifactId>
        <version>2.2.11.Final</version>
      </dependency>
      <dependency>
        <groupId>args4j</groupId>
        <artifactId>args4j</artifactId>
        <version>2.32</version>
      </dependency>
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${version.lombok}</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${version.jackson}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>pl.pragmatists</groupId>
        <artifactId>JUnitParams</artifactId>
        <version>1.0.4</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>5.1.3.Final</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.el</artifactId>
        <version>3.0.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-client</artifactId>
        <version>3.0.11.Final</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jackson-provider</artifactId>
        <version>3.0.11.Final</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.12</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.10.19</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.3.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.restfuse</groupId>
        <artifactId>com.eclipsesource.restfuse</artifactId>
        <version>${version.restfuse}</version>
      </dependency>
      <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt</artifactId>
        <version>${version.gwt}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.errai.bom</groupId>
        <artifactId>errai-bom</artifactId>
        <version>${version.errai}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.3</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <shortRevisionLength>7</shortRevisionLength>
          <doCheck>false</doCheck>
          <doUpdate>false</doUpdate>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <version>1.4.5</version>
        <!-- <configuration> -->
        <!-- <failBuildOnCVSS>10</failBuildOnCVSS> -->
        <!-- </configuration> -->
        <executions>
          <execution>
            <goals>
              <goal>aggregate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.3</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.17</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.1.1</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
              <manifestEntries>
                <Build-Number>${build.number}</Build-Number>
                <Build-Date>${timestamp}</Build-Date>
                <SCM-Revision>${buildNumber}</SCM-Revision>
                <SCM-Branch>${scmBranch}</SCM-Branch>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.2</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
              <manifestEntries>
                <Build-Number>${build.number}</Build-Number>
                <Build-Date>${timestamp}</Build-Date>
                <SCM-Revision>${buildNumber}</SCM-Revision>
                <SCM-Branch>${scmBranch}</SCM-Branch>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.wildfly.plugins</groupId>
          <artifactId>wildfly-maven-plugin</artifactId>
          <version>1.0.2.Final</version>
          <inherited>true</inherited>
          <configuration>
            <id>${jbossServerId}</id>
            <hostname>${jbossHostname}</hostname>
            <skip>true</skip>
          </configuration>
        </plugin>
        <plugin>
          <groupId>external.atlassian.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>1.0-m4.3</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <flowInitContext>
              <versionTagPrefix>SCIM-</versionTagPrefix>
            </flowInitContext>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
          <configuration>
            <additionalparam>-Xdoclint:none</additionalparam>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok-maven-plugin</artifactId>
          <version>${version.lombok.plugin}</version>
          <executions>
            <execution>
              <phase>generate-sources</phase>
              <goals>
                <goal>delombok</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>acceptance-tests</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>0.14.2</version>
            <configuration>
              <skip>true</skip>
            </configuration>
            <executions>
              <execution>
                <id>start</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>build</goal>
                  <goal>start</goal>
                </goals>
              </execution>
              <execution>
                <id>stop</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>docker</id>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <version>0.14.2</version>
            <configuration>
              <skip>true</skip>
            </configuration>
            <executions>
              <execution>
                <id>build</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>build</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>sign-artifacts</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
