blob: b7fa383f20c34c01bfa08795a67cecf4a67c5a4a [file] [log] [blame]
rjrjr@google.com79541462011-06-01 14:45:02 +00001<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
rjrjr@google.com79541462011-06-01 14:45:02 +00005 <modelVersion>4.0.0</modelVersion>
6 <groupId>com.google.gwt.sample.mobilewebapp</groupId>
7 <artifactId>MobileWebApp</artifactId>
8 <packaging>war</packaging>
9 <version>1.0-SNAPSHOT</version>
10 <name>com.google.gwt.sample.mobilewebapp.MobileWebApp</name>
rchandia@google.com3409cfa2011-08-16 16:17:24 +000011
rjrjr@google.com79541462011-06-01 14:45:02 +000012 <properties>
13 <!-- Convenience property to set the GWT version -->
rchandia@google.com7ad23172011-06-21 12:55:13 +000014 <gwtVersion>2.4.0</gwtVersion>
rjrjr@google.com79541462011-06-01 14:45:02 +000015
16 <!-- GWT needs at least java 1.6 -->
17 <maven.compiler.source>1.6</maven.compiler.source>
18 <maven.compiler.target>1.6</maven.compiler.target>
19
20 <!-- GAE properties -->
rchandia@google.com83ae9072011-08-31 17:35:46 +000021 <gae.version>1.5.3</gae.version>
rjrjr@google.com79541462011-06-01 14:45:02 +000022 <gae.home>${user.home}/.m2/repository/com/google/appengine/appengine-java-sdk/${gae.version}/appengine-java-sdk-${gae.version}</gae.home>
23 <gae.application.version>1</gae.application.version>
24
rjrjr@google.com53418e02011-09-12 16:46:24 +000025 <!-- Don't let your Mac use a crazy non-standard encoding -->
26 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
27 <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
rjrjr@google.com79541462011-06-01 14:45:02 +000028 </properties>
29
30 <repositories>
rchandia@google.com3409cfa2011-08-16 16:17:24 +000031 <repository>
rjrjr@google.com79541462011-06-01 14:45:02 +000032 <id>objectify-appengine</id>
33 <url>http://objectify-appengine.googlecode.com/svn/maven</url>
rjrjr@google.com79541462011-06-01 14:45:02 +000034 </repository>
35 </repositories>
36
rjrjr@google.com79541462011-06-01 14:45:02 +000037 <dependencies>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +000038 <!-- Google Web Toolkit (GWT) -->
rchandia@google.com7ad23172011-06-21 12:55:13 +000039
40 <dependency>
rjrjr@google.com79541462011-06-01 14:45:02 +000041 <groupId>com.google.gwt</groupId>
42 <artifactId>gwt-user</artifactId>
43 <version>${gwtVersion}</version>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +000044 <!-- "provided" so that we don't deploy -->
rjrjr@google.com79541462011-06-01 14:45:02 +000045 <scope>provided</scope>
46 </dependency>
rchandia@google.com3409cfa2011-08-16 16:17:24 +000047
48 <!-- GWT projects do not usually need a dependency on gwt-dev, but MobileWebApp
49 contains a GWTC Linker (AppCacheLinker) which in turn depends on internals
rjrjr@google.comc8f935e2011-09-16 17:13:44 +000050 of the GWT compiler. -->
rjrjr@google.com79541462011-06-01 14:45:02 +000051 <dependency>
52 <groupId>com.google.gwt</groupId>
53 <artifactId>gwt-dev</artifactId>
54 <version>${gwtVersion}</version>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +000055 <!-- "provided" so that we don't deploy -->
rchandia@google.com3409cfa2011-08-16 16:17:24 +000056 <scope>provided</scope>
rjrjr@google.com79541462011-06-01 14:45:02 +000057 </dependency>
58
rjrjr@google.comc8f935e2011-09-16 17:13:44 +000059 <!-- RequestFactory server -->
60
61 <dependency>
62 <groupId>com.google.web.bindery</groupId>
63 <artifactId>requestfactory-server</artifactId>
64 <version>${gwtVersion}</version>
65 </dependency>
66
67 <!-- Generate the decoder needed by RequestFactory Server -->
68 <!-- Doesn't yet work in eclipse. See maven-processor-plugin below.
69 <dependency>
70 <groupId>com.google.web.bindery</groupId>
71 <artifactId>requestfactory-apt</artifactId>
72 <version>${gwtVersion}</version>
73 </dependency>
74-->
75
76 <!-- RequestFactory will use JSR 303 javax.validation if you let it -->
rjrjr@google.com79541462011-06-01 14:45:02 +000077 <dependency>
rjrjr@google.com79541462011-06-01 14:45:02 +000078 <groupId>org.hibernate</groupId>
79 <artifactId>hibernate-validator</artifactId>
80 <version>4.0.2.GA</version>
81 <exclusions>
82 <exclusion>
83 <groupId>javax.xml.bind</groupId>
84 <artifactId>jaxb-api</artifactId>
85 </exclusion>
86 <exclusion>
87 <groupId>com.sun.xml.bind</groupId>
88 <artifactId>jaxb-impl</artifactId>
89 </exclusion>
90 </exclusions>
91 </dependency>
92
rjrjr@google.comc8f935e2011-09-16 17:13:44 +000093 <!-- Required by Hibernate validator because slf4j-log4j is
94 optional in the hibernate-validator POM -->
95 <dependency>
96 <groupId>org.slf4j</groupId>
97 <artifactId>slf4j-log4j12</artifactId>
98 <version>1.6.1</version>
99 </dependency>
100 <dependency>
101 <groupId>org.slf4j</groupId>
102 <artifactId>slf4j-api</artifactId>
103 <version>1.6.1</version>
104 </dependency>
105
106 <!-- Google App Engine (GAE) -->
rjrjr@google.com79541462011-06-01 14:45:02 +0000107 <dependency>
108 <groupId>com.google.appengine</groupId>
109 <artifactId>appengine-api-1.0-sdk</artifactId>
110 <version>${gae.version}</version>
111 </dependency>
112 <dependency>
113 <groupId>com.google.appengine</groupId>
114 <artifactId>appengine-testing</artifactId>
115 <version>${gae.version}</version>
116 <scope>test</scope>
117 </dependency>
118 <dependency>
119 <groupId>com.google.appengine</groupId>
120 <artifactId>appengine-api-stubs</artifactId>
121 <version>${gae.version}</version>
122 <scope>test</scope>
123 </dependency>
124 <dependency>
125 <groupId>com.google.appengine</groupId>
126 <artifactId>appengine-api-labs</artifactId>
127 <version>${gae.version}</version>
128 </dependency>
rjrjr@google.com79541462011-06-01 14:45:02 +0000129
rjrjr@google.com79541462011-06-01 14:45:02 +0000130 <!-- Objectify for persistence. It uses the stock javax.persistence annotations -->
131
rchandia@google.com3409cfa2011-08-16 16:17:24 +0000132 <dependency>
rjrjr@google.com79541462011-06-01 14:45:02 +0000133 <groupId>com.googlecode.objectify</groupId>
134 <artifactId>objectify</artifactId>
135 <version>3.0</version>
rchandia@google.com3409cfa2011-08-16 16:17:24 +0000136 </dependency>
rjrjr@google.com79541462011-06-01 14:45:02 +0000137 <dependency>
138 <groupId>javax.persistence</groupId>
139 <artifactId>persistence-api</artifactId>
140 <version>1.0</version>
141 </dependency>
142
143 <!-- GIN and Guice for IoC / DI -->
144
145 <dependency>
146 <groupId>com.google.inject</groupId>
147 <artifactId>guice</artifactId>
148 <version>2.0</version>
149 </dependency>
150 <dependency>
151 <groupId>com.google.gwt.inject</groupId>
152 <artifactId>gin</artifactId>
153 <version>1.0</version>
154 </dependency>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000155 <!-- Use the JSR 330 injection interfaces-->
rjrjr@google.com79541462011-06-01 14:45:02 +0000156 <dependency>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000157 <groupId>javax.inject</groupId>
158 <artifactId>javax.inject</artifactId>
159 <version>1</version>
rjrjr@google.com79541462011-06-01 14:45:02 +0000160 </dependency>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000161
162 <!-- Unit tests -->
163
rjrjr@google.com79541462011-06-01 14:45:02 +0000164 <dependency>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000165 <groupId>junit</groupId>
166 <artifactId>junit</artifactId>
167 <version>4.8.1</version>
168 <scope>test</scope>
rjrjr@google.com79541462011-06-01 14:45:02 +0000169 </dependency>
rjrjr@google.com79541462011-06-01 14:45:02 +0000170 </dependencies>
rchandia@google.coma67d0f72011-09-07 12:15:46 +0000171
rjrjr@google.com79541462011-06-01 14:45:02 +0000172 <build>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000173 <!-- Generate compiled stuff in the folder used for development mode -->
rchandia@google.com83ae9072011-08-31 17:35:46 +0000174 <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
rchandia@google.coma67d0f72011-09-07 12:15:46 +0000175
rjrjr@google.com79541462011-06-01 14:45:02 +0000176 <plugins>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000177 <!-- requestfactory-apt runs an annotation processor (APT) to
178 instrument its service interfaces so that
179 RequestFactoryServer can decode client requests. Normally
180 you would just have a dependency on requestfactory-apt
181 with <scope>provided</scope>, but that won't work in
182 eclipse due to m2e bug
183 https://bugs.eclipse.org/bugs/show_bug.cgi?id=335036 -->
184 <plugin>
185 <groupId>org.bsc.maven</groupId>
186 <artifactId>maven-processor-plugin</artifactId>
187 <version>2.0.5</version>
188 <executions>
189 <execution>
190 <id>process</id>
191 <goals>
192 <goal>process</goal>
193 </goals>
194 <phase>generate-sources</phase>
195 </execution>
196 </executions>
197 <dependencies>
198 <dependency>
199 <groupId>com.google.web.bindery</groupId>
200 <artifactId>requestfactory-apt</artifactId>
201 <version>${gwtVersion}</version>
202 </dependency>
203 </dependencies>
204 </plugin>
205
206 <!-- Google Plugin for Eclipse (GPE) won't see the source
207 generated above by requestfactory-apt unless it is exposed
208 as an additional source dir-->
209 <plugin>
210 <groupId>org.codehaus.mojo</groupId>
211 <artifactId>build-helper-maven-plugin</artifactId>
212 <version>1.7</version>
213 <executions>
214 <execution>
215 <id>add-source</id>
216 <phase>generate-sources</phase>
217 <goals>
218 <goal>add-source</goal>
219 </goals>
220 <configuration>
221 <sources>
222 <source>${project.build.directory}/generated-sources/apt</source>
223 </sources>
224 </configuration>
225 </execution>
226 </executions>
227 </plugin>
228
rjrjr@google.com79541462011-06-01 14:45:02 +0000229 <!-- GWT Maven Plugin-->
230 <plugin>
231 <groupId>org.codehaus.mojo</groupId>
232 <artifactId>gwt-maven-plugin</artifactId>
rchandia@google.com35960512011-08-18 13:24:08 +0000233 <version>2.3.0-1</version>
234 <dependencies>
rjrjr@google.com79541462011-06-01 14:45:02 +0000235 <dependency>
236 <groupId>com.google.gwt</groupId>
237 <artifactId>gwt-user</artifactId>
238 <version>${gwtVersion}</version>
239 </dependency>
240 <dependency>
241 <groupId>com.google.gwt</groupId>
242 <artifactId>gwt-dev</artifactId>
243 <version>${gwtVersion}</version>
244 </dependency>
245 <dependency>
246 <groupId>com.google.gwt</groupId>
247 <artifactId>gwt-servlet</artifactId>
248 <version>${gwtVersion}</version>
249 </dependency>
rchandia@google.com35960512011-08-18 13:24:08 +0000250 </dependencies>
rchandia@google.coma67d0f72011-09-07 12:15:46 +0000251 <!-- JS is only needed in the package phase, this speeds up testing -->
rjrjr@google.com79541462011-06-01 14:45:02 +0000252 <executions>
253 <execution>
254 <phase>prepare-package</phase>
255 <goals>
256 <goal>compile</goal>
257 </goals>
258 </execution>
259 </executions>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000260
rchandia@google.coma67d0f72011-09-07 12:15:46 +0000261 <!-- Plugin configuration. There are many available options,
262 see gwt-maven-plugin documentation at codehaus.org -->
rjrjr@google.com79541462011-06-01 14:45:02 +0000263 <configuration>
264 <!-- URL that should be automatically opened in the GWT shell (gwt:run). -->
265 <runTarget>MobileWebApp.html</runTarget>
rjrjr@google.com79541462011-06-01 14:45:02 +0000266 <!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->
267 <compileReport>true</compileReport>
rchandia@google.com35960512011-08-18 13:24:08 +0000268 <module>com.google.gwt.sample.mobilewebapp.MobileWebApp</module>
rjrjr@google.com79541462011-06-01 14:45:02 +0000269 <appEngineVersion>${gae.version}</appEngineVersion>
270 <appEngineHome>${gae.home}</appEngineHome>
271 <logLevel>INFO</logLevel>
272 <style>${gwt.style}</style>
273
rjrjr@google.com79541462011-06-01 14:45:02 +0000274 <server>com.google.appengine.tools.development.gwt.AppEngineLauncher</server>
275 <copyWebapp>true</copyWebapp>
276 </configuration>
277 </plugin>
278
279 <!-- Google App Engine plugin -->
280 <plugin>
281 <groupId>net.kindleit</groupId>
282 <artifactId>maven-gae-plugin</artifactId>
rchandia@google.com83ae9072011-08-31 17:35:46 +0000283 <version>0.8.1</version>
rjrjr@google.com79541462011-06-01 14:45:02 +0000284 <executions>
285 <execution>
286 <id />
287 <phase>validate</phase>
288 <goals>
289 <goal>unpack</goal>
290 </goals>
291 </execution>
292 </executions>
293 </plugin>
294
295 <!-- Add source folders to test classpath in order to run gwt-tests as normal junit-tests -->
296 <plugin>
297 <artifactId>maven-surefire-plugin</artifactId>
rchandia@google.com35960512011-08-18 13:24:08 +0000298 <version>2.5</version>
rjrjr@google.com79541462011-06-01 14:45:02 +0000299 <configuration>
300 <additionalClasspathElements>
301 <additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement>
302 <additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement>
303 </additionalClasspathElements>
304 <useManifestOnlyJar>false</useManifestOnlyJar>
305 <forkMode>always</forkMode>
306
rchandia@google.coma67d0f72011-09-07 12:15:46 +0000307 <!-- Folder for generated testing stuff -->
rjrjr@google.com79541462011-06-01 14:45:02 +0000308 <systemProperties>
309 <property>
310 <name>gwt.args</name>
rchandia@google.com83ae9072011-08-31 17:35:46 +0000311 <value>-out ${project.build.directory}/${project.build.finalName}</value>
rjrjr@google.com79541462011-06-01 14:45:02 +0000312 </property>
313 </systemProperties>
314 </configuration>
315 </plugin>
bobv@google.coma7ee0372011-08-18 11:14:33 +0000316
rjrjr@google.com79541462011-06-01 14:45:02 +0000317 <!-- Copy static web files before executing gwt:run -->
318 <plugin>
319 <artifactId>maven-resources-plugin</artifactId>
320 <version>2.4.2</version>
321 <executions>
322 <execution>
323 <phase>compile</phase>
324 <goals>
325 <goal>copy-resources</goal>
326 </goals>
327 <configuration>
rchandia@google.com83ae9072011-08-31 17:35:46 +0000328 <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
rjrjr@google.com79541462011-06-01 14:45:02 +0000329 <resources>
330 <resource>
331 <directory>src/main/webapp</directory>
332 </resource>
333 </resources>
334 </configuration>
335 </execution>
336 </executions>
337 </plugin>
338
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000339 <!-- Mark the project for Google Plugin for Eclipse (GPE) -->
rjrjr@google.com79541462011-06-01 14:45:02 +0000340 <plugin>
rchandia@google.com35960512011-08-18 13:24:08 +0000341 <artifactId>maven-eclipse-plugin</artifactId>
342 <version>2.8</version>
343 <configuration>
rjrjr@google.com79541462011-06-01 14:45:02 +0000344 <downloadSources>true</downloadSources>
345 <downloadJavadocs>false</downloadJavadocs>
346 <wtpversion>2.0</wtpversion>
347 <additionalBuildcommands>
348 <buildCommand>
349 <name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
350 </buildCommand>
351 </additionalBuildcommands>
352 <additionalProjectnatures>
353 <projectnature>com.google.gwt.eclipse.core.gwtNature</projectnature>
354 <projectnature>com.google.appengine.eclipse.core.gaeNature</projectnature>
355 </additionalProjectnatures>
rchandia@google.com35960512011-08-18 13:24:08 +0000356 </configuration>
rchandia@google.com3409cfa2011-08-16 16:17:24 +0000357 </plugin>
rjrjr@google.com79541462011-06-01 14:45:02 +0000358 </plugins>
rchandia@google.comd1241942011-08-23 20:07:29 +0000359
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000360 <!-- Required by m2e for import into eclipse. No effect on command line builds -->
rchandia@google.comd1241942011-08-23 20:07:29 +0000361 <pluginManagement>
362 <plugins>
rchandia@google.comd1241942011-08-23 20:07:29 +0000363 <plugin>
364 <groupId>org.eclipse.m2e</groupId>
365 <artifactId>lifecycle-mapping</artifactId>
366 <version>1.0.0</version>
367 <configuration>
368 <lifecycleMappingMetadata>
369 <pluginExecutions>
370 <pluginExecution>
371 <pluginExecutionFilter>
rchandia@google.comd1241942011-08-23 20:07:29 +0000372 <groupId>net.kindleit</groupId>
373 <artifactId>maven-gae-plugin</artifactId>
374 <versionRange>[0.7.3,)</versionRange>
375 <goals>
376 <goal>unpack</goal>
377 </goals>
378 </pluginExecutionFilter>
379 <action>
380 <execute />
381 </action>
382 </pluginExecution>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000383
rchandia@google.com83ae9072011-08-31 17:35:46 +0000384 <pluginExecution>
385 <pluginExecutionFilter>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000386 <groupId>org.bsc.maven</groupId>
387 <artifactId>maven-processor-plugin</artifactId>
388 <versionRange>[2.0.5,)</versionRange>
rchandia@google.com83ae9072011-08-31 17:35:46 +0000389 <goals>
rjrjr@google.comc8f935e2011-09-16 17:13:44 +0000390 <goal>process</goal>
rchandia@google.com83ae9072011-08-31 17:35:46 +0000391 </goals>
392 </pluginExecutionFilter>
393 <action>
394 <execute />
395 </action>
396 </pluginExecution>
rchandia@google.comd1241942011-08-23 20:07:29 +0000397 </pluginExecutions>
398 </lifecycleMappingMetadata>
399 </configuration>
400 </plugin>
401 </plugins>
402 </pluginManagement>
rjrjr@google.com79541462011-06-01 14:45:02 +0000403 </build>
404</project>