<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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.tomitribe</groupId>
    <artifactId>oss-parent</artifactId>
    <version>5</version>
  </parent>

  <artifactId>tomitribe-crest-parent</artifactId>
  <packaging>pom</packaging>
  <version>0.32</version>
  <name>Tomitribe :: Crest</name>

  <scm>
    <connection>scm:git:git@github.com:tomitribe/crest.git</connection>
    <url>scm:git:git@github.com:tomitribe/crest.git</url>
    <developerConnection>scm:git:git@github.com:tomitribe/crest.git</developerConnection>
    <tag>tomitribe-crest-parent-0.32</tag>
  </scm>

  <modules>
    <module>tomitribe-crest-test</module>
    <module>tomitribe-crest-api</module>
    <module>tomitribe-crest</module>
    <module>tomitribe-crest-xbean</module>
    <module>tomitribe-crest-archetype</module>
    <module>toolz</module>
    <module>crest-maven-plugin</module>
    <module>tomitribe-crest-cli</module>
    <module>tomitribe-crest-generator</module>
    <module>tomitribe-crest-arthur-extension</module>
  </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.checkstyle.plugin.version>2.17</maven.checkstyle.plugin.version>
    <xbean.version>4.20</xbean.version>
    <crest.build.name>${project.groupId}</crest.build.name>
    <arthur.version>1.0.3</arthur.version>
  </properties>

  <repositories>
    <repository>
      <id>snapshots</id>
      <url>http://repository.tomitribe.com/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>Sonatype-public</id>
      <name>Sonatype snapshot and release</name>
      <url>https://oss.sonatype.org/content/groups/public/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
  </repositories>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.1</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.tomitribe</groupId>
        <artifactId>tomitribe-util</artifactId>
        <version>1.4.5</version>
        <!--<scope>compile</scope>-->
      </dependency>
      <dependency>
        <groupId>org.apache.xbean</groupId>
        <artifactId>xbean-asm9-shaded</artifactId>
        <version>${xbean.version}</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.xbean</groupId>
        <artifactId>xbean-finder-shaded</artifactId>
        <version>${xbean.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.bval</groupId>
        <artifactId>bval-jsr</artifactId>
        <version>2.0.0</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.geronimo.specs</groupId>
        <artifactId>geronimo-validation_2.0_spec</artifactId>
        <version>1.0</version>
        <scope>compile</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.10</version>
        <configuration>
          <includes>
            <include>src/**/*</include>
            <include>pom.xml</include>
          </includes>
          <excludes>
            <exclude>**/*/MANIFEST.MF</exclude>
            <exclude>.git</exclude>
            <exclude>.gitignore</exclude>
            <exclude>derby.log</exclude>
            <exclude>**/META-INF/services/*</exclude>
            <exclude>**/bootstrap-*</exclude>
            <exclude>**/js/jquery-*</exclude>
            <exclude>**/*.json</exclude>
            <exclude>src/test/resources/**/*</exclude>
            <exclude>**/src/main/resources/archetype-resources/**/*</exclude>
            <exclude>.drone.yml</exclude>
            <exclude>.travis.yml</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <archive combine.children="append">
            <manifestEntries>
              <Automatic-Module-Name>${crest.build.name}</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkCount>4</forkCount>
          <reuseForks>true</reuseForks>
          <argLine>-Xmx128m</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
            <execution>
                <id>attach-javadocs</id>
                <goals>
                    <goal>jar</goal>
                </goals>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </execution>
        </executions>
    </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>windows</id>
      <activation>
        <os>
          <family>Windows</family>
        </os>
      </activation>
      <properties>
        <!-- https://issues.apache.org/jira/browse/MCHECKSTYLE-324 -->
        <checkstyle.skip>true</checkstyle.skip>
      </properties>
    </profile>
  </profiles>
</project>
