pom.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. <!-- remove the reference to the parent until the google repo is synced with central -->
  7. <!--<parent>
  8. <groupId>com.google</groupId>
  9. <artifactId>google</artifactId>
  10. <version>1</version>
  11. </parent>-->
  12. <groupId>com.google.protobuf</groupId>
  13. <artifactId>protobuf-java</artifactId>
  14. <version>2.0.4-SNAPSHOT</version>
  15. <packaging>jar</packaging>
  16. <name>Protocol Buffer Java API</name>
  17. <description>
  18. Protocol Buffers are a way of encoding structured data in an efficient yet
  19. extensible format.
  20. </description>
  21. <inceptionYear>2008</inceptionYear>
  22. <url>http://code.google.com/p/protobuf</url>
  23. <licenses>
  24. <license>
  25. <name>New BSD license</name>
  26. <url>http://www.opensource.org/licenses/bsd-license.php</url>
  27. <distribution>repo</distribution>
  28. </license>
  29. </licenses>
  30. <scm>
  31. <url>http://code.google.com/p/protobuf/source/browse</url>
  32. <connection>
  33. scm:svn:http://protobuf.googlecode.com/svn/trunk/
  34. </connection>
  35. </scm>
  36. <!-- this is temporarily copied from the parent pom. remove this section when that is used -->
  37. <distributionManagement>
  38. <repository>
  39. <id>google-maven-repository</id>
  40. <name>Google Maven Repository</name>
  41. <url>https://google-maven-repository.googlecode.com/svn/trunk/repository/</url>
  42. </repository>
  43. <snapshotRepository>
  44. <id>google-maven-snapshot-repository</id>
  45. <name>Google Maven Snapshot Repository</name>
  46. <url>https://google-maven-repository.googlecode.com/svn/trunk/snapshot-repository/</url>
  47. <uniqueVersion>true</uniqueVersion>
  48. </snapshotRepository>
  49. </distributionManagement>
  50. <dependencies>
  51. <dependency>
  52. <groupId>junit</groupId>
  53. <artifactId>junit</artifactId>
  54. <version>4.4</version>
  55. <scope>test</scope>
  56. </dependency>
  57. <dependency>
  58. <groupId>org.easymock</groupId>
  59. <artifactId>easymock</artifactId>
  60. <version>2.2</version>
  61. <scope>test</scope>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.easymock</groupId>
  65. <artifactId>easymockclassextension</artifactId>
  66. <version>2.2.1</version>
  67. <scope>test</scope>
  68. </dependency>
  69. </dependencies>
  70. <build>
  71. <plugins>
  72. <plugin>
  73. <artifactId>maven-compiler-plugin</artifactId>
  74. <configuration>
  75. <source>1.5</source>
  76. <target>1.5</target>
  77. </configuration>
  78. </plugin>
  79. <plugin>
  80. <artifactId>maven-surefire-plugin</artifactId>
  81. <configuration>
  82. <includes>
  83. <include>**/*Test.java</include>
  84. </includes>
  85. </configuration>
  86. </plugin>
  87. <plugin>
  88. <artifactId>maven-antrun-plugin</artifactId>
  89. <executions>
  90. <execution>
  91. <id>generate-sources</id>
  92. <phase>generate-sources</phase>
  93. <configuration>
  94. <tasks>
  95. <mkdir dir="target/generated-sources" />
  96. <exec executable="../src/protoc">
  97. <arg value="--java_out=target/generated-sources" />
  98. <arg value="--proto_path=../src" />
  99. <arg value="../src/google/protobuf/descriptor.proto" />
  100. </exec>
  101. </tasks>
  102. <sourceRoot>target/generated-sources</sourceRoot>
  103. </configuration>
  104. <goals>
  105. <goal>run</goal>
  106. </goals>
  107. </execution>
  108. <execution>
  109. <id>generate-test-sources</id>
  110. <phase>generate-test-sources</phase>
  111. <configuration>
  112. <tasks>
  113. <mkdir dir="target/generated-test-sources" />
  114. <exec executable="../src/protoc">
  115. <arg value="--java_out=target/generated-test-sources" />
  116. <arg value="--proto_path=../src" />
  117. <arg value="--proto_path=src/test/java" />
  118. <arg value="../src/google/protobuf/unittest.proto" />
  119. <arg value="../src/google/protobuf/unittest_import.proto" />
  120. <arg value="../src/google/protobuf/unittest_mset.proto" />
  121. <arg
  122. value="src/test/java/com/google/protobuf/multiple_files_test.proto" />
  123. <arg
  124. value="../src/google/protobuf/unittest_optimize_for.proto" />
  125. <arg
  126. value="../src/google/protobuf/unittest_custom_options.proto" />
  127. </exec>
  128. </tasks>
  129. <testSourceRoot>target/generated-test-sources</testSourceRoot>
  130. </configuration>
  131. <goals>
  132. <goal>run</goal>
  133. </goals>
  134. </execution>
  135. </executions>
  136. </plugin>
  137. </plugins>
  138. </build>
  139. </project>