• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2
3<project xmlns="http://maven.apache.org/POM/4.0.0"
4	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
6	<modelVersion>4.0.0</modelVersion>
7
8	<artifactId>cldr-code</artifactId>
9
10	<name>CLDR Code</name>
11
12	<url>https://unicode.org/cldr</url>
13
14	<properties>
15		<mainClass>org.unicode.cldr.tool.Main</mainClass>
16	</properties>
17
18	<scm>
19		<connection>scm:git:https://github.com/unicode-org/cldr.git</connection>
20	</scm>
21
22	<parent>
23		<groupId>org.unicode.cldr</groupId>
24		<artifactId>cldr-all</artifactId>
25		<version>45.0</version>
26	</parent>
27
28	<dependencies>
29		<dependency>
30			<groupId>com.ibm.icu</groupId>
31			<artifactId>icu4j</artifactId>
32		</dependency>
33
34		<dependency>
35			<groupId>com.ibm.icu</groupId>
36			<artifactId>utilities-for-cldr</artifactId>
37		</dependency>
38
39		<!-- test -->
40		<dependency>
41			<groupId>org.junit.jupiter</groupId>
42			<artifactId>junit-jupiter</artifactId>
43			<scope>test</scope>
44		</dependency>
45
46		<dependency>
47			<groupId>com.google.code.gson</groupId>
48			<artifactId>gson</artifactId>
49		</dependency>
50		<dependency>
51			<groupId>com.google.guava</groupId>
52			<artifactId>guava</artifactId>
53		</dependency>
54
55		<dependency>
56			<groupId>com.google.myanmartools</groupId>
57			<artifactId>myanmar-tools</artifactId>
58		</dependency>
59
60		<!-- for XSD generation -->
61		<dependency>
62			<groupId>org.relaxng</groupId>
63			<artifactId>trang</artifactId>
64		</dependency>
65		<!-- for semver -->
66		<dependency>
67			<groupId>com.vdurmont</groupId>
68			<artifactId>semver4j</artifactId>
69		</dependency>
70	</dependencies>
71
72	<build>
73		<resources>
74			<resource>
75				<directory>src/main/resources</directory>
76			</resource>
77			<resource>
78		       <directory>${project.basedir}/../..</directory>
79			   <!-- This is put here so that it can be read by CldrUtility, even outside of a jar -->
80		       <targetPath>${project.build.directory}/classes/org/unicode/cldr/util/data</targetPath>
81				<includes>
82					<include>LICENSE</include>
83				</includes>
84			</resource>
85			<resource>
86		       <directory>${project.basedir}/../..</directory>
87			   <!-- This is put here so that it shows up in the final .jar in an expected spot -->
88			   <!-- Note: icu4j keeps its license file at the root, /LICENSE. We won't conflict. -->
89		       <targetPath>META-INF</targetPath>
90				<includes>
91					<include>LICENSE</include>
92				</includes>
93			</resource>
94		</resources>
95		<plugins>
96			<plugin>
97				<groupId>org.codehaus.mojo</groupId>
98				<artifactId>license-maven-plugin</artifactId>
99				<executions>
100					<execution>
101						<id>add-third-party</id>
102						<phase>package</phase>
103						<goals>
104							<goal>add-third-party</goal>
105						</goals>
106					</execution>
107				</executions>
108				<configuration>
109					<excludedScopes>system,test</excludedScopes>
110					<useMissingFile>true</useMissingFile>
111					<!--
112						exclude the "for-cldr" dependencies.
113						see https://unicode-org.atlassian.net/browse/ICU-21425
114						these are actually under Unicode-3.0 the same as CLDR is.
115						The ICU license file itself is pulled in during assembly (into /LICENSE), which contains
116						all of ICU's third party license information.
117					-->
118					<excludedArtifacts>.*-for-cldr.*</excludedArtifacts>
119				</configuration>
120			</plugin>
121			<plugin>
122				<groupId>org.codehaus.mojo</groupId>
123				<artifactId>buildnumber-maven-plugin</artifactId>
124			</plugin>
125			<plugin>
126				<artifactId>maven-jar-plugin</artifactId>
127				<configuration>
128					<archive>
129						<manifest>
130							<mainClass>${mainClass}</mainClass>
131						</manifest>
132						<manifestEntries>
133							<Built-By>${user.name}</Built-By>
134							<Build-Time>${maven.build.timestamp}</Build-Time>
135							<CLDR-Code-Git-Commit>${buildNumber}</CLDR-Code-Git-Commit>
136							<CLDR-Code-Git-Branch>${scmBranch}</CLDR-Code-Git-Branch>
137						</manifestEntries>
138					</archive>
139				</configuration>
140			</plugin>
141			<plugin>
142		        <groupId>org.apache.maven.plugins</groupId>
143				<artifactId>maven-shade-plugin</artifactId>
144				<executions>
145					<execution>
146						<phase>package</phase>
147						<goals>
148							<goal>shade</goal>
149						</goals>
150						<configuration>
151							<filters>
152								<filter>
153									<artifact>*:*</artifact>
154									<excludes>
155										<!-- exclude other manifests -->
156										<exclude>META-INF/MANIFEST.MF</exclude>
157										<!-- don't care about modules for this purpose -->
158										<exclude>module-info.class</exclude>
159									</excludes>
160								</filter>
161							</filters>
162							<minimizeJar>false</minimizeJar>
163							<finalName>${project.artifactId}</finalName>
164							<transformers>
165								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
166									<mainClass>${mainClass}</mainClass>
167									<manifestEntries>
168										<Main-Class>${mainClass}</Main-Class>
169										<Built-By>${user.name}</Built-By>
170										<Build-Time>${maven.build.timestamp}</Build-Time>
171										<CLDR-Code-Git-Commit>${buildNumber}</CLDR-Code-Git-Commit>
172										<CLDR-Code-Git-Branch>${scmBranch}</CLDR-Code-Git-Branch>
173									</manifestEntries>
174								</transformer>
175								<!-- this will have any other found licenses included -->
176								<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
177									<file>${project.basedir}/target/generated-sources/license/THIRD-PARTY.txt</file>
178									<resource>CLDR-THIRD-PARTY.txt</resource>
179								</transformer>
180								<!-- prevent any possible duplication of LICENSE files -->
181								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
182							</transformers>
183						</configuration>
184					</execution>
185				</executions>
186			</plugin>
187		</plugins>
188	</build>
189</project>
190