<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright (c) 2015 Kumar Rohit
  ~
  ~    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 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 Lesser General Public License for more details.
  ~
  ~    You should have received a copy of the GNU Lesser General Public License
  ~    along with this program.  If not, see <http://www.gnu.org/licenses />.
  -->

<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.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.github.kuros</groupId>
    <artifactId>random-jpa</artifactId>
    <version>2.0.2</version>
    <name>${project.artifactId}</name>

    <description>This project was born out of a need to create test data for complex database hierarchy.
        This project has two main aspects to it:
        * Self managing entity relationship (based on foreign key relationship between tables)
        * Simplifying creation of random data for entities.</description>
    <url>https://github.com/kuros/random-jpa</url>

    <inceptionYear>2015</inceptionYear>

    <licenses>
        <license>
            <name>GNU LESSER GENERAL PUBLIC LICENSE v3</name>
            <url>http://www.gnu.org/licenses/lgpl.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Kumar Rohit</name>
            <email>incrediblevicky at gmail dot com</email>
            <roles>
                <role>Maintainer</role>
                <role>Developer</role>
            </roles>
            <timezone>+5:30</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/kuros/random-jpa.git</connection>
        <developerConnection>scm:git:git@github.com:kuros/random-jpa.git</developerConnection>
        <url>https://github.com/kuros/random-jpa</url>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/kuros/random-jpa/issues</url>
    </issueManagement>

    <properties>
        <hibernate-jpa-2.1-api.version>1.0.0.Final</hibernate-jpa-2.1-api.version>
        <mockito-all.version>5.13.0</mockito-all.version>
        <surefire.version>3.5.0</surefire.version>
        <maven-deploy-plugin.version>2.5</maven-deploy-plugin.version>
        <maven-javadoc-plugin.version>2.7</maven-javadoc-plugin.version>
        <maven-source-plugin.version>2.1.2</maven-source-plugin.version>
        <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.30</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.24.0</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>4.0.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.persistence</groupId>
            <artifactId>jakarta.persistence-api</artifactId>
            <version>3.2.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito-all.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.persistence</groupId>
            <artifactId>eclipselink</artifactId>
            <version>4.0.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>2.7.3</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.11.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>2.3.232</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate.orm</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>6.5.2.Final</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.openpojo</groupId>
            <artifactId>openpojo</artifactId>
            <version>0.9.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>oosrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </repositories>

    <build>
        <testResources>
            <testResource>
                <directory>${project.basedir}/src/test/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </testResource>
            <testResource>
                <directory>${project.basedir}/src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <debug>true</debug>
                    <encoding>UTF-8</encoding>
                    <release>17</release>
                </configuration>
            </plugin>
<!--            <plugin>-->
<!--                <groupId>org.apache.maven.plugins</groupId>-->
<!--                <artifactId>maven-release-plugin</artifactId>-->
<!--                <version>3.1.1</version>-->
<!--                <configuration>-->
<!--                    <arguments>-Psonatype-oss-release,random-jpa-release</arguments>-->
<!--                    <pushChanges>false</pushChanges>-->
<!--                </configuration>-->
<!--            </plugin>-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.version}</version>
                <configuration>
                    <testNGArtifactName>none:none</testNGArtifactName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.12</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>${coveralls-maven-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>random-jpa-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.5.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
<!--                    <plugin>-->
<!--                        <groupId>org.apache.maven.plugins</groupId>-->
<!--                        <artifactId>maven-deploy-plugin</artifactId>-->
<!--                        <version>3.1.3</version>-->
<!--                        <configuration>-->
<!--                            <updateReleaseInfo>true</updateReleaseInfo>-->
<!--                        </configuration>-->
<!--                    </plugin>-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.10.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>package</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>3.7.1</version>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                        <executions>
                            <execution>
                                <id>make-assembly</id> <!-- this is used for inheritance merges -->
                                <phase>package</phase> <!--  bind to the packaging phase -->
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
