blob: afe499679194a6c9e4b4419dbe9f5a79d1978d91 [file] [log] [blame]
Shawn O. Pearce44671f52009-11-07 12:55:26 -08001<?xml version="1.0" encoding="UTF-8"?>
2<!--
3Copyright (C) 2009 The Android Open Source Project
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17<project xmlns="http://maven.apache.org/POM/4.0.0"
18 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
20 <modelVersion>4.0.0</modelVersion>
21
22 <parent>
23 <groupId>com.google.gerrit</groupId>
24 <artifactId>gerrit-parent</artifactId>
Shawn Pearce9240c292013-05-06 19:39:10 -070025 <version>2.8-SNAPSHOT</version>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080026 </parent>
27
28 <artifactId>gerrit-war</artifactId>
29 <name>Gerrit Code Review - WAR</name>
30 <packaging>war</packaging>
31
32 <description>
33 Gerrit packaged as a standard web application archive
34 </description>
35
36 <dependencies>
37 <dependency>
Shawn O. Pearce49b9d0ef2010-02-23 09:06:22 -080038 <groupId>org.apache.tomcat</groupId>
Shawn O. Pearce136d6cc2012-10-21 21:15:36 -070039 <artifactId>tomcat-servlet-api</artifactId>
40 <scope>provided</scope>
41 </dependency>
42
43 <dependency>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080044 <groupId>com.google.gerrit</groupId>
45 <artifactId>gerrit-gwtui</artifactId>
Shawn O. Pearced1a3f682009-12-29 17:07:01 -080046 <version>${project.version}</version>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080047 <type>war</type>
48 <scope>runtime</scope>
49 </dependency>
50
51 <dependency>
52 <groupId>com.google.gerrit</groupId>
53 <artifactId>gerrit-main</artifactId>
Shawn O. Pearced1a3f682009-12-29 17:07:01 -080054 <version>${project.version}</version>
Augie Fackler3ef55a12011-11-01 10:47:36 -050055 <scope>runtime</scope>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080056 </dependency>
57
58 <dependency>
59 <groupId>bouncycastle</groupId>
60 <artifactId>bcprov-jdk15</artifactId>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080061 <scope>provided</scope>
62 </dependency>
63
64 <dependency>
65 <groupId>bouncycastle</groupId>
66 <artifactId>bcpg-jdk15</artifactId>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080067 <scope>provided</scope>
68 </dependency>
69
70 <dependency>
71 <groupId>org.slf4j</groupId>
72 <artifactId>slf4j-log4j12</artifactId>
73 </dependency>
74
75 <dependency>
76 <groupId>log4j</groupId>
77 <artifactId>log4j</artifactId>
78 </dependency>
79
80 <dependency>
81 <groupId>com.google.gerrit</groupId>
Dave Borowitzfb619672012-01-20 14:05:59 -080082 <artifactId>gerrit-openid</artifactId>
83 <version>${project.version}</version>
84 </dependency>
85
86 <dependency>
87 <groupId>com.google.gerrit</groupId>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080088 <artifactId>gerrit-sshd</artifactId>
Shawn O. Pearced1a3f682009-12-29 17:07:01 -080089 <version>${project.version}</version>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080090 </dependency>
91
92 <dependency>
93 <groupId>com.google.gerrit</groupId>
94 <artifactId>gerrit-httpd</artifactId>
Shawn O. Pearced1a3f682009-12-29 17:07:01 -080095 <version>${project.version}</version>
Shawn O. Pearce44671f52009-11-07 12:55:26 -080096 </dependency>
97
98 <dependency>
99 <groupId>com.google.gerrit</groupId>
100 <artifactId>gerrit-pgm</artifactId>
Shawn O. Pearced1a3f682009-12-29 17:07:01 -0800101 <version>${project.version}</version>
Shawn O. Pearce136d6cc2012-10-21 21:15:36 -0700102 <exclusions>
103 <exclusion>
104 <groupId>org.eclipse.jetty</groupId>
105 <artifactId>jetty-servlet</artifactId>
106 </exclusion>
107 </exclusions>
108 </dependency>
109
110 <dependency>
111 <groupId>org.eclipse.jetty</groupId>
112 <artifactId>jetty-servlet</artifactId>
113 <scope>provided</scope>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800114 </dependency>
Dariusz Lukszaaea76182012-11-20 15:23:36 +0100115
116 <dependency>
117 <groupId>org.apache.tomcat</groupId>
118 <artifactId>servlet-api</artifactId>
119 <scope>provided</scope>
120 </dependency>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800121 </dependencies>
122
Shawn Pearcebf8ebbe2013-05-06 14:23:26 -0700123 <profiles>
124 <profile>
125 <id>plugins</id>
126 <activation>
127 <property>
128 <name>!gerrit.plugins.skip</name>
129 </property>
130 </activation>
131 <dependencies>
132 <!-- CORE PLUGIN LIST -->
133 <dependency>
134 <groupId>com.googlesource.gerrit.plugins.replication</groupId>
135 <artifactId>replication</artifactId>
136 <version>${project.version}</version>
137 <scope>provided</scope>
138 </dependency>
139 <dependency>
140 <groupId>com.googlesource.gerrit.plugins.reviewnotes</groupId>
141 <artifactId>reviewnotes</artifactId>
142 <version>${project.version}</version>
143 <scope>provided</scope>
144 </dependency>
145 <dependency>
146 <groupId>com.googlesource.gerrit.plugins.validators</groupId>
147 <artifactId>commit-message-length-validator</artifactId>
148 <version>${project.version}</version>
149 <scope>provided</scope>
150 </dependency>
151 </dependencies>
152 </profile>
153 </profiles>
154
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800155 <build>
David Pursehouse0d5090a2012-10-29 22:22:59 +0900156 <pluginManagement>
157 <plugins>
158 <plugin>
159 <groupId>org.eclipse.m2e</groupId>
160 <artifactId>lifecycle-mapping</artifactId>
161 <version>1.0.0</version>
162 <configuration>
163 <lifecycleMappingMetadata>
164 <pluginExecutions>
165 <pluginExecution>
166 <pluginExecutionFilter>
167 <groupId>org.apache.maven.plugins</groupId>
168 <artifactId>maven-dependency-plugin</artifactId>
169 <versionRange>[2.0,)</versionRange>
170 <goals>
171 <goal>copy-dependencies</goal>
172 <goal>unpack</goal>goal>
173 </goals>
174 </pluginExecutionFilter>
175 <action>
176 <execute />
177 </action>
178 </pluginExecution>
179 </pluginExecutions>
180 </lifecycleMappingMetadata>
181 </configuration>
182 </plugin>
183 </plugins>
184 </pluginManagement>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800185 <plugins>
186 <plugin>
187 <groupId>org.apache.maven.plugins</groupId>
188 <artifactId>maven-war-plugin</artifactId>
189 <configuration>
190 <warName>gerrit-${project.version}</warName>
191 <archiveClasses>true</archiveClasses>
Shawn O. Pearcee317c252010-07-12 15:31:26 -0700192 <attachClasses>true</attachClasses>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800193 <archive>
194 <addMavenDescriptor>false</addMavenDescriptor>
195 <manifestEntries>
196 <Main-Class>Main</Main-Class>
197 <Implementation-Title>Gerrit Code Review</Implementation-Title>
198 <Implementation-Version>${project.version}</Implementation-Version>
199 </manifestEntries>
200 </archive>
201 <overlays>
202 <overlay>
203 <groupId>com.google.gerrit</groupId>
204 <artifactId>gerrit-main</artifactId>
205 <type>jar</type>
206 <includes>
207 <include>Main.class</include>
Shawn O. Pearce6ee05542009-12-18 15:33:35 -0800208 <include>com/google/gerrit/launcher/*.class</include>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800209 </includes>
210 </overlay>
211 </overlays>
212 </configuration>
213 </plugin>
214
215 <plugin>
Shawn O. Pearceb150f252009-12-30 10:14:58 -0800216 <groupId>org.apache.maven.plugins</groupId>
Shawn O. Pearce136d6cc2012-10-21 21:15:36 -0700217 <artifactId>maven-dependency-plugin</artifactId>
218 <executions>
219 <execution>
220 <id>copy-servlet-api</id>
221 <configuration>
222 <includeGroupIds>org.apache.tomcat,org.eclipse.jetty</includeGroupIds>
223 <excludeArtifactIds>servlet-api</excludeArtifactIds>
224 </configuration>
225 <goals>
226 <goal>copy-dependencies</goal>
227 </goals>
228 </execution>
Shawn Pearcebf8ebbe2013-05-06 14:23:26 -0700229 <execution>
230 <id>copy-plugins</id>
231 <configuration>
232 <!-- CORE PLUGIN LIST -->
233 <includeArtifactIds>commit-message-length-validator,replication,reviewnotes</includeArtifactIds>
234 <includeTypes>jar</includeTypes>
235 <stripVersion>true</stripVersion>
236 <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/plugins</outputDirectory>
237 </configuration>
238 <goals>
239 <goal>copy-dependencies</goal>
240 </goals>
241 </execution>
Shawn O. Pearce136d6cc2012-10-21 21:15:36 -0700242 </executions>
243 </plugin>
244
245 <plugin>
246 <groupId>org.apache.maven.plugins</groupId>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800247 <artifactId>maven-antrun-plugin</artifactId>
248 <executions>
249 <execution>
Shawn O. Pearce136d6cc2012-10-21 21:15:36 -0700250 <id>copy-servlet-api</id>
251 <phase>process-classes</phase>
252 <configuration>
253 <target>
254 <property name="src" location="${project.build.directory}/dependency" />
255 <property name="dst" location="${project.build.directory}/${project.build.finalName}/WEB-INF/pgm-lib" />
256
257 <mkdir dir="${dst}" />
258 <copy overwrite="true" todir="${dst}">
259 <fileset dir="${src}">
260 <include name="*.jar" />
261 </fileset>
262 </copy>
263 </target>
264 </configuration>
265 <goals>
266 <goal>run</goal>
267 </goals>
268 </execution>
269 <execution>
Shawn O. Pearce15779d92011-04-06 16:36:36 -0400270 <id>copy-license</id>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800271 <phase>process-classes</phase>
272 <configuration>
Anatol Pomozov0de57552010-11-09 15:56:47 -0800273 <target>
Shawn O. Pearcee6fc72f2010-02-22 09:31:18 -0800274 <property name="src" location="${basedir}/../Documentation" />
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800275 <property name="dst" location="${project.build.directory}/${project.build.finalName}" />
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800276
277 <copy tofile="${dst}/LICENSES.txt"
Shawn O. Pearcee6fc72f2010-02-22 09:31:18 -0800278 file="${src}/licenses.txt"
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800279 overwrite="true" />
Anatol Pomozov0de57552010-11-09 15:56:47 -0800280 </target>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800281 </configuration>
282 <goals>
283 <goal>run</goal>
284 </goals>
285 </execution>
Shawn O. Pearce15779d92011-04-06 16:36:36 -0400286 <execution>
287 <id>include-documentation</id>
288 <phase>process-classes</phase>
289 <configuration>
Shawn Pearce05751382013-05-06 12:16:45 -0700290 <target unless="gerrit.documentation.skip">
Shawn O. Pearce15779d92011-04-06 16:36:36 -0400291 <property name="src" location="${basedir}/../Documentation" />
292 <property name="out" location="${project.build.directory}/${project.build.finalName}" />
293 <property name="dst" location="${out}/Documentation" />
294
295 <exec dir="${src}" executable="make">
296 <arg value="VERSION=${project.version}" />
297 <arg value="clean" />
298 <arg value="all" />
299 </exec>
300
301 <mkdir dir="${dst}" />
302 <copy overwrite="true" todir="${dst}">
303 <fileset dir="${src}">
304 <include name="*.html" />
305 </fileset>
306 </copy>
307 </target>
308 </configuration>
309 <goals>
310 <goal>run</goal>
311 </goals>
312 </execution>
Edwin Kempinb50ffe32012-10-17 15:04:47 +0200313 <execution>
314 <id>include-release-notes</id>
315 <phase>process-classes</phase>
316 <configuration>
Shawn Pearce05751382013-05-06 12:16:45 -0700317 <target unless="gerrit.documentation.skip">
Edwin Kempinb50ffe32012-10-17 15:04:47 +0200318 <property name="src" location="${basedir}/../ReleaseNotes" />
319 <property name="out" location="${project.build.directory}/${project.build.finalName}" />
320 <property name="dst" location="${out}/ReleaseNotes" />
321
322 <exec dir="${src}" executable="make">
323 <arg value="VERSION=${project.version}" />
324 <arg value="clean" />
325 <arg value="all" />
326 </exec>
327
328 <mkdir dir="${dst}" />
329 <copy overwrite="true" todir="${dst}">
330 <fileset dir="${src}">
331 <include name="*.html" />
332 </fileset>
333 </copy>
334 </target>
335 </configuration>
336 <goals>
337 <goal>run</goal>
338 </goals>
339 </execution>
Shawn O. Pearce44671f52009-11-07 12:55:26 -0800340 </executions>
341 </plugin>
342 </plugins>
343 </build>
344</project>