<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE htmlEntities [
      <!ENTITY nbsp "&#xa0;">
      ]>
<!--suppress MavenModelInspection, XmlWrongRootElement -->
<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>org.perfcake</groupId>
      <artifactId>perfcake-parent</artifactId>
      <version>7.0</version>
   </parent>
   <artifactId>perfcake-agent</artifactId>
   <packaging>jar</packaging>
   <name>PerfCake Agent</name>
   <organization>
      <name>PerfCake Community</name>
      <url>https://www.perfcake.org</url>
   </organization>
   <description>JVM Agent for PerfCake</description>
   <url>https://www.perfcake.org</url>
   <inceptionYear>2010</inceptionYear>
   <scm>
      <url>https://github.com/PerfCake/PerfCake</url>
      <connection>scm:git:git://github.com/PerfCake/PerfCake.git</connection>
      <developerConnection>scm:git:git@github.com:PerfCake/PerfCake.git</developerConnection>
      <tag>v7.0</tag>
   </scm>
   <licenses>
      <license>
         <name>The Apache Software License, Version 2.0</name>
         <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
         <distribution>repo</distribution>
         <comments>A business-friendly OSS license</comments>
      </license>
   </licenses>
   <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>
   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

      <version.jacoco>0.7.7.201606060606</version.jacoco>
      <version.velocity>1.7</version.velocity>
      <version.puppycrawl>7.1</version.puppycrawl>

      <java.level>1.7</java.level>
   </properties>
   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>org.perfcake</groupId>
            <artifactId>perfcake-bom</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>

   <dependencies>
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-core</artifactId>
      </dependency>
      <dependency>
         <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-1.2-api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-log4j12</artifactId>
      </dependency>

      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.jacoco</groupId>
         <artifactId>org.jacoco.core</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>com.google.code.findbugs</groupId>
         <artifactId>annotations</artifactId>
         <scope>provided</scope>
      </dependency>
   </dependencies>
   <build>
      <resources>
         <resource>
            <directory>src/main/resources</directory>
            <excludes>
               <exclude>log4j2.xml</exclude>
            </excludes>
         </resource>
      </resources>
      <plugins>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>${maven.license.plugin.version}</version>
            <configuration>
               <verbose>false</verbose>
               <addSvnKeyWords>false</addSvnKeyWords>
               <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
               <processStartTag>-----------------------------------------------------------------------\</processStartTag>
               <processEndTag>-----------------------------------------------------------------------/</processEndTag>
               <sectionDelimiter> 
               </sectionDelimiter>
               <organizationName>the original author or authors.</organizationName>
               <licenseName>apache_v2</licenseName>
               <roots>
                  <root>src/main/java</root>
                  <root>src/test/java</root>
               </roots>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${version.jacoco}</version>
            <configuration>
               <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
               <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
               <includes>
                  <include>org/perfcake/**</include>
               </includes>
            </configuration>
            <executions>
               <execution>
                  <id>jacoco-initialize</id>
                  <goals>
                     <goal>prepare-agent</goal>
                  </goals>
               </execution>
               <execution>
                  <id>jacoco-site</id>
                  <phase>package</phase>
                  <goals>
                     <goal>report</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven.surefire.plugin.version}</version>
            <configuration>
               <!-- Fork every test because it will launch a separate AS instance -->
               <forkCount>1</forkCount>
               <reuseForks>false</reuseForks>
               <redirectTestOutputToFile>false</redirectTestOutputToFile>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>${maven.site.plugin.version}</version>
            <dependencies>
               <dependency>
                  <groupId>lt.velykis.maven.skins</groupId>
                  <artifactId>reflow-velocity-tools</artifactId>
                  <version>1.1.1</version>
               </dependency>
               <!-- Reflow skin requires Velocity >= 1.7  -->
               <dependency>
                  <groupId>org.apache.velocity</groupId>
                  <artifactId>velocity</artifactId>
                  <version>${version.velocity}</version>
               </dependency>
            </dependencies>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven.source.plugin.version}</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>${maven.javadoc.plugin.version}</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>${maven.gpg.plugin.version}</version>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>${maven.checkstyle.plugin.version}</version>
            <executions>
               <execution>
                  <id>validate</id>
                  <phase>validate</phase>
                  <goals>
                     <goal>check</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <configLocation>../perfcake/src/site/perfcake-check.xml</configLocation>
               <encoding>UTF-8</encoding>
               <consoleOutput>true</consoleOutput>
               <failsOnError>false</failsOnError>
               <linkXRef>false</linkXRef>
               <excludes>org/perfcake/model/*</excludes>
            </configuration>
            <dependencies>
               <dependency>
                  <groupId>com.puppycrawl.tools</groupId>
                  <artifactId>checkstyle</artifactId>
                  <version>${version.puppycrawl}</version>
               </dependency>
            </dependencies>
         </plugin>
      </plugins>
      <pluginManagement>
         <plugins>
            <plugin>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>${maven.compiler.plugin.version}</version>
               <configuration>
                  <source>${java.level}</source>
                  <target>${java.level}</target>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-jar-plugin</artifactId>
               <version>${maven.jar.plugin.version}</version>
               <configuration>
                  <archive>
                     <manifest>
                        <addClasspath>true</addClasspath>
                        <mainClass>org.perfcake.agent.PerfCakeAgent</mainClass>
                     </manifest>
                     <manifestEntries>
                        <Premain-class>org.perfcake.agent.PerfCakeAgent</Premain-class>
                        <Agent-class>org.perfcake.agent.PerfCakeAgent</Agent-class>
                        <Class-Path>../resources/ ../</Class-Path>
                     </manifestEntries>
                  </archive>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-assembly-plugin</artifactId>
               <version>${maven.assembly.plugin.version}</version>
               <configuration>
                  <descriptors>
                     <descriptor>${basedir}/src/main/assembly/bin.xml</descriptor>
                     <descriptor>${basedir}/src/main/assembly/src.xml</descriptor>
                  </descriptors>
                  <skipAssembly>false</skipAssembly>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-clean-plugin</artifactId>
               <version>${maven.clean.plugin.version}</version>
               <configuration>
                  <filesets>
                     <fileset>
                        <directory>${basedir}</directory>
                        <includes>
                           <include>logs</include>
                           <include>*.log*</include>
                        </includes>
                        <followSymlinks>false</followSymlinks>
                     </fileset>
                     <fileset>
                        <directory>${basedir}/test-output</directory>
                     </fileset>
                  </filesets>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-javadoc-plugin</artifactId>
               <version>${maven.javadoc.plugin.version}</version>
               <configuration>
                  <windowtitle>${project.name} API Documentation (version ${project.version})</windowtitle>
                  <doctitle>${project.name} API Documentation (version ${project.version})</doctitle>
                  <show>public</show>
                  <stylesheetfile>${basedir}/../perfcake/src/main/javadoc/javadoc.css</stylesheetfile>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-gpg-plugin</artifactId>
               <version>${maven.gpg.plugin.version}</version>
               <configuration>
                  <useAgent>true</useAgent>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>${maven.surefire.plugin.version}</version>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>
   <reporting>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>${maven.project.info.reports.plugin.version}</version>
            <configuration>
               <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
            <version>${maven.findbugs.plugin.version}</version>
         </plugin>
         <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${version.jacoco}</version>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>${maven.checkstyle.plugin.version}</version>
            <reportSets>
               <reportSet>
                  <reports>
                     <report>checkstyle</report>
                  </reports>
               </reportSet>
            </reportSets>
            <configuration>
               <configLocation>../perfcake/src/site/perfcake-check.xml</configLocation>
               <encoding>UTF-8</encoding>
               <consoleOutput>true</consoleOutput>
               <failsOnError>false</failsOnError>
               <linkXRef>false</linkXRef>
               <excludes>org/perfcake/model/*</excludes>
            </configuration>
         </plugin>
      </plugins>
   </reporting>
   <profiles>
      <profile>
         <id>sign</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>basicTests</id>
         <activation>
            <activeByDefault>true</activeByDefault>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <excludedGroups>ueber</excludedGroups>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
      <profile>
         <id>allTests</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
               </plugin>
            </plugins>
         </build>
      </profile>

      <profile>
         <!--Only use this dependency if a tools.jar file exists in the JDK's lib directory-->
         <id>toosjar-profile</id>
         <activation>
            <file>
               <exists>${java.home}/../lib/tools.jar</exists>
            </file>
         </activation>
         <properties>
            <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
         </properties>
         <dependencies>
            <dependency>
               <!--Need tools.jar in compilation classpath. JDK 1.7 no longer has it there by default: -->
               <groupId>com.sun</groupId>
               <artifactId>tools</artifactId>
               <!-- version number is irrelevant since we exclude this from the dependencies plugin: -->
               <version>99.9.9</version>
               <scope>system</scope>
               <systemPath>${java.home}/../lib/tools.jar</systemPath>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>only-eclipse</id>
         <activation>
            <property>
               <name>m2e.version</name>
            </property>
         </activation>
         <build>
            <pluginManagement>
               <plugins>
                  <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
                  <plugin>
                     <groupId>org.eclipse.m2e</groupId>
                     <artifactId>lifecycle-mapping</artifactId>
                     <version>1.0.0</version>
                     <configuration>
                        <lifecycleMappingMetadata>
                           <pluginExecutions>
                              <pluginExecution>
                                 <pluginExecutionFilter>
                                    <groupId>org.jacoco</groupId>
                                    <artifactId>jacoco-maven-plugin</artifactId>
                                    <versionRange>[0.7.6.201602180812,)</versionRange>
                                    <goals>
                                       <goal>prepare-agent</goal>
                                    </goals>
                                 </pluginExecutionFilter>
                                 <action>
                                    <ignore/>
                                 </action>
                              </pluginExecution>
                              <pluginExecution>
                                 <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-dependency-plugin</artifactId>
                                    <versionRange>[1.0.0,)</versionRange>
                                    <goals>
                                       <goal>unpack</goal>
                                    </goals>
                                 </pluginExecutionFilter>
                                 <action>
                                    <execute/>
                                 </action>
                              </pluginExecution>
                              <pluginExecution>
                                 <pluginExecutionFilter>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>xml-maven-plugin</artifactId>
                                    <versionRange>[1.0.0,)</versionRange>
                                    <goals>
                                       <goal>transform</goal>
                                    </goals>
                                 </pluginExecutionFilter>
                                 <action>
                                    <execute/>
                                 </action>
                              </pluginExecution>
                           </pluginExecutions>
                        </lifecycleMappingMetadata>
                     </configuration>
                  </plugin>
               </plugins>
            </pluginManagement>
         </build>
      </profile>
   </profiles>
</project>
