<?xml version="1.0" encoding="UTF-8"?>
<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>
	<groupId>com.biit-solutions</groupId>
	<artifactId>jpa-schema-exporter</artifactId>
	<version>0.5.19</version>
	<packaging>jar</packaging>
	<name>JPA Schema Exporter</name>
	<description>Creates a Script for Exporting the Tables created by Hibernate</description>

	<parent>
		<groupId>com.biit-solutions</groupId>
		<artifactId>versions</artifactId>
		<version>[0.1,0.2)</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>

	<licenses>
		<license>
			<name>GNU AGPL v3</name>
			<url>https://www.gnu.org/licenses/agpl-3.0.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<organization>
		<name>BiiT Sourcing Solutions S.L.</name>
		<url>https://www.biit-solutions.com/</url>
	</organization>

	<distributionManagement>
		<repository>
			<id>central</id>
			<name>Maven Central</name>
			<url>https://repo.maven.apache.org/maven2</url>
		</repository>
		<snapshotRepository>
			<id>github</id>
			<name>GitHub Packages</name>
			<url>https://maven.pkg.github.com/BiiT-Solutions/BiiTSchemaExporter</url>
		</snapshotRepository>
	</distributionManagement>

	<scm>
		<connection>scm:git:ssh://git@github.com/BiiT-Solutions/BiiTSchemaExporter.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/BiiT-Solutions/BiiTSchemaExporter.git</developerConnection>
		<url>https://github.com/BiiT-Solutions/BiiTSchemaExporter.git</url>
		<tag>jpa-schema-exporter-0.5.19</tag>
	</scm>

	<properties>
		<jpaschemaexporter.script.autogeneration.folder>${root.directory}/abcd-release/database
		</jpaschemaexporter.script.autogeneration.folder>
		<jpaschemaexporter.script.autogeneration.file>create_mysql.sql</jpaschemaexporter.script.autogeneration.file>
		<jpaschemaexporter.script.scan.packages>com.biit.persistence.entity
		</jpaschemaexporter.script.scan.packages>
		<jpaschemaexporter.script.output.dir>${project.build.directory}</jpaschemaexporter.script.output.dir>
		<jpaschemaexporter.script.database.user>testuser</jpaschemaexporter.script.database.user>
		<jpaschemaexporter.script.database.password>asd123</jpaschemaexporter.script.database.password>
		<jpaschemaexporter.script.database.host>vagrant-mysql.biit-solutions.com
		</jpaschemaexporter.script.database.host>
		<jpaschemaexporter.script.database.port>3306</jpaschemaexporter.script.database.port>
		<jpaschemaexporter.script.database.name>test</jpaschemaexporter.script.database.name>
		<jpaschemaexporter.script.database.scripts />
		<jpaschemaexporter.script.database.creation.ignored.classes />
		<jpaschemaexporter.script.database.update.ignored.classes />
	</properties>


	<dependencies>
		<!-- File access and logger -->
		<dependency>
			<groupId>com.biit-solutions</groupId>
			<artifactId>common-utils</artifactId>
		</dependency>
		<!-- Hibernate -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
		</dependency>
		<!-- Testing -->
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire.version}</version>
				<configuration>
					<useFile>false</useFile>
					<trimStackTrace>false</trimStackTrace>
					<suiteXmlFiles>
						<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
					</suiteXmlFiles>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<source>${java.jdk.version}</source>
					<target>${java.jdk.version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>${maven-resources-plugin.version}</version>
			</plugin>
			<plugin>
				<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-gitexe.version}</version>
					</dependency>
				</dependencies>
				<configuration>
					<checkModificationExcludes>
						<checkModificationExclude>pom.xml</checkModificationExclude>
					</checkModificationExcludes>
				</configuration>
			</plugin>
<!--			<plugin>-->
<!--				<artifactId>maven-antrun-plugin</artifactId>-->
<!--				<version>${maven-antrun-plugin.version}</version>-->
<!--				<executions>-->
<!--					<execution>-->
<!--						<phase>compile</phase>-->
<!--						<configuration>-->
<!--							<target>-->
<!--								<delete file="${jpaschemaexporter.script.autogeneration.folder}/${jpaschemaexporter.script.autogeneration.file}" failonerror="false" />-->
<!--								<java fork="false" failonerror="true" classname="com.biit.persistence.JpaSchemaExporter">-->
<!--									<arg value="${jpaschemaexporter.script.autogeneration.folder}" />-->
<!--									<arg value="${jpaschemaexporter.script.autogeneration.file}" />-->
<!--									<arg value="${jpaschemaexporter.script.scan.packages}" />-->
<!--									<arg value="${jpaschemaexporter.script.database.user}" />-->
<!--									<arg value="${jpaschemaexporter.script.database.password}" />-->
<!--									<arg value="${jpaschemaexporter.script.database.host}" />-->
<!--									<arg value="${jpaschemaexporter.script.database.port}" />-->
<!--									<arg value="${jpaschemaexporter.script.database.name}" />-->
<!--									<arg value="${jpaschemaexporter.script.database.scripts}" />-->
<!--									<arg value="${jpaschemaexporter.script.database.creation.ignored.classes}" />-->
<!--									<arg value="${jpaschemaexporter.script.database.update.ignored.classes}" />-->
<!--									<classpath refid="maven.compile.classpath" />-->
<!--								</java>-->
<!--							</target>-->
<!--						</configuration>-->
<!--						<goals>-->
<!--							<goal>run</goal>-->
<!--						</goals>-->
<!--					</execution>-->
<!--				</executions>-->
<!--			</plugin>-->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>${license-maven-plugin.version}</version>
				<configuration>
					<organizationName>BiiT Sourcing Solutions S.L.</organizationName>
					<inceptionYear>2022</inceptionYear>
					<licenseName>agpl_v3</licenseName>
					<excludes>
						<exclude>**/*.properties</exclude>
						<exclude>**/*.xml</exclude>
						<exclude>**/*.json</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<id>first</id>
						<goals>
							<goal>update-file-header</goal>
						</goals>
						<phase>package</phase>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>