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 <exec executable="../src/protoc"> 121 <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" /> 122 <arg value="--proto_path=../src" /> 123 <arg value="--proto_path=src/test/java" /> 124 <arg value="../src/google/protobuf/unittest_micro.proto" /> 125 <arg value="../src/google/protobuf/unittest_simple_micro.proto" /> 126 <arg value="../src/google/protobuf/unittest_stringutf8_micro.proto" /> 127 <arg value="../src/google/protobuf/unittest_recursive_micro.proto" /> 128 <arg value="../src/google/protobuf/unittest_import_micro.proto" /> 129 </exec> 130 </tasks> 131 <testSourceRoot>target/generated-test-sources</testSourceRoot> 132 <!--testSourceRoot>target/generated-test-sources/opt-space</testSourceRoot--> 133 <!--testSourceRoot>target/generated-test-sources/opt-speed</testSourceRoot--> 134 </configuration> 135 <goals> 136 <goal>run</goal> 137 </goals> 138 </execution> 139 </executions> 140 </plugin> 141 </plugins> 142 </build> 143 <profiles> 144 <profile> 145 <id>lite</id> 146 <build> 147 <plugins> 148 <plugin> 149 <artifactId>maven-compiler-plugin</artifactId> 150 <configuration> 151 <includes> 152 <include>**/AbstractMessageLite.java</include> 153 <include>**/ByteString.java</include> 154 <include>**/CodedInputStream.java</include> 155 <include>**/CodedOutputStream.java</include> 156 <include>**/ExtensionRegistryLite.java</include> 157 <include>**/FieldSet.java</include> 158 <include>**/GeneratedMessageLite.java</include> 159 <include>**/InvalidProtocolBufferException.java</include> 160 <include>**/Internal.java</include> 161 <include>**/MessageLite.java</include> 162 <include>**/UninitializedMessageException.java</include> 163 <include>**/WireFormat.java</include> 164 </includes> 165 <testIncludes> 166 <testInclude>**/LiteTest.java</testInclude> 167 <testInclude>**/*Lite.java</testInclude> 168 </testIncludes> 169 </configuration> 170 </plugin> 171 <plugin> 172 <artifactId>maven-surefire-plugin</artifactId> 173 <configuration> 174 <includes> 175 <include>**/LiteTest.java</include> 176 </includes> 177 </configuration> 178 </plugin> 179 <plugin> 180 <artifactId>maven-jar-plugin</artifactId> 181 <configuration> 182 <classifier>lite</classifier> 183 </configuration> 184 </plugin> 185 </plugins> 186 </build> 187 </profile> 188 <profile> 189 <id>micro</id> 190 <build> 191 <plugins> 192 <plugin> 193 <artifactId>maven-compiler-plugin</artifactId> 194 <configuration> 195 <includes> 196 <include>**/MessageMicro.java</include> 197 <include>**/ByteStringMicro.java</include> 198 <include>**/CodedInputStreamMicro.java</include> 199 <include>**/CodedOutputStreamMicro.java</include> 200 <include>**/InvalidProtocolBufferMicroException.java</include> 201 <include>**/WireFormatMicro.java</include> 202 </includes> 203 <testIncludes> 204 <testInclude>**/MicroTest.java</testInclude> 205 <testInclude>**/MicroOuterClass.java</testInclude> 206 <testInclude>**/SimpleMessageMicro.java</testInclude> 207 <testInclude>**/StringUtf8.java</testInclude> 208 <testInclude>**/RecursiveMessageMicro.java</testInclude> 209 <testInclude>**/UnittestImportMicro.java</testInclude> 210 </testIncludes> 211 </configuration> 212 </plugin> 213 <plugin> 214 <artifactId>maven-surefire-plugin</artifactId> 215 <configuration> 216 <includes> 217 <include>**/MicroTest.java</include> 218 </includes> 219 </configuration> 220 </plugin> 221 <plugin> 222 <artifactId>maven-jar-plugin</artifactId> 223 <configuration> 224 <classifier>micro</classifier> 225 </configuration> 226 </plugin> 227 </plugins> 228 </build> 229 </profile> 230 </profiles> 231 </project> 232