1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 Copyright (C) 2012 Square, Inc. 4 Copyright (C) 2012 The Android Open Source Project 5 6 Licensed under the Apache License, Version 2.0 (the "License"); 7 you may not use this file except in compliance with the License. 8 You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 See the License for the specific language governing permissions and 16 limitations under the License. 17--> 18<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"> 19 <modelVersion>4.0.0</modelVersion> 20 21 <parent> 22 <groupId>org.sonatype.oss</groupId> 23 <artifactId>oss-parent</artifactId> 24 <version>7</version> 25 </parent> 26 <groupId>com.squareup</groupId> 27 <artifactId>okhttp</artifactId> 28 <version>0.8-SNAPSHOT</version> 29 <packaging>jar</packaging> 30 31 <name>okhttp</name> 32 <description>An HTTP+SPDY client for Android and Java applications</description> 33 <url>https://github.com/square/okhttp</url> 34 35 <properties> 36 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 37 38 <!-- Compilation --> 39 <java.version>1.6</java.version> 40 <npn.version>8.1.2.v20120308</npn.version> 41 <mockwebserver.version>20120731</mockwebserver.version> 42 <bouncycastle.version>1.47</bouncycastle.version> 43 44 <!-- Test Dependencies --> 45 <junit.version>3.8.2</junit.version> 46 </properties> 47 48 <scm> 49 <url>https://github.com/square/okhttp/</url> 50 <connection>scm:git:https://github.com/square/okhttp.git</connection> 51 <developerConnection>scm:git:git@github.com:square/okhttp.git</developerConnection> 52 </scm> 53 54 <issueManagement> 55 <system>GitHub Issues</system> 56 <url>https://github.com/square/okhttp/issues</url> 57 </issueManagement> 58 59 <licenses> 60 <license> 61 <name>Apache 2.0</name> 62 <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> 63 </license> 64 </licenses> 65 66 <dependencies> 67 <dependency> 68 <groupId>org.mortbay.jetty.npn</groupId> 69 <artifactId>npn-boot</artifactId> 70 <version>${npn.version}</version> 71 </dependency> 72 <dependency> 73 <groupId>com.google.mockwebserver</groupId> 74 <artifactId>mockwebserver</artifactId> 75 <version>${mockwebserver.version}</version> 76 <scope>test</scope> 77 </dependency> 78 <dependency> 79 <groupId>junit</groupId> 80 <artifactId>junit</artifactId> 81 <version>${junit.version}</version> 82 <scope>test</scope> 83 </dependency> 84 <dependency> 85 <groupId>org.bouncycastle</groupId> 86 <artifactId>bcprov-jdk15on</artifactId> 87 <version>${bouncycastle.version}</version> 88 <scope>test</scope> 89 </dependency> 90 </dependencies> 91 92 <build> 93 <plugins> 94 <plugin> 95 <groupId>org.apache.maven.plugins</groupId> 96 <artifactId>maven-compiler-plugin</artifactId> 97 <version>2.5</version> 98 <configuration> 99 <source>${java.version}</source> 100 <target>${java.version}</target> 101 </configuration> 102 </plugin> 103 <plugin> 104 <groupId>org.sonatype.plugins</groupId> 105 <artifactId>jarjar-maven-plugin</artifactId> 106 <version>1.5</version> 107 <executions> 108 <execution> 109 <phase>package</phase> 110 <goals> 111 <goal>jarjar</goal> 112 </goals> 113 <configuration> 114 <includes> 115 <include>asm:asm</include> 116 <include>org.sonatype.sisu.inject:cglib</include> 117 </includes> 118 <rules> 119 <rule> 120 <pattern>libcore.**</pattern> 121 <result>com.squareup.okhttp.libcore.@1</result> 122 </rule> 123 </rules> 124 </configuration> 125 </execution> 126 </executions> 127 </plugin> 128 <plugin> 129 <groupId>org.apache.maven.plugins</groupId> 130 <artifactId>maven-surefire-plugin</artifactId> 131 <version>2.9</version> 132 <configuration> 133 <argLine>-Xbootclasspath/p:${settings.localRepository}/org/mortbay/jetty/npn/npn-boot/${npn.version}/npn-boot-${npn.version}.jar</argLine> 134 </configuration> 135 </plugin> 136 <plugin> 137 <!-- 138 OkHttp requires with javac >= 1.7 for syncFlush on DeflaterOutputStream. 139 Its language version must be <= 1.6 for dx. 140 141 Running this code on Java 6 or earlier will fail at runtime due to the missing 142 syncFlush API. 143 144 Dalvik's core library includes syncFlush, but with an @hide tag so that it doesn't 145 show up in the documentation or the android.jar stubs. This code works fine on 146 Dalvik. 147 --> 148 <groupId>org.apache.maven.plugins</groupId> 149 <artifactId>maven-enforcer-plugin</artifactId> 150 <version>1.1</version> 151 <executions> 152 <execution> 153 <id>enforce-java</id> 154 <goals> 155 <goal>enforce</goal> 156 </goals> 157 <configuration> 158 <rules> 159 <requireJavaVersion> 160 <version>[1.7.0,)</version> 161 </requireJavaVersion> 162 </rules> 163 </configuration> 164 </execution> 165 </executions> 166 </plugin> 167 <plugin> 168 <groupId>org.apache.maven.plugins</groupId> 169 <artifactId>maven-checkstyle-plugin</artifactId> 170 <version>2.9.1</version> 171 <configuration> 172 <failsOnError>true</failsOnError> 173 <configLocation>checkstyle.xml</configLocation> 174 <excludes>**/OsConstants.java</excludes> 175 </configuration> 176 <executions> 177 <execution> 178 <phase>verify</phase> 179 <goals> 180 <goal>checkstyle</goal> 181 </goals> 182 </execution> 183 </executions> 184 </plugin> 185 </plugins> 186 </build> 187</project> 188 189