<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>net.technolords.tool.jmeter</groupId>
    <artifactId>tcp-sampler-oneway</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <name>Technolords :: Tool :: JMeter :: TCP Sampler Oneway</name>
    <description>
		A TCP Sampler that deals without responses (i.e. one way)
    </description>
    <url>https://github.com/Technolords/tool-jmeter-tcp-oneway</url>

    <!--+
        | Properties
        +-->
    <properties>
        <!--+
            | Project properties
            +-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!--+
            | Version properties
            +-->
        <version.jmeter>3.2</version.jmeter>
        <version.log4j2>2.7</version.log4j2>
        <version.maven.plugin.build.helper>1.12</version.maven.plugin.build.helper>
        <version.maven.plugin.compiler>3.3</version.maven.plugin.compiler>
        <version.maven.plugin.gpg>1.5</version.maven.plugin.gpg>
        <version.maven.plugin.javadoc>2.10.4</version.maven.plugin.javadoc>
        <version.maven.plugin.release>2.5.3</version.maven.plugin.release>
        <version.maven.plugin.shade>2.4.3</version.maven.plugin.shade>
        <version.maven.plugin.source>2.4</version.maven.plugin.source>
        <version.maven.plugin.surefire>2.18.1</version.maven.plugin.surefire>
        <version.maven.plugin.sonatype.nexus.staging>1.6.7</version.maven.plugin.sonatype.nexus.staging>
        <version.testng>6.9.4</version.testng>
    </properties>

    <!--+
        | Source control management
        +-->
    <scm>
        <connection>scm:git:https://github.com/Technolords/tool-jmeter-tcp-oneway</connection>
        <url>https://github.com/Technolords/tool-jmeter-tcp-oneway/</url>
        <tag>1.0.0</tag>
    </scm>

    <!--+
        | License information
        +-->
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <!--+
        | Developers information
        +-->
    <developers>
        <developer>
            <name>Mike Ahlers</name>
            <email>mike@technolords.net</email>
            <organization>Technolords</organization>
            <organizationUrl>https://www.technolords.net</organizationUrl>
        </developer>
    </developers>

    <!--+
        | Dependencies
        +-->
    <dependencies>

        <!--+
            | Default scope
            +-->
        <dependency>
            <groupId>org.apache.jmeter</groupId>
            <artifactId>ApacheJMeter_tcp</artifactId>
            <version>${version.jmeter}</version>
        </dependency>

        <dependency>
            <!-- Required to use logging -->
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${version.log4j2}</version>
        </dependency>

        <dependency>
            <!-- Required to use logging -->
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${version.log4j2}</version>
        </dependency>

        <dependency>
            <!-- Required to bridge slf4j over log4j -->
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>${version.log4j2}</version>
        </dependency>

        <dependency>
            <!-- Required to use log4j correctly from jetty -->
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-web</artifactId>
            <version>${version.log4j2}</version>
        </dependency>

        <!--+
            | Test scope
            +-->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${version.testng}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <!--+
        | Build
        +-->
    <build>
        <!-- Allow placeholders in files in resources folder to be translated -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <defaultGoal>install</defaultGoal>

        <plugins>

            <plugin>
                <!-- Required to compile the java sources against a JVM spec -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${version.maven.plugin.compiler}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <!-- Required to perform a release (Maven Central) -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${version.maven.plugin.release}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>

            <plugin>
                <!-- Required to suppress Javadoc validation (during release process) -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${version.maven.plugin.javadoc}</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>

            <plugin>
                <!-- Release plugin configuration-->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${version.maven.plugin.release}</version>
                <configuration>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>

            <plugin>
                <!-- Required to execute unit tests, supporting both JUnit and TestNG -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${version.maven.plugin.surefire}</version>
                <configuration>
                    <useFile>true</useFile>
                    <failIfNoTests>false</failIfNoTests>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>exec-with-testng</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <testNGArtifactName>none:none</testNGArtifactName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>test-with-junit</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <junitArtifactName>none:none</junitArtifactName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <!-- Required to generate timestamp with correct timezone -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${version.maven.plugin.build.helper}</version>
                <executions>
                    <execution>
                        <id>timestamp-property</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>timestamp-property</goal>
                        </goals>
                        <configuration>
                            <name>build.timestamp</name>
                            <pattern>yyyy-MM-dd HH:mm:ss</pattern>
                            <timeZone>Etc/GMT-1</timeZone>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <!-- Required to interact with OSSRH -->
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${version.maven.plugin.sonatype.nexus.staging}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

        </plugins>

    </build>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>

                    <plugin>
                        <!-- Required to sign the artifacts with a GPG key -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.maven.plugin.gpg}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <!-- Generate java doc as additional artifact -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${version.maven.plugin.javadoc}</version>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <!-- Generate sources as additional artifact -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${version.maven.plugin.source}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

</project>
