<?xml version="1.0"?>
<!--
Licensed 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>net.hydromatic</groupId>
  <artifactId>aggdesigner</artifactId>
  <packaging>pom</packaging>
  <version>6.1</version>
  <name>Aggregate Designer</name>
  <description>Designs aggregate tables</description>
  <url>http://github.com/julianhyde/aggdesigner</url>
  <inceptionYear>2006</inceptionYear>

  <organization>
    <name>Julian Hyde</name>
    <url>http://www.hydromatic.net</url>
  </organization>

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

  <developers>
    <developer>
      <id>julianhyde</id>
      <name>Julian Hyde</name>
      <email>jhyde@apache.org</email>
      <url>https://github.com/julianhyde</url>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-8</timezone>
      <properties />
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>Mondrian developers list</name>
      <post>mondrian@pentaho.org</post>
      <archive>http://lists.pentaho.org/pipermail/mondrian/</archive>
    </mailingList>
  </mailingLists>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <top.dir>${project.basedir}</top.dir>

    <!-- The following list is sorted. -->
    <central-publishing-plugin.version>0.8.0</central-publishing-plugin.version>
    <checkstyle.version>10.26.1</checkstyle.version>
    <commons-lang3.version>3.18.0</commons-lang3.version>
    <commons-logging.version>1.3.5</commons-logging.version>
    <foodmart-data-hsqldb.version>0.5</foodmart-data-hsqldb.version>
    <hsqldb.version>2.7.4</hsqldb.version>
    <hydromatic-toolbox.version>0.3</hydromatic-toolbox.version>
    <junit.version>4.13.2</junit.version>
    <maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
    <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
    <maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
    <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
    <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.11.2</maven-javadoc-plugin.version>
    <maven-scm-provider.version>1.10.0</maven-scm-provider.version>
    <maven-site-plugin.version>3.21.0</maven-site-plugin.version>
    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
    <maven-release-plugin.version>3.0.0-M4</maven-release-plugin.version>
    <maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <site>
      <id>aggdesigner.website</id>
      <name>Aggregate Designer Website</name>
      <url>file:/home/jhyde/web2/aggdesigner</url>
    </site>
  </distributionManagement>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/julianhyde/aggdesigner/issues</url>
  </issueManagement>

  <scm>
    <connection>scm:git:git://github.com/julianhyde/aggdesigner.git</connection>
    <developerConnection>scm:git:git@github.com:julianhyde/aggdesigner.git</developerConnection>
    <url>http://github.com/julianhyde/aggdesigner/tree/main</url>
    <tag>aggdesigner-6.1</tag>
  </scm>

  <modules>
    <module>pentaho-aggdesigner-algorithm</module>
  </modules>

  <dependencyManagement>
    <!-- Dependency versions for all sub-modules.
         Sorted by groupId, artifactId. -->
    <dependencies>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>${commons-logging.version}</version>
      </dependency>
      <dependency>
        <groupId>net.hydromatic</groupId>
        <artifactId>aggdesigner-algorithm</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- Test dependencies. -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>net.hydromatic</groupId>
        <artifactId>aggdesigner-algorithm</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>${hsqldb.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>net.hydromatic</groupId>
        <artifactId>foodmart-data-hsqldb</artifactId>
        <version>${foodmart-data-hsqldb.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <source>8</source>
          <links>
            <link>https://docs.oracle.com/en/java/javase/11/docs/api/</link>
          </links>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <build>
    <defaultGoal>package</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>${maven-dependency-plugin.version}</version>
        <executions>
          <execution>
            <id>properties</id>
            <goals>
              <goal>properties</goal>
            </goals>
            <phase>initialize</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc-plugin.version}</version>
        <configuration>
          <source>8</source>
          <links>
            <link>https://docs.oracle.com/en/java/javase/11/docs/api/</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>${maven-site-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven-source-plugin.version}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <configuration>
              <configLocation>${top.dir}/src/main/config/checkstyle/checker.xml</configLocation>
              <suppressionsLocation>${top.dir}/src/main/config/checkstyle/suppressions.xml</suppressionsLocation>
              <consoleOutput>true</consoleOutput>
              <headerLocation>${top.dir}/src/main/config/checkstyle/header.txt</headerLocation>
              <failOnViolation>true</failOnViolation>
              <includeTestSourceDirectory>true</includeTestSourceDirectory>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${checkstyle.version}</version>
          </dependency>
          <dependency>
            <groupId>net.hydromatic</groupId>
            <artifactId>toolbox</artifactId>
            <version>${hydromatic-toolbox.version}</version>
            <exclusions>
              <exclusion>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven-compiler-plugin.version}</version>
        <configuration>
          <source>8</source>
          <target>8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- If we don't specify gitexe version, git doesn't
             commit during release process. -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>${maven-scm-provider.version}</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>${central-publishing-plugin.version}</version>
        <extensions>true</extensions>
        <configuration>
          <!-- You must define server "central" in your Maven settings.xml. -->
          <publishingServerId>central</publishingServerId>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
