100766b5e0d06fadba707382df415c3f844820d6
[platform/upstream/libphonenumber.git] / tools / java / java-build / pom.xml
1 <?xml version="1.0"?>
2 <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4   <modelVersion>4.0.0</modelVersion>
5
6   <parent>
7     <artifactId>tools</artifactId>
8     <groupId>com.google.i18n.phonenumbers</groupId>
9     <version>1.0-SNAPSHOT</version>
10   </parent>
11
12   <groupId>com.google.i18n.phonenumbers.tools</groupId>
13   <artifactId>java-build</artifactId>
14   <version>1.0-SNAPSHOT</version>
15   <name>Libphonenumber Java and JavaScript build tools</name>
16   <description>
17     Java and JavaScript build tools that generate the Java and JavaScript metadata code needed to
18     build the libphonenumber library. The Java build tools also transform the geocoding data from
19     text to binary format.
20   </description>
21
22   <properties>
23     <phonenumberutil.resources.dir>
24       ${project.dir}/../../../../java/libphonenumber/src/
25     </phonenumberutil.resources.dir>
26   </properties>
27
28   <build>
29     <sourceDirectory>src</sourceDirectory>
30     <testSourceDirectory>test</testSourceDirectory>
31     <!-- Include the PhoneNumberUtil metadata files. -->
32     <resources>
33       <resource>
34         <directory>${phonenumberutil.resources.dir}</directory>
35       </resource>
36     </resources>
37     <testResources>
38       <testResource>
39         <directory>${phonenumberutil.resources.dir}</directory>
40       </testResource>
41     </testResources>
42     <plugins>
43       <plugin>
44         <groupId>org.apache.maven.plugins</groupId>
45         <artifactId>maven-compiler-plugin</artifactId>
46         <configuration>
47           <source>1.5</source>
48           <target>1.5</target>
49         </configuration>
50       </plugin>
51       <plugin>
52         <groupId>org.codehaus.mojo</groupId>
53         <artifactId>build-helper-maven-plugin</artifactId>
54         <executions>
55           <execution>
56             <id>add-source</id>
57             <phase>generate-sources</phase>
58             <goals>
59               <goal>add-source</goal>
60             </goals>
61             <configuration>
62               <sources>
63                 <!-- Add ../../../java/libphonenumber/src/ to make Phonemetadata.java available to
64                      the source directories. -->
65                 <source>../../../java/libphonenumber/src/</source>
66                 <!-- Add ../../../java/internal/phoneprefix/src/ to make PhonePrefixMap.java
67                      available to the source directories. -->
68                 <source>../../../java/internal/prefixmapper/src/</source>
69                 <!-- Add ../common/src/ which contains BuildMetadataFromXml.java -->
70                 <source>../common/src/</source>
71               </sources>
72             </configuration>
73           </execution>
74         </executions>
75       </plugin>
76       <!-- Build a JAR that contains the Java and JavaScript build tools. -->
77       <plugin>
78         <groupId>org.apache.maven.plugins</groupId>
79         <artifactId>maven-assembly-plugin</artifactId>
80         <configuration>
81           <descriptorRefs>
82             <descriptorRef>jar-with-dependencies</descriptorRef>
83           </descriptorRefs>
84           <archive>
85             <manifest>
86               <addClasspath>true</addClasspath>
87               <mainClass>com.google.i18n.phonenumbers.EntryPoint</mainClass>
88             </manifest>
89           </archive>
90         </configuration>
91         <executions>
92           <execution>
93             <id>make-assembly</id>
94             <phase>package</phase>
95             <goals>
96               <goal>single</goal>
97             </goals>
98           </execution>
99         </executions>
100       </plugin>
101     </plugins>
102   </build>
103
104   <dependencies>
105     <dependency>
106       <groupId>junit</groupId>
107       <artifactId>junit</artifactId>
108       <version>4.8.1</version>
109       <scope>test</scope>
110     </dependency>
111   </dependencies>
112
113 </project>