246 lines
8.5 KiB
XML
246 lines
8.5 KiB
XML
<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>
|
|
<groupId>com.example</groupId>
|
|
<artifactId>agent_loader_test</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
<properties>
|
|
<maven.compiler.source>1.8</maven.compiler.source>
|
|
<maven.compiler.target>1.8</maven.compiler.target>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<junit.version>5.6.0</junit.version>
|
|
<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
|
|
<maven-checkstyle-plugin.version>3.1.2</maven-checkstyle-plugin.version>
|
|
<checkstyle.version>8.45.1</checkstyle.version>
|
|
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
|
|
<jacoco-maven-plugin.version>0.8.4</jacoco-maven-plugin.version>
|
|
<maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
|
|
<!-- JaCoCo thresholds. Increase gradually as you add tests. -->
|
|
<jacoco.unit-tests.limit.instruction-ratio>0%</jacoco.unit-tests.limit.instruction-ratio>
|
|
<jacoco.unit-tests.limit.branch-ratio>0%</jacoco.unit-tests.limit.branch-ratio>
|
|
<jacoco.unit-tests.limit.class-complexity>20</jacoco.unit-tests.limit.class-complexity>
|
|
<jacoco.unit-tests.limit.method-complexity>5</jacoco.unit-tests.limit.method-complexity>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>commons-cli</groupId>
|
|
<artifactId>commons-cli</artifactId>
|
|
<version>1.5.0</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-api</artifactId>
|
|
<version>${junit.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.junit.jupiter</groupId>
|
|
<artifactId>junit-jupiter-engine</artifactId>
|
|
<version>${junit.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.sun</groupId>
|
|
<artifactId>tools</artifactId>
|
|
<version>1.8</version>
|
|
<scope>system</scope>
|
|
<systemPath>C:\Program Files\Java\jdk1.8.0_291\lib\tools.jar</systemPath>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.googlecode.json-simple</groupId>
|
|
<artifactId>json-simple</artifactId>
|
|
<version>1.1.1</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-dependencies</id>
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-dependencies</goal>
|
|
</goals>
|
|
|
|
<configuration>
|
|
<includeScope>compile</includeScope>
|
|
<outputDirectory>
|
|
${project.build.directory}/libs
|
|
</outputDirectory>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<configuration>
|
|
<archive>
|
|
<manifest>
|
|
<addClasspath>true</addClasspath>
|
|
<classpathPrefix>libs/</classpathPrefix>
|
|
<mainClass>com.example.App</mainClass>
|
|
</manifest>
|
|
<manifestEntries>
|
|
<Class-Path>libs/tools-1.8.jar</Class-Path>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-enforcer-plugin</artifactId>
|
|
<version>${maven-enforcer-plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>enforce</goal>
|
|
</goals>
|
|
<configuration>
|
|
<rules>
|
|
<requireMavenVersion>
|
|
<version>3.6.3</version>
|
|
</requireMavenVersion>
|
|
</rules>
|
|
<fail>true</fail>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<configuration>
|
|
<descriptors>
|
|
<descriptor>src/assembly/dep.xml</descriptor>
|
|
</descriptors>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>create-archive</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!-- <plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
|
<version>${maven-checkstyle-plugin.version}</version>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>com.puppycrawl.tools</groupId>
|
|
<artifactId>checkstyle</artifactId>
|
|
<version>${checkstyle.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.ngeor</groupId>
|
|
<artifactId>checkstyle-rules</artifactId>
|
|
<version>4.9.3</version>
|
|
</dependency>
|
|
</dependencies>
|
|
<configuration>
|
|
<configLocation>com/github/ngeor/checkstyle.xml</configLocation>
|
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
|
<skip>${skipTests}</skip>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>checkstyle</id>
|
|
<phase>validate</phase>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin> -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<version>${maven-surefire-plugin.version}</version>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<version>${jacoco-maven-plugin.version}</version>
|
|
<executions>
|
|
<execution>
|
|
<id>pre-unit-test</id>
|
|
<goals>
|
|
<goal>prepare-agent</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>post-unit-test</id>
|
|
<phase>test</phase>
|
|
<goals>
|
|
<goal>report</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>check-unit-test</id>
|
|
<phase>test</phase>
|
|
<goals>
|
|
<goal>check</goal>
|
|
</goals>
|
|
<configuration>
|
|
<dataFile>${project.build.directory}/jacoco.exec</dataFile>
|
|
<rules>
|
|
<rule>
|
|
<element>BUNDLE</element>
|
|
<limits>
|
|
<limit>
|
|
<counter>INSTRUCTION</counter>
|
|
<value>COVEREDRATIO</value>
|
|
<minimum>${jacoco.unit-tests.limit.instruction-ratio}</minimum>
|
|
</limit>
|
|
<limit>
|
|
<counter>BRANCH</counter>
|
|
<value>COVEREDRATIO</value>
|
|
<minimum>${jacoco.unit-tests.limit.branch-ratio}</minimum>
|
|
</limit>
|
|
</limits>
|
|
</rule>
|
|
<rule>
|
|
<element>CLASS</element>
|
|
<limits>
|
|
<limit>
|
|
<counter>COMPLEXITY</counter>
|
|
<value>TOTALCOUNT</value>
|
|
<maximum>${jacoco.unit-tests.limit.class-complexity}</maximum>
|
|
</limit>
|
|
</limits>
|
|
</rule>
|
|
<rule>
|
|
<element>METHOD</element>
|
|
<limits>
|
|
<limit>
|
|
<counter>COMPLEXITY</counter>
|
|
<value>TOTALCOUNT</value>
|
|
<maximum>${jacoco.unit-tests.limit.method-complexity}</maximum>
|
|
</limit>
|
|
</limits>
|
|
</rule>
|
|
</rules>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
<reporting>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<version>${maven-javadoc-plugin.version}</version>
|
|
</plugin>
|
|
</plugins>
|
|
</reporting>
|
|
</project> |