<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>io.github.giis-uniovi</groupId>
	<artifactId>tdrules</artifactId>
	<version>4.6.2</version>
	<packaging>pom</packaging>

	<name>tdrules</name>
	<description>TdRules - Test Data Generation and Coverage Evaluation</description>
	<url>http://github.com/giis-uniovi/tdrules</url>
	<organization>
		<name>Software Engineering Research Group (GIIS) - Universidad de Oviedo, ES</name>
		<url>http://giis.uniovi.es/</url>
	</organization>

	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<surefire.version>3.5.4</surefire.version>
		
		<portable.version>2.4.3</portable.version>

		<visual-assert.version>2.6.1</visual-assert.version>

		<httpclient-version>5.5.1</httpclient-version>
		
		<mockserver.version>5.15.0</mockserver.version>

		<openapi.generator.version>7.17.0</openapi.generator.version>
		
		<spring.boot.version>4.0.0</spring.boot.version>
	</properties>

	<modules>
		<module>tdrules-model</module>
		<module>tdrules-client</module>
		<module>tdrules-bom</module>
		<module>tdrules-store-shared</module>
		<module>tdrules-store-rdb</module>
		<module>tdrules-client-rdb</module>
		<module>tdrules-client-oa</module>
		<module>tdrules-store-loader</module>
		<module>tdrules-it</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.github.javiertuya</groupId>
				<artifactId>portable-java</artifactId>
				<version>${portable.version}</version>
			</dependency>

			<!-- OpenApi dependencies (uses the jackson bom as many modules are used) -->
			<dependency>
				<groupId>com.fasterxml.jackson</groupId>
				<artifactId>jackson-bom</artifactId>
				<version>2.20.1</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.openapitools</groupId>
				<artifactId>jackson-databind-nullable</artifactId>
				<version>0.2.8</version>
			</dependency>
			<!-- HTTP client: apache client -->
			<dependency>
				<groupId>org.apache.httpcomponents.client5</groupId>
				<artifactId>httpclient5</artifactId>
				<version>${httpclient-version}</version>
			</dependency>
			<dependency>
			    <groupId>org.apache.commons</groupId>
			    <artifactId>commons-lang3</artifactId>
			    <version>3.20.0</version>
			</dependency>
			<!-- other dependencies -->
			<dependency>
				<groupId>io.swagger.parser.v3</groupId>
				<artifactId>swagger-parser</artifactId>
				<version>2.1.35</version>
			</dependency>
			<dependency>
				<groupId>io.swagger</groupId>
				<artifactId>swagger-annotations</artifactId>
				<version>1.6.16</version>
			</dependency>
			<dependency>
				<groupId>com.google.code.findbugs</groupId>
				<artifactId>jsr305</artifactId>
				<version>3.0.2</version>
			</dependency>
			<dependency>
				<groupId>javax.annotation</groupId>
				<artifactId>javax.annotation-api</artifactId>
				<version>1.3.2</version>
			</dependency>

			<!-- Service mocks, if any problem with dependencies, use the shaded artifact: https://github.com/mock-server/mockserver -->
			<dependency>
				<groupId>org.mock-server</groupId>
				<artifactId>mockserver-netty</artifactId>
				<version>${mockserver.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mock-server</groupId>
				<artifactId>mockserver-client-java</artifactId>
				<version>${mockserver.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
			    <groupId>org.jsmart</groupId>
			    <artifactId>zerocode-tdd</artifactId>
			    <version>1.3.45</version>
			    <scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>2.0.17</version>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-slf4j2-impl</artifactId>
				<version>2.25.2</version>
				<scope>test</scope>
			</dependency>

			<!-- Only for test -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.13.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>pl.pragmatists</groupId>
				<artifactId>JUnitParams</artifactId>
				<version>1.1.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>io.github.javiertuya</groupId>
				<artifactId>visual-assert</artifactId>
				<version>${visual-assert.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.21.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>commons-dbutils</groupId>
				<artifactId>commons-dbutils</artifactId>
				<version>1.8.1</version>
				<scope>test</scope>
			</dependency>
			
			<!-- test databases for store rdb -->
			<dependency>
				<groupId>com.microsoft.sqlserver</groupId>
				<artifactId>mssql-jdbc</artifactId>
				<version>13.2.1.jre8</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.postgresql</groupId>
				<artifactId>postgresql</artifactId>
				<version>42.7.8</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.oracle.database.jdbc</groupId>
				<artifactId>ojdbc8</artifactId>
				<!-- latest: 23.26.0.0.0 does not work on windows with gvenzl/oracle-xe:21.3.0-slim-faststart
				     error: ORA-01005 null password given, use 21.14.0.0 -->
				<version>23.26.0.0.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.xerial</groupId>
				<artifactId>sqlite-jdbc</artifactId>
				<version>3.51.0.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
    			<groupId>com.ing.data</groupId>
    			<artifactId>cassandra-jdbc-wrapper</artifactId>
    			<version>4.16.1</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${surefire.version}</version>
					<configuration>
						<testFailureIgnore>true</testFailureIgnore>
						<!-- Sets the VM argument line used when unit tests are run under JaCoCo -->
						<argLine>${surefireArgLine}</argLine>
						<redirectTestOutputToFile>true</redirectTestOutputToFile>
						<!-- evita fallo con jenkins slave linux y openjdk: https://stackoverflow.com/questions/23260057/the-forked-vm-terminated-without-saying-properly-goodbye-vm-crash-or-system-exi/53070605 -->
						<useSystemClassLoader>false</useSystemClassLoader>
						<skipTests>${skipTests}</skipTests>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-report-plugin</artifactId>
					<version>${surefire.version}</version>
					<executions>
						<execution>
							<id>ut-reports</id>
							<phase>test</phase>
							<goals>
								<goal>report-only</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>0.8.14</version>
					<executions>
						<execution>
							<id>pre-unit-test</id>
							<phase>process-test-resources</phase>
							<goals>
								<goal>prepare-agent</goal>
							</goals>
							<configuration>
								<destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
								<propertyName>surefireArgLine</propertyName>
							</configuration>
						</execution>
						<execution>
							<id>post-unit-test</id>
							<phase>test</phase>
							<goals>
								<goal>report</goal>
							</goals>
							<configuration>
								<dataFile>${project.build.directory}/coverage-reports/jacoco.exec</dataFile>
								<outputDirectory>${project.reporting.outputDirectory}/jacoco</outputDirectory>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>3.2.0</version>
					<executions>
						<!-- Aggregate junit style reports -->
						<execution>
							<id>junit-reports</id>
							<phase>test</phase>
							<configuration>
								<target unless="skipTests">
									<junitreport>
										<fileset dir="${project.basedir}/target/surefire-reports" erroronmissingdir="false">
											<include name="**/*.xml" />
										</fileset>
										<report format="frames" todir="${project.reporting.outputDirectory}/junit-frames" />
										<report format="noframes" todir="${project.reporting.outputDirectory}/junit-noframes" />
									</junitreport>
								</target>
							</configuration>
							<goals>
								<goal>run</goal>
							</goals>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>org.apache.ant</groupId>
							<artifactId>ant-junit</artifactId>
							<version>1.10.15</version>
						</dependency>
						<dependency>
							<groupId>org.apache.ant</groupId>
							<artifactId>ant-trax</artifactId>
							<version>1.8.0</version>
						</dependency>
					</dependencies>
				</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.12.0</version>
					<configuration>
						<quiet>true</quiet>
						<doclint>none</doclint>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<phase>package</phase>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<developers>
		<developer>
			<name>Javier Tuya</name>
			<url>http://giis.uniovi.es</url>
		</developer>
		<developer>
			<name>Maria Jose Suarez-Cabal</name>
			<url>http://giis.uniovi.es</url>
		</developer>
		<developer>
			<name>Claudio de la Riva</name>
			<url>http://giis.uniovi.es</url>
		</developer>
	</developers>
	<licenses>
		<license>
			<name>Apache-2.0</name>
			<url>https://github.com/giis-uniovi/tdrules/blob/main/LICENSE</url>
		</license>
	</licenses>
	<scm>
		<url>https://github.com/giis-uniovi/tdrules</url>
	</scm>

	<!-- To publish packages (mvn deploy) a profile must be specified (github for snapsots and maven central for releases) -->
	<profiles>
		<profile>
			<id>publish-github</id>
			<distributionManagement>
				<snapshotRepository>
					<id>github</id>
					<name>GitHub Apache Maven Packages</name>
					<url>https://maven.pkg.github.com/giis-uniovi/tdrules</url>
				</snapshotRepository>
			</distributionManagement>
		</profile>
		<profile>
			<id>publish-maven</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>0.9.0</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
							<autoPublish>true</autoPublish>
							<waitUntil>published</waitUntil>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.2.8</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<distributionManagement>
				<!--
				<repository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
				</snapshotRepository>
				-->
			</distributionManagement>
		</profile>
	</profiles>
</project>
