• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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      <testResource>
42        <directory>test/com/google/i18n/phonenumbers/buildtools/testdata</directory>
43        <targetPath>com/google/i18n/phonenumbers/buildtools/testdata</targetPath>
44      </testResource>
45    </testResources>
46    <plugins>
47      <plugin>
48        <groupId>org.apache.maven.plugins</groupId>
49        <artifactId>maven-compiler-plugin</artifactId>
50        <version>2.0.2</version>
51        <configuration>
52          <source>1.6</source>
53	  <target>1.6</target>
54	  <encoding>UTF-8</encoding>
55        </configuration>
56      </plugin>
57      <plugin>
58        <groupId>org.codehaus.mojo</groupId>
59        <artifactId>build-helper-maven-plugin</artifactId>
60        <version>1.9.1</version>
61        <executions>
62          <execution>
63            <id>add-source</id>
64            <phase>generate-sources</phase>
65            <goals>
66              <goal>add-source</goal>
67            </goals>
68            <configuration>
69              <sources>
70                <!-- Add ../../../java/libphonenumber/src/ to make Phonemetadata.java available to
71                     the source directories. -->
72                <source>../../../java/libphonenumber/src/</source>
73                <!-- Add ../../../java/internal/phoneprefix/src/ to make PhonePrefixMap.java
74                     available to the source directories. -->
75                <source>../../../java/internal/prefixmapper/src/</source>
76                <!-- Add ../common/src/ which contains BuildMetadataFromXml.java -->
77                <source>../common/src/</source>
78              </sources>
79            </configuration>
80          </execution>
81        </executions>
82      </plugin>
83      <!-- Build a JAR that contains the Java and JavaScript build tools. -->
84      <plugin>
85        <groupId>org.apache.maven.plugins</groupId>
86        <artifactId>maven-assembly-plugin</artifactId>
87        <configuration>
88          <descriptorRefs>
89            <descriptorRef>jar-with-dependencies</descriptorRef>
90          </descriptorRefs>
91          <archive>
92            <manifest>
93              <addClasspath>true</addClasspath>
94              <mainClass>com.google.i18n.phonenumbers.EntryPoint</mainClass>
95            </manifest>
96          </archive>
97        </configuration>
98        <executions>
99          <execution>
100            <id>make-assembly</id>
101            <phase>package</phase>
102            <goals>
103              <goal>single</goal>
104            </goals>
105          </execution>
106        </executions>
107      </plugin>
108    </plugins>
109  </build>
110
111  <dependencies>
112    <dependency>
113      <groupId>junit</groupId>
114      <artifactId>junit</artifactId>
115      <version>4.8.1</version>
116      <scope>test</scope>
117    </dependency>
118  </dependencies>
119
120</project>
121