JR Utily

tomee configuration

Showing 1 changed file with 67 additions and 2 deletions
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 17
18 18
19 <properties> 19 <properties>
20 - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 20 + <!-- dependencies version -->
21 <spring.platform-bom.version>2.0.7.RELEASE</spring.platform-bom.version> 21 <spring.platform-bom.version>2.0.7.RELEASE</spring.platform-bom.version>
22 <omnifaces.version>2.5.1</omnifaces.version> 22 <omnifaces.version>2.5.1</omnifaces.version>
23 <primefaces.version>6.0</primefaces.version> 23 <primefaces.version>6.0</primefaces.version>
...@@ -28,7 +28,39 @@ ...@@ -28,7 +28,39 @@
28 <rewrite.version>3.4.1.Final</rewrite.version> 28 <rewrite.version>3.4.1.Final</rewrite.version>
29 <hibernate-commons-annotations.version>5.0.1.Final</hibernate-commons-annotations.version> 29 <hibernate-commons-annotations.version>5.0.1.Final</hibernate-commons-annotations.version>
30 <hibernate-jpa-2.1-api.version>1.0.0.Final</hibernate-jpa-2.1-api.version> 30 <hibernate-jpa-2.1-api.version>1.0.0.Final</hibernate-jpa-2.1-api.version>
31 +
32 + <!-- paths -->
33 + <custom.web.dir>src/main/java/org/legrog/web</custom.web.dir>
34 +
35 + <!-- misc -->
36 + <debug.jvm.args />
37 + <tomee.autoreload />
38 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39 +
40 + </properties>
41 +
42 + <profiles>
43 + <profile>
44 + <id>debug</id>
45 + <!--
46 + activate this one to be able to attach a remote debbuger on tomee
47 + -->
48 + <properties>
49 + <debug.jvm.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</debug.jvm.args>
31 </properties> 50 </properties>
51 + </profile>
52 +
53 + <profile>
54 + <id>autoreload</id>
55 + <!--
56 + activate this one for tomee to reload (takes times) every times it detect a synchro
57 + reminder : you can always force a reload by typing reload in the console while tomee:run is active
58 + -->
59 + <properties>
60 + <tomee.autoreload>true</tomee.autoreload>
61 + </properties>
62 + </profile>
63 + </profiles>
32 64
33 <dependencyManagement> 65 <dependencyManagement>
34 <dependencies> 66 <dependencies>
...@@ -279,7 +311,7 @@ ...@@ -279,7 +311,7 @@
279 <webResources> 311 <webResources>
280 <resource> 312 <resource>
281 <!-- this is relative to the pom.xml directory --> 313 <!-- this is relative to the pom.xml directory -->
282 - <directory>src/main/java/org/legrog/web</directory> 314 + <directory>${custom.web.dir}</directory>
283 <excludes> 315 <excludes>
284 <exclude>**/*.java</exclude> 316 <exclude>**/*.java</exclude>
285 </excludes> 317 </excludes>
...@@ -289,6 +321,16 @@ ...@@ -289,6 +321,16 @@
289 321
290 </configuration> 322 </configuration>
291 </plugin> 323 </plugin>
324 +
325 +
326 + <!-- **** TOMEE **** -->
327 + <!-- For now we just get a generic one from the repo and put it in target dir -->
328 + <!-- For production release, we will need another pom doing a real provisionning and build it with grog-cubi already inside -->
329 + <!--
330 + see http://tomee.apache.org/ng/developer/tools/maven/tomee.html
331 + and http://tomee.apache.org/maven/index.html
332 + for conf references (I love when a new reference page doesn't get the same info as the former one)
333 + -->
292 <plugin> 334 <plugin>
293 <groupId>org.apache.tomee.maven</groupId> 335 <groupId>org.apache.tomee.maven</groupId>
294 <artifactId>tomee-maven-plugin</artifactId> 336 <artifactId>tomee-maven-plugin</artifactId>
...@@ -296,9 +338,32 @@ ...@@ -296,9 +338,32 @@
296 <configuration> 338 <configuration>
297 <context>ROOT</context> 339 <context>ROOT</context>
298 340
341 + <!-- debug agent to attach a remote debbuger, activate profile for that -->
342 + <args>${debug.jvm.args}</args>
343 +
344 + <systemVariables>
345 + <!--
346 + taken from http://tomee-openejb.979440.n4.nabble.com/7-0-0-M3-synchronization-td4677806.html for synchro to work
347 + -->
348 + <openejb.system.apps>true</openejb.system.apps>
349 + <tomee.serialization.class.blacklist>-</tomee.serialization.class.blacklist>
350 + </systemVariables>
351 +
352 +
353 + <synchronization>
354 + <resourcesDir>${custom.web.dir}</resourcesDir>
355 + <extensions>
356 + <extension>.class</extension> <!-- update each time you build with mvn compile -->
357 + <extension>.xhtml</extension> <!-- update each time you save an xhtml in custom web dir -->
358 + </extensions>
359 + </synchronization>
360 + <reloadOnUpdate>${tomee.autoreload}</reloadOnUpdate>
299 361
300 </configuration> 362 </configuration>
301 </plugin> 363 </plugin>
364 +
365 +
366 +
302 <!-- 367 <!--
303 <plugin> 368 <plugin>
304 <groupId>org.apache.openjpa</groupId> 369 <groupId>org.apache.openjpa</groupId>
......