TOOLS: Code and jars to enable auto-generation of metadata for Java when compiling...
[platform/upstream/libphonenumber.git] / java / pom.xml
1 <?xml version="1.0"?>
2 <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/xsd/maven-4.0.0.xsd">
3   <modelVersion>4.0.0</modelVersion>
4   <groupId>com.googlecode.libphonenumber</groupId>
5   <artifactId>libphonenumber</artifactId>
6   <version>3.6-SNAPSHOT</version>
7   <packaging>jar</packaging>
8   <name>libphonenumber</name>
9   <url>http://code.google.com/p/libphonenumber/</url>
10
11   <parent>
12     <groupId>org.sonatype.oss</groupId>
13     <artifactId>oss-parent</artifactId>
14     <version>7</version>
15   </parent>
16
17   <description>
18     Google's common Java library for parsing, formatting, storing and validating international phone numbers.
19     Optimized for running on smartphones.
20   </description>
21
22   <organization>
23     <name>Google</name>
24     <url>http://www.google.com/</url>
25   </organization>
26
27   <licenses>
28     <license>
29       <name>The Apache Software License, Version 2.0</name>
30       <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
31     </license>
32   </licenses>
33
34   <scm>
35     <connection>scm:svn:http://libphonenumber.googlecode.com/svn/trunk/java/</connection>
36     <developerConnection>scm:svn:https://libphonenumber.googlecode.com/svn/trunk/java/</developerConnection>
37     <url>scm:svn:http://libphonenumber.googlecode.com/svn/trunk/java/</url>
38   </scm>
39
40   <developers>
41     <developer>
42       <id>jia.shao.peng</id>
43       <name>Shaopeng Jia</name>
44       <email>jia.shao.peng@gmail.com</email>
45       <organization>Google</organization>
46       <roles>
47         <role>owner</role>
48         <role>developer</role>
49       </roles>
50     </developer>
51     <developer>
52       <id>lararennie</id>
53       <name>Lara Rennie</name>
54       <email>lararennie@google.com</email>
55       <organization>Google</organization>
56       <roles>
57         <role>developer</role>
58       </roles>
59     </developer>
60   </developers>
61
62   <contributors>
63     <contributor>
64       <name>tronikos</name>
65       <email>tronikos@gmail.com</email>
66     </contributor>
67     <contributor>
68       <name>g1smd.email</name>
69       <email>g1smd.email@gmail.com</email>
70     </contributor>
71     <contributor>
72       <name>Philippe Liard</name>
73       <email>philip.liard@gmail.com</email>
74     </contributor>
75   </contributors>
76
77   <build>
78     <sourceDirectory>src</sourceDirectory>
79     <testSourceDirectory>test</testSourceDirectory>
80     <resources>
81       <resource>
82         <directory>src/com/google/i18n/phonenumbers/data</directory>
83         <targetPath>com/google/i18n/phonenumbers/data</targetPath>
84       </resource>
85     </resources>
86     <testResources>
87       <testResource>
88         <directory>test/com/google/i18n/phonenumbers/data</directory>
89         <targetPath>com/google/i18n/phonenumbers/data</targetPath>
90       </testResource>
91       <testResource>
92         <directory>test/com/google/i18n/phonenumbers/geocoding/testing_data</directory>
93         <targetPath>com/google/i18n/phonenumbers/geocoding/testing_data</targetPath>
94       </testResource>
95     </testResources>
96     <plugins>
97       <plugin>
98         <groupId>org.codehaus.mojo</groupId>
99         <artifactId>exec-maven-plugin</artifactId>
100         <version>1.2</version>
101         <executions>
102           <execution>
103             <id>build-metadata</id>
104             <phase>generate-sources</phase>
105             <goals>
106               <goal>exec</goal>
107             </goals>
108             <configuration>
109               <executable>java</executable>
110               <arguments>
111                 <argument>-jar</argument>
112                 <argument>../tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar</argument>
113                 <argument>BuildMetadataProtoFromXml</argument>
114                 <argument>../resources/PhoneNumberMetaData.xml</argument>
115                 <argument>src</argument>
116                 <argument>false</argument> <!-- Not for testing. -->
117                 <argument>false</argument> <!-- No lite metadata. -->
118               </arguments>
119             </configuration>
120           </execution>
121           <execution>
122             <id>build-test-metadata</id>
123             <phase>generate-test-sources</phase>
124             <goals>
125               <goal>exec</goal>
126             </goals>
127             <configuration>
128               <executable>java</executable>
129               <arguments>
130                 <argument>-jar</argument>
131                 <argument>../tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar</argument>
132                 <argument>BuildMetadataProtoFromXml</argument>
133                 <argument>../resources/PhoneNumberMetaDataForTesting.xml</argument>
134                 <argument>test</argument>
135                 <argument>true</argument> <!-- For testing. -->
136                 <argument>false</argument> <!-- No lite metadata. -->
137               </arguments>
138             </configuration>
139           </execution>
140           <execution>
141             <id>build-geo-data</id>
142             <phase>generate-sources</phase>
143             <goals>
144               <goal>exec</goal>
145             </goals>
146             <configuration>
147               <executable>java</executable>
148               <arguments>
149                 <argument>-jar</argument>
150                 <argument>../tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar</argument>
151                 <argument>GenerateAreaCodeData</argument>
152                 <argument>../resources/geocoding</argument>
153                 <argument>src/com/google/i18n/phonenumbers/geocoding/data</argument>
154                 <argument>false</argument> <!-- Not for testing. -->
155               </arguments>
156             </configuration>
157           </execution>
158           <execution>
159             <id>build-geo-test-data</id>
160             <phase>generate-test-sources</phase>
161             <goals>
162               <goal>exec</goal>
163             </goals>
164             <configuration>
165               <executable>java</executable>
166               <arguments>
167                 <argument>-jar</argument>
168                 <argument>../tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar</argument>
169                 <argument>GenerateAreaCodeData</argument>
170                 <argument>../resources/test/geocoding</argument>
171                 <argument>test/com/google/i18n/phonenumbers/geocoding/testing_data</argument>
172                 <argument>true</argument> <!-- For testing. -->
173               </arguments>
174             </configuration>
175           </execution>
176         </executions>
177       </plugin>
178       <plugin>
179         <groupId>org.apache.maven.plugins</groupId>
180         <artifactId>maven-jar-plugin</artifactId>
181         <version>2.3.1</version>
182         <configuration>
183           <excludes>
184             <exclude>**/geocoding/</exclude>
185           </excludes>
186         </configuration>
187       </plugin>
188       <plugin>
189         <groupId>org.apache.maven.plugins</groupId>
190         <artifactId>maven-source-plugin</artifactId>
191         <version>2.1.2</version>
192         <executions>
193           <execution>
194             <id>attach-sources</id>
195             <goals>
196               <goal>jar</goal>
197             </goals>
198           </execution>
199         </executions>
200       </plugin>
201       <plugin>
202         <groupId>org.apache.maven.plugins</groupId>
203         <artifactId>maven-javadoc-plugin</artifactId>
204         <version>2.7</version>
205         <executions>
206           <execution>
207             <id>attach-javadocs</id>
208             <goals>
209               <goal>jar</goal>
210             </goals>
211           </execution>
212         </executions>
213       </plugin>
214       <plugin>
215         <artifactId>maven-release-plugin</artifactId>
216         <version>2.0-beta-7</version>
217         <configuration>
218           <tagBase>
219             https://libphonenumber.googlecode.com/svn/tags/
220           </tagBase>
221         </configuration>
222       </plugin>
223       <plugin>
224         <groupId>org.apache.maven.plugins</groupId>
225         <artifactId>maven-compiler-plugin</artifactId>
226         <version>2.3.2</version>
227         <configuration>
228           <source>1.5</source>
229           <target>1.5</target>
230         </configuration>
231       </plugin>
232     </plugins>
233   </build>
234
235   <profiles>
236     <profile>
237       <id>release-sign-artifacts</id>
238       <activation>
239         <property>
240           <name>performRelease</name>
241           <value>true</value>
242         </property>
243       </activation>
244       <build>
245         <plugins>
246           <plugin>
247             <groupId>org.apache.maven.plugins</groupId>
248             <artifactId>maven-gpg-plugin</artifactId>
249             <version>1.1</version>
250             <executions>
251               <execution>
252                 <id>sign-artifacts</id>
253                 <phase>verify</phase>
254                 <goals>
255                   <goal>sign</goal>
256                 </goals>
257               </execution>
258             </executions>
259           </plugin>
260         </plugins>
261       </build>
262     </profile>
263   </profiles>
264
265   <properties>
266     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
267   </properties>
268
269   <dependencies>
270     <dependency>
271       <groupId>junit</groupId>
272       <artifactId>junit</artifactId>
273       <version>4.8.1</version>
274       <scope>test</scope>
275     </dependency>
276   </dependencies>
277
278 </project>