<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>

	<parent>
		<groupId>org.metricshub</groupId>
		<artifactId>metricshub-community</artifactId>
		<version>1.0.07</version>
	</parent>

	<artifactId>metricshub-hardware</artifactId>

	<name>MetricsHub Hardware Energy and Sustainability Module</name>
	<description>MetricsHub Hardware Energy and Sustainability Post Processing Module</description>

	<dependencies>
		<!-- MetricsHub Engine -->
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>metricshub-engine</artifactId>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>compile</scope>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.metricshub</groupId>
			<artifactId>metricshub-it-common</artifactId>
			<classifier>tests</classifier>
			<scope>test</scope>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.metricshub</groupId>
			<artifactId>metricshub-snmp-extension</artifactId>
			<scope>test</scope>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.metricshub</groupId>
			<artifactId>metricshub-oscommand-extension</artifactId>
			<scope>test</scope>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.snmp4j</groupId>
			<artifactId>snmp4j-agent</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.snmp4j</groupId>
			<artifactId>snmp4j</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>

		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>

		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
			<testResource>
				<directory>src/it/resources</directory>
			</testResource>
		</testResources>
		<plugins>

			<!-- surefire -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<systemPropertyVariables>
						<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
					</systemPropertyVariables>
					<classpathDependencyExcludes>
						<classpathDependencyExclude>org.apache.logging.log4j:log4j-slf4j-impl</classpathDependencyExclude>
					</classpathDependencyExcludes>
					<argLine>@{argLine} -javaagent:"${org.mockito:mockito-core:jar}"</argLine>
				</configuration>
			</plugin>

			<!-- jacoco -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
					<execution>
						<id>default-check</id>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<rules>
								<rule>
									<element>BUNDLE</element>
									<limits>
										<limit>
											<counter>COMPLEXITY</counter>
											<value>COVEREDRATIO</value>
											<minimum>0.62</minimum>
										</limit>
									</limits>
								</rule>
							</rules>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<excludes>
						<!-- Exclude simple DTO, VO and POJO -->
					</excludes>
				</configuration>
			</plugin>
			<!-- build-helper-maven-plugin -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
					<id>add-test-source</id>
					<phase>generate-test-sources</phase>
					<goals>
						<goal>add-test-source</goal>
					</goals>
					<configuration>
						<sources>
							<source>src/it/java</source>
						</sources>
					</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- failsafe -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<forkCount>1</forkCount>
					<reuseForks>false</reuseForks>
					<argLine>@{argLine}</argLine>
					<includes>
						<include>**/*IT.java</include>
					</includes>
					<classesDirectory>${project.build.outputDirectory}</classesDirectory>
					<trimStackTrace>false</trimStackTrace>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
