|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | + |
| 6 | + <modelVersion>4.0.0</modelVersion> |
| 7 | + |
| 8 | + <groupId>com.example</groupId> |
| 9 | + <artifactId>java-maven-junit-helloworld</artifactId> |
| 10 | + <version>1.0-SNAPSHOT</version> |
| 11 | + <packaging>jar</packaging> |
| 12 | + |
| 13 | + <properties> |
| 14 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 15 | + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 16 | + </properties> |
| 17 | + |
| 18 | + <dependencies> |
| 19 | + <!-- Testing dependencies. --> |
| 20 | + <dependency> |
| 21 | + <groupId>junit</groupId> |
| 22 | + <artifactId>junit</artifactId> |
| 23 | + <version>4.11</version> |
| 24 | + <scope>test</scope> |
| 25 | + </dependency> |
| 26 | + <dependency> |
| 27 | + <groupId>com.github.stefanbirkner</groupId> |
| 28 | + <artifactId>system-rules</artifactId> |
| 29 | + <version>1.4.0</version> |
| 30 | + <scope>test</scope> |
| 31 | + <!-- junit:junit-dep is deprecated, and junit:junit replaces it. --> |
| 32 | + <exclusions> |
| 33 | + <exclusion> |
| 34 | + <groupId>junit</groupId> |
| 35 | + <artifactId>junit-dep</artifactId> |
| 36 | + </exclusion> |
| 37 | + </exclusions> |
| 38 | + </dependency> |
| 39 | + </dependencies> |
| 40 | + |
| 41 | + <build> |
| 42 | + <plugins> |
| 43 | + <plugin> |
| 44 | + <!-- Configures the compiler. --> |
| 45 | + <groupId>org.apache.maven.plugins</groupId> |
| 46 | + <artifactId>maven-compiler-plugin</artifactId> |
| 47 | + <version>3.1</version> |
| 48 | + <configuration> |
| 49 | + <source>1.6</source> |
| 50 | + <target>1.6</target> |
| 51 | + <compilerArgs> |
| 52 | + <arg>-Xlint</arg> |
| 53 | + </compilerArgs> |
| 54 | + </configuration> |
| 55 | + </plugin> |
| 56 | + <plugin> |
| 57 | + <!-- Unit tests are run by surefire. --> |
| 58 | + <!-- Classes under src/test/java called *Test are included automatically. --> |
| 59 | + <!-- Integration tests are run during the test phase. --> |
| 60 | + <groupId>org.apache.maven.plugins</groupId> |
| 61 | + <artifactId>maven-surefire-plugin</artifactId> |
| 62 | + <version>2.16</version> |
| 63 | + </plugin> |
| 64 | + <plugin> |
| 65 | + <!-- Integration tests are run by failsafe. --> |
| 66 | + <!-- Classes under src/test/java called *IT are included automatically. --> |
| 67 | + <!-- Integration tests are run during the verify phase. --> |
| 68 | + <groupId>org.apache.maven.plugins</groupId> |
| 69 | + <artifactId>maven-failsafe-plugin</artifactId> |
| 70 | + <version>2.16</version> |
| 71 | + <executions> |
| 72 | + <execution> |
| 73 | + <goals> |
| 74 | + <goal>integration-test</goal> |
| 75 | + <goal>verify</goal> |
| 76 | + </goals> |
| 77 | + </execution> |
| 78 | + </executions> |
| 79 | + </plugin> |
| 80 | + </plugins> |
| 81 | + </build> |
| 82 | + |
| 83 | + <reporting> |
| 84 | + <plugins> |
| 85 | + <plugin> |
| 86 | + <!-- JUnit code coverage. --> |
| 87 | + <groupId>org.codehaus.mojo</groupId> |
| 88 | + <artifactId>cobertura-maven-plugin</artifactId> |
| 89 | + <version>2.6</version> |
| 90 | + </plugin> |
| 91 | + </plugins> |
| 92 | + </reporting> |
| 93 | + |
| 94 | +</project> |
0 commit comments