1<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 2 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 3 <modelVersion>4.0.0</modelVersion> 4 5 <groupId>com.android.volley</groupId> 6 <artifactId>volley</artifactId> 7 <version>1.0-SNAPSHOT</version> 8 <packaging>jar</packaging> 9 10 <name>volley</name> 11 <url>http://android.com</url> 12 13 <properties> 14 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 15 16 <java.version>1.6</java.version> 17 </properties> 18 19 <dependencies> 20 <dependency> 21 <groupId>com.google.android</groupId> 22 <artifactId>android</artifactId> 23 <version>4.1.1.4</version> 24 </dependency> 25 <dependency> 26 <groupId>junit</groupId> 27 <artifactId>junit</artifactId> 28 <version>4.10</version> 29 <scope>test</scope> 30 </dependency> 31 <dependency> 32 <groupId>org.robolectric</groupId> 33 <artifactId>robolectric</artifactId> 34 <version>2.2</version> 35 <scope>test</scope> 36 </dependency> 37 <dependency> 38 <groupId>org.mockito</groupId> 39 <artifactId>mockito-core</artifactId> 40 <version>1.9.5</version> 41 <scope>test</scope> 42 </dependency> 43 </dependencies> 44 45 <build> 46 <pluginManagement> 47 <plugins> 48 <plugin> 49 <groupId>com.jayway.maven.plugins.android.generation2</groupId> 50 <artifactId>android-maven-plugin</artifactId> 51 <version>3.8.1</version> 52 <configuration> 53 <sdk> 54 <platform>19</platform> 55 </sdk> 56 </configuration> 57 </plugin> 58 59 <plugin> 60 <groupId>org.apache.maven.plugins</groupId> 61 <artifactId>maven-compiler-plugin</artifactId> 62 <version>3.0</version> 63 <configuration> 64 <source>${java.version}</source> 65 <target>${java.version}</target> 66 </configuration> 67 </plugin> 68 </plugins> 69 </pluginManagement> 70 </build> 71 72 <profiles> 73 <profile> 74 <id>debug</id> 75 <activation> 76 <activeByDefault>true</activeByDefault> 77 <property> 78 <name>performDebugBuild</name> 79 <value>true</value> 80 </property> 81 </activation> 82 <build> 83 <plugins> 84 <plugin> 85 <groupId>org.apache.maven.plugins</groupId> 86 <artifactId>maven-surefire-plugin</artifactId> 87 <version>2.18.1</version> 88 <executions> 89 <execution> 90 <id>default-test</id> 91 <configuration> 92 <argLine>${surefireArgLine}</argLine> 93 </configuration> 94 </execution> 95 </executions> 96 </plugin> 97 <plugin> 98 <groupId>org.jacoco</groupId> 99 <artifactId>jacoco-maven-plugin</artifactId> 100 <!-- don't upgrade the version. newer versions generate different results 101 see https://github.com/jacoco/jacoco/issues/286 --> 102 <version>0.7.2.201409121644</version> 103 <executions> 104 <execution> 105 <id>pre-unit-test</id> 106 <goals> 107 <goal>prepare-agent</goal> 108 </goals> 109 <configuration> 110 <destFile>${project.build.directory}/surefire-reports/jacoco-ut.exec</destFile> 111 <propertyName>surefireArgLine</propertyName> 112 </configuration> 113 </execution> 114 <execution> 115 <id>jacoco-report</id> 116 <phase>post-integration-test</phase> 117 <goals> 118 <goal>report</goal> 119 <goal>check</goal> 120 </goals> 121 <configuration> 122 <dataFile>${project.build.directory}/surefire-reports/jacoco-ut.exec</dataFile> 123 <outputDirectory>${project.build.directory}/jacoco-report</outputDirectory> 124 <rules> 125 <rule> 126 <element>BUNDLE</element> 127 <limits> 128 <limit> 129 <counter>INSTRUCTION</counter> 130 <value>COVEREDRATIO</value> 131 <minimum>0.40</minimum> 132 </limit> 133 <!-- enable this if you want that the build breaks if there is a class without a test --> 134 <!-- 135 <limit> 136 <counter>CLASS</counter> 137 <value>MISSEDCOUNT</value> 138 <maximum>0</maximum> 139 </limit> 140 --> 141 </limits> 142 </rule> 143 <!-- enable this if you want a limit for each java class --> 144 <!-- 145 <rule> 146 <element>CLASS</element> 147 <excludes> 148 <exclude>*Test</exclude> 149 </excludes> 150 <limits> 151 <limit> 152 <counter>LINE</counter> 153 <value>COVEREDRATIO</value> 154 <minimum>0.10</minimum> 155 </limit> 156 </limits> 157 </rule> 158 --> 159 </rules> 160 </configuration> 161 </execution> 162 </executions> 163 </plugin> 164 </plugins> 165 </build> 166 </profile> 167 </profiles> 168</project> 169