<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>io.smartcat</groupId>
        <artifactId>cassandra-diagnostics</artifactId>
        <version>1.0.0</version>
    </parent>
    <artifactId>cassandra-diagnostics-core</artifactId>
    <packaging>jar</packaging>

	<properties>
		<version.snakeyaml>1.11</version.snakeyaml>
		<version.commons.lang3>3.4</version.commons.lang3>
	</properties>

	<dependencies>
		<dependency>
			<groupId>io.smartcat</groupId>
			<artifactId>cassandra-diagnostics-commons</artifactId>
			<version>1.0.0</version>
		</dependency>
		<dependency>
			<groupId>org.yaml</groupId>
			<artifactId>snakeyaml</artifactId>
			<version>${version.snakeyaml}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${version.commons.lang3}</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<shadedArtifactAttached>false</shadedArtifactAttached>
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<artifactSet>
								<includes>
									<include>io.smartcat:*</include>
								</includes>
							</artifactSet>
							<transformers>
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<manifestEntries>
										<Created-By>SmartCat</Created-By>
										<Premain-Class>io.smartcat.cassandra.diagnostics.DiagnosticsAgent
										</Premain-Class>
										<Can-Redefine-Classes>true</Can-Redefine-Classes>
										<Can-Retransform-Classes>true</Can-Retransform-Classes>
										<Can-Set-Native-Method-Prefix>true</Can-Set-Native-Method-Prefix>
									</manifestEntries>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>