<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>pl.jalokim.parentpom</groupId>
    <artifactId>root-parent-pom</artifactId>
    <version>1.0.1</version>
  </parent>
  <groupId>pl.jalokim.parentpom</groupId>
  <artifactId>java-parent-pom</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <properties>
    <release.project.name>parent pom with checking code style</release.project.name>
    <archunit.package.to.verify>pl.jalokim</archunit.package.to.verify>
    <release.project.description>parent pom with checking code style based on rules from code-style-rules module</release.project.description>
    <minor-version>0</minor-version>
    <code-style.base-dir>${project.build.directory}/code-style-rules</code-style.base-dir>
    <code-style-rules.version>RELEASE</code-style-rules.version>
    <main-version>1.0</main-version>
    <release.project.repository-name>java-parent-pom</release.project.repository-name>
  </properties>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <version>${plugin.remote.resources.version}</version>
        <executions>
          <execution>
            <id>process-shared-resources</id>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <resourceBundles>
                <resourceBundle>pl.jalokim.coderules:code-style-rules:${code-style-rules.version}</resourceBundle>
              </resourceBundles>
              <outputDirectory>${code-style.base-dir}</outputDirectory>
              <attachToMain>false</attachToMain>
              <encoding>UTF-8</encoding>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.societegenerale.commons</groupId>
        <artifactId>arch-unit-maven-plugin</artifactId>
        <version>${plugin.arch-unit.version}</version>
        <executions>
          <execution>
            <phase>process-test-classes</phase>
            <goals>
              <goal>arch-test</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>pl.jalokim.coderules</groupId>
            <artifactId>code-style-rules</artifactId>
            <version>${code-style-rules.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <projectPath>${project.basedir}/target</projectPath>
          <rules>
            <configurableRules>
              <configurableRule>
                <rule>pl.jalokim.coderules.archunit.GeneralCodingArchRules</rule>
                <applyOn>
                  <packageName>${archunit.package.to.verify}</packageName>
                  <scope>main</scope>
                </applyOn>
              </configurableRule>
              <configurableRule>
                <rule>pl.jalokim.coderules.archunit.MandatoryAnnotationArchRules</rule>
                <applyOn>
                  <packageName>${archunit.package.to.verify}</packageName>
                  <scope>main</scope>
                </applyOn>
              </configurableRule>
              <configurableRule>
                <rule>pl.jalokim.coderules.archunit.NamingConventionArchRules</rule>
                <applyOn>
                  <packageName>${archunit.package.to.verify}</packageName>
                  <scope>main</scope>
                </applyOn>
              </configurableRule>
              <configurableRule>
                <rule>pl.jalokim.coderules.archunit.IntegrationTestArchRules</rule>
                <applyOn>
                  <packageName>${archunit.package.to.verify}</packageName>
                  <scope>test</scope>
                </applyOn>
              </configurableRule>
            </configurableRules>
          </rules>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
