<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  ToPIA :: Templates
  %%
  Copyright (C) 2004 - 2026 Code Lutin
  %%
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as
  published by the Free Software Foundation, either version 3 of the
  License, or (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Lesser Public License for more details.
  You should have received a copy of the GNU General Lesser Public
  License along with this program.  If not, see
  <http://www.gnu.org/licenses/lgpl-3.0.html>.
  #L%
  -->

<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.nuiton</groupId>
    <artifactId>topia</artifactId>
    <version>4.1-SNAPSHOT</version>
  </parent>

  <groupId>org.nuiton.topia</groupId>
  <artifactId>topia-templates</artifactId>
  <packaging>jar</packaging>

  <name>ToPIA :: Templates</name>
  <description>Persistence templates</description>

  <dependencies>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>topia-persistence</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- Pas utilisé directement mais dans les templates générés, donc on a besoin de la dépendance -->
    <dependency>
      <groupId>org.hibernate.orm</groupId>
      <artifactId>hibernate-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.nuiton.eugene</groupId>
      <artifactId>eugene</artifactId>
    </dependency>

    <dependency>
      <groupId>org.nuiton.eugene</groupId>
      <artifactId>eugene-java-templates</artifactId>
    </dependency>

    <dependency>
      <groupId>org.nuiton</groupId>
      <artifactId>nuiton-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.nuiton.i18n</groupId>
      <artifactId>nuiton-i18n</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-collections4</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-component-annotations</artifactId>
    </dependency>

  </dependencies>

  <build>

    <plugins>

      <!-- process templates -->
      <plugin>
        <groupId>org.nuiton.processor</groupId>
        <artifactId>processor-maven-plugin</artifactId>
      </plugin>

      <!-- expose new plexus components -->
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.nuiton.eugene</groupId>
        <artifactId>eugene-maven-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>${project.artifactId}</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>org.nuiton</groupId>
            <artifactId>nuiton-version</artifactId>
            <version>1.0-rc-2</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.nuiton.i18n</groupId>
        <artifactId>i18n-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>parserJava</goal>
              <goal>gen</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <ignoredUnusedDeclaredDependencies>org.hibernate.orm:hibernate-core</ignoredUnusedDeclaredDependencies>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>

    <!-- reporting at release time -->
    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <reporting>
        <plugins>

          <plugin>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-maven-plugin</artifactId>
            <version>${plexusPluginVersion}</version>
          </plugin>

          <plugin>
            <groupId>org.nuiton.eugene</groupId>
            <artifactId>eugene-maven-plugin</artifactId>
            <reportSets>
              <reportSet>
                <reports>
                  <report>tag-values-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

        </plugins>
      </reporting>

    </profile>

  </profiles>
</project>
