<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>de.rwth.i2</groupId>
    <artifactId>attestor-examples</artifactId>
    <version>0.3.2</version>
    <packaging>jar</packaging>


    <name>Attestor Benchmark Collection</name>
    <description>Collection of executable benchmarks for Attestor.</description>
    <url>https://github.com/moves-rwth/attestor-examples</url>


    <licenses>
        <license>
            <name>GNU General Public License, version 3</name>
            <url>https://opensource.org/licenses/GPL-3.0</url>
        </license>
    </licenses>


    <developers>
        <developer>
            <name>Christoph Matheja</name>
            <email>matheja@cs.rwth-aachen.de</email>
            <organization>Software Modeling and Verification Group - RWTH Aachen University</organization>
            <organizationUrl>https://moves.rwth-aachen.de/</organizationUrl>
        </developer>
        <developer>
            <name>Dr. Christina Jansen</name>
            <email>christina.jansen@cs.rwth-aachen.de</email>
            <organization>Software Modeling and Verification Group - RWTH Aachen University</organization>
            <organizationUrl>https://moves.rwth-aachen.de/</organizationUrl>
        </developer>
        <developer>
            <name>Hannah Arndt</name>
            <email>hannah.arndt@rwth-aachen.de</email>
            <organization>Software Modeling and Verification Group - RWTH Aachen University</organization>
            <organizationUrl>https://moves.rwth-aachen.de/</organizationUrl>
        </developer>
    </developers>


    <scm>
        <connection>scm:git:git://github.com/moves-rwth/attestor-examples.git</connection>
        <developerConnection>scm:git:ssh://github.com/moves-rwth/attestor-examples.git</developerConnection>
        <url>https://github.com/moves-rwth/attestor-examples/tree/master</url>
    </scm>


    <properties>
        <benchmarkHelper.version>0.3.2</benchmarkHelper.version>
        <jmh.version>1.19</jmh.version>
        <javac.target>1.8</javac.target>
        <uberjar.name>benchmarks</uberjar.name>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>


    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>


    <build>
        <plugins>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.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.0.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <compilerVersion>${javac.target}</compilerVersion>
                    <source>${javac.target}</source>
                    <target>${javac.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <finalName>${uberjar.name}</finalName>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>org.openjdk.jmh.Main</mainClass>
                                </transformer>
                            </transformers>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.6.0</version>
                <executions>
                    <execution>
                        <id>run</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <arguments>
                                <argument>-Dattestor.ne=true</argument>
                                <argument>-Dattestor.checkExpectedSize=true</argument>
                                <argument>-Djmh.ignoreLock=true</argument>
                                <argument>-jar</argument>
                                <argument>${project.build.directory}${file.separator}benchmarks.jar</argument>
                                <argument>-bm</argument>
                                <argument>ss</argument>
                                <argument>-f</argument>
                                <argument>1</argument>
                                <argument>-rf</argument>
                                <argument>text</argument>
                                <argument>-foe</argument>
                                <argument>true</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>runWithReport</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <arguments>
                                <argument>-Dattestor.checkExpectedSize=true</argument>
                                <argument>-Djmh.ignoreLock=true</argument>
                                <argument>-jar</argument>
                                <argument>${project.build.directory}${file.separator}benchmarks.jar</argument>
                                <argument>-bm</argument>
                                <argument>ss</argument>
                                <argument>-f</argument>
                                <argument>1</argument>
                                <argument>-rf</argument>
                                <argument>text</argument>
                                <argument>-foe</argument>
                                <argument>true</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>benchmark</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <arguments>
                                <argument>-Dattestor.ne=true</argument>
                                <argument>-Dattestor.checkExpectedSize=false</argument>
                                <argument>-Djmh.ignoreLock=true</argument>
                                <argument>-jar</argument>
                                <argument>${project.build.directory}${file.separator}benchmarks.jar</argument>
                                <argument>-bm</argument>
                                <argument>avgt</argument>
                                <argument>-f</argument>
                                <argument>1</argument>
                                <argument>-rf</argument>
                                <argument>text</argument>
                                <argument>-foe</argument>
                                <argument>true</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <executable>java</executable>
                </configuration>
            </plugin>
        </plugins>
    </build>


    <dependencies>
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-core</artifactId>
            <version>${jmh.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-generator-annprocess</artifactId>
            <version>${jmh.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>de.rwth.i2</groupId>
            <artifactId>attestor-benchmark-helper</artifactId>
            <version>${benchmarkHelper.version}</version>
        </dependency>
    </dependencies>

</project>
