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/maven-v4_0_0.xsd"> 5 <modelVersion>4.0.0</modelVersion> 6 <parent> 7 <groupId>com.google</groupId> 8 <artifactId>google</artifactId> 9 <version>1</version> 10 </parent> 11 <groupId>com.google.protobuf</groupId> 12 <artifactId>protobuf-java</artifactId> 13 <version>2.3.0</version> 14 <packaging>jar</packaging> 15 <name>Protocol Buffer Java API</name> 16 <description> 17 Protocol Buffers are a way of encoding structured data in an efficient yet 18 extensible format. 19 </description> 20 <inceptionYear>2008</inceptionYear> 21 <url>http://code.google.com/p/protobuf</url> 22 <licenses> 23 <license> 24 <name>New BSD license</name> 25 <url>http://www.opensource.org/licenses/bsd-license.php</url> 26 <distribution>repo</distribution> 27 </license> 28 </licenses> 29 <scm> 30 <url>http://code.google.com/p/protobuf/source/browse</url> 31 <connection> 32 scm:svn:http://protobuf.googlecode.com/svn/trunk/ 33 </connection> 34 </scm> 35 <dependencies> 36 <dependency> 37 <groupId>junit</groupId> 38 <artifactId>junit</artifactId> 39 <version>4.4</version> 40 <scope>test</scope> 41 </dependency> 42 <dependency> 43 <groupId>org.easymock</groupId> 44 <artifactId>easymock</artifactId> 45 <version>2.2</version> 46 <scope>test</scope> 47 </dependency> 48 <dependency> 49 <groupId>org.easymock</groupId> 50 <artifactId>easymockclassextension</artifactId> 51 <version>2.2.1</version> 52 <scope>test</scope> 53 </dependency> 54 </dependencies> 55 <build> 56 <plugins> 57 <plugin> 58 <artifactId>maven-compiler-plugin</artifactId> 59 <configuration> 60 <source>1.5</source> 61 <target>1.5</target> 62 </configuration> 63 </plugin> 64 <plugin> 65 <artifactId>maven-surefire-plugin</artifactId> 66 <configuration> 67 <includes> 68 <include>**/*Test.java</include> 69 </includes> 70 </configuration> 71 </plugin> 72 <plugin> 73 <artifactId>maven-antrun-plugin</artifactId> 74 <executions> 75 <execution> 76 <id>generate-sources</id> 77 <phase>generate-sources</phase> 78 <configuration> 79 <tasks> 80 <mkdir dir="target/generated-sources" /> 81 <exec executable="../src/protoc"> 82 <arg value="--java_out=target/generated-sources" /> 83 <arg value="--proto_path=../src" /> 84 <arg value="../src/google/protobuf/descriptor.proto" /> 85 </exec> 86 </tasks> 87 <sourceRoot>target/generated-sources</sourceRoot> 88 </configuration> 89 <goals> 90 <goal>run</goal> 91 </goals> 92 </execution> 93 <execution> 94 <id>generate-test-sources</id> 95 <phase>generate-test-sources</phase> 96 <configuration> 97 <tasks> 98 <mkdir dir="target/generated-test-sources" /> 99 <!--mkdir dir="target/generated-test-sources/opt-space" /--> 100 <!--mkdir dir="target/generated-test-sources/opt-speed" /--> 101 <exec executable="../src/protoc"> 102 <arg value="--java_out=target/generated-test-sources" /> 103 <arg value="--proto_path=../src" /> 104 <arg value="--proto_path=src/test/java" /> 105 <arg value="../src/google/protobuf/unittest.proto" /> 106 <arg value="../src/google/protobuf/unittest_import.proto" /> 107 <arg value="../src/google/protobuf/unittest_mset.proto" /> 108 <arg 109 value="src/test/java/com/google/protobuf/multiple_files_test.proto" /> 110 <arg 111 value="../src/google/protobuf/unittest_optimize_for.proto" /> 112 <arg 113 value="../src/google/protobuf/unittest_custom_options.proto" /> 114 <arg value="../src/google/protobuf/unittest_lite.proto" /> 115 <arg value="../src/google/protobuf/unittest_import_lite.proto" /> 116 <arg value="../src/google/protobuf/unittest_lite_imports_nonlite.proto" /> 117 <arg value="../src/google/protobuf/unittest_enormous_descriptor.proto" /> 118 <arg value="../src/google/protobuf/unittest_no_generic_services.proto" /> 119 </exec> 120 <!-- java micro --> 121 <exec executable="../src/protoc"> 122 <arg value="--javamicro_out=opt=speed,java_use_vector=false,java_package=google/protobuf/unittest_import_micro.proto|com.google.protobuf.micro,java_outer_classname=google/protobuf/unittest_import_micro.proto|UnittestImportMicro:target/generated-test-sources" /> 123 <arg value="--proto_path=../src" /> 124 <arg value="--proto_path=src/test/java" /> 125 <arg value="../src/google/protobuf/unittest_micro.proto" /> 126 <arg value="../src/google/protobuf/unittest_simple_micro.proto" /> 127 <arg value="../src/google/protobuf/unittest_stringutf8_micro.proto" /> 128 <arg value="../src/google/protobuf/unittest_recursive_micro.proto" /> 129 <arg value="../src/google/protobuf/unittest_import_micro.proto" /> 130 <arg value="../src/google/protobuf/unittest_single_micro.proto" /> 131 <arg value="../src/google/protobuf/unittest_multiple_micro.proto" /> 132 <arg value="../src/google/protobuf/unittest_multiple_nameclash_micro.proto" /> 133 </exec> 134 <!-- java nano --> 135 <exec executable="../src/protoc"> 136 <arg value="--javanano_out=java_package=google/protobuf/unittest_import_nano.proto|com.google.protobuf.nano,java_outer_classname=google/protobuf/unittest_import_nano.proto|UnittestImportNano:target/generated-test-sources" /> 137 <arg value="--proto_path=../src" /> 138 <arg value="--proto_path=src/test/java" /> 139 <arg value="../src/google/protobuf/unittest_nano.proto" /> 140 <arg value="../src/google/protobuf/unittest_simple_nano.proto" /> 141 <arg value="../src/google/protobuf/unittest_stringutf8_nano.proto" /> 142 <arg value="../src/google/protobuf/unittest_recursive_nano.proto" /> 143 <arg value="../src/google/protobuf/unittest_import_nano.proto" /> 144 <arg value="../src/google/protobuf/unittest_single_nano.proto" /> 145 <arg value="../src/google/protobuf/unittest_multiple_nano.proto" /> 146 <arg value="../src/google/protobuf/unittest_multiple_nameclash_nano.proto" /> 147 </exec> 148 <exec executable="../src/protoc"> 149 <arg value="--javanano_out=store_unknown_fields=true:target/generated-test-sources" /> 150 <arg value="--proto_path=../src" /> 151 <arg value="--proto_path=src/test/java" /> 152 <arg value="../src/google/protobuf/unittest_extension_nano.proto" /> 153 </exec> 154 <exec executable="../src/protoc"> 155 <arg value="--javanano_out=java_nano_generate_has=true:target/generated-test-sources" /> 156 <arg value="--proto_path=../src" /> 157 <arg value="--proto_path=src/test/java" /> 158 <arg value="../src/google/protobuf/unittest_has_nano.proto" /> 159 </exec> 160 </tasks> 161 <testSourceRoot>target/generated-test-sources</testSourceRoot> 162 <!--testSourceRoot>target/generated-test-sources/opt-space</testSourceRoot--> 163 <!--testSourceRoot>target/generated-test-sources/opt-speed</testSourceRoot--> 164 </configuration> 165 <goals> 166 <goal>run</goal> 167 </goals> 168 </execution> 169 </executions> 170 </plugin> 171 </plugins> 172 </build> 173 <profiles> 174 <profile> 175 <id>lite</id> 176 <build> 177 <plugins> 178 <plugin> 179 <artifactId>maven-compiler-plugin</artifactId> 180 <configuration> 181 <includes> 182 <include>**/AbstractMessageLite.java</include> 183 <include>**/ByteString.java</include> 184 <include>**/CodedInputStream.java</include> 185 <include>**/CodedOutputStream.java</include> 186 <include>**/ExtensionRegistryLite.java</include> 187 <include>**/FieldSet.java</include> 188 <include>**/GeneratedMessageLite.java</include> 189 <include>**/InvalidProtocolBufferException.java</include> 190 <include>**/Internal.java</include> 191 <include>**/MessageLite.java</include> 192 <include>**/UninitializedMessageException.java</include> 193 <include>**/WireFormat.java</include> 194 </includes> 195 <testIncludes> 196 <testInclude>**/LiteTest.java</testInclude> 197 <testInclude>**/*Lite.java</testInclude> 198 </testIncludes> 199 </configuration> 200 </plugin> 201 <plugin> 202 <artifactId>maven-surefire-plugin</artifactId> 203 <configuration> 204 <includes> 205 <include>**/LiteTest.java</include> 206 </includes> 207 </configuration> 208 </plugin> 209 <plugin> 210 <artifactId>maven-jar-plugin</artifactId> 211 <configuration> 212 <classifier>lite</classifier> 213 </configuration> 214 </plugin> 215 </plugins> 216 </build> 217 </profile> 218 <profile> 219 <id>micro</id> 220 <build> 221 <plugins> 222 <plugin> 223 <artifactId>maven-compiler-plugin</artifactId> 224 <configuration> 225 <includes> 226 <include>**/MessageMicro.java</include> 227 <include>**/ByteStringMicro.java</include> 228 <include>**/CodedInputStreamMicro.java</include> 229 <include>**/CodedOutputStreamMicro.java</include> 230 <include>**/InvalidProtocolBufferMicroException.java</include> 231 <include>**/WireFormatMicro.java</include> 232 </includes> 233 <testIncludes> 234 <testInclude>**/MicroTest.java</testInclude> 235 <testInclude>**/MicroOuterClass.java</testInclude> 236 <testInclude>**/SimpleMessageMicro.java</testInclude> 237 <testInclude>**/StringUtf8.java</testInclude> 238 <testInclude>**/RecursiveMessageMicro.java</testInclude> 239 <testInclude>**/UnittestImportMicro.java</testInclude> 240 </testIncludes> 241 </configuration> 242 </plugin> 243 <plugin> 244 <artifactId>maven-surefire-plugin</artifactId> 245 <configuration> 246 <includes> 247 <include>**/MicroTest.java</include> 248 </includes> 249 </configuration> 250 </plugin> 251 <plugin> 252 <artifactId>maven-jar-plugin</artifactId> 253 <configuration> 254 <classifier>micro</classifier> 255 </configuration> 256 </plugin> 257 </plugins> 258 </build> 259 </profile> 260 <profile> 261 <id>nano</id> 262 <build> 263 <plugins> 264 <plugin> 265 <artifactId>maven-compiler-plugin</artifactId> 266 <configuration> 267 <includes> 268 <include>**/MessageNano.java</include> 269 <include>**/CodedInputByteBufferNano.java</include> 270 <include>**/CodedOutputByteBufferNano.java</include> 271 <include>**/InternalNano.java</include> 272 <include>**/InvalidProtocolBufferNanoException.java</include> 273 <include>**/WireFormatNano.java</include> 274 </includes> 275 <testIncludes> 276 <testInclude>**/NanoTest.java</testInclude> 277 <testInclude>**/NanoOuterClass.java</testInclude> 278 <testInclude>**/SimpleMessageNano.java</testInclude> 279 <testInclude>**/StringUtf8.java</testInclude> 280 <testInclude>**/RecursiveMessageNano.java</testInclude> 281 <testInclude>**/UnittestImportNano.java</testInclude> 282 </testIncludes> 283 </configuration> 284 </plugin> 285 <plugin> 286 <artifactId>maven-surefire-plugin</artifactId> 287 <configuration> 288 <includes> 289 <include>**/NanoTest.java</include> 290 </includes> 291 </configuration> 292 </plugin> 293 <plugin> 294 <artifactId>maven-jar-plugin</artifactId> 295 <configuration> 296 <classifier>nano</classifier> 297 </configuration> 298 </plugin> 299 </plugins> 300 </build> 301 </profile> 302 </profiles> 303 </project> 304