Last modified by Henrique Prange on 2015/09/11 17:57

From version 22.1
edited by Lachlan Deck
on 2008/06/24 00:39
Change comment: Add tip to hang in there with longish guide.
To version 28.1
edited by Ramsey Gurley
on 2015/09/11 17:57
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ldeck
1 +XWiki.ramsey
Content
... ... @@ -1,29 +1,36 @@
1 1  So you're interested in //kicking the maven tyres//, so to speak, or just want to see what it's all about. The following provides hints on how to try maven with your current WebObjects projects, if say you're using the standard WOLips ant builds, without having to adopt a different file structure. Whilst this is not the recommended approach for the long term it allows you to try things out side-by-side with your current build system.
2 2  
3 3  {{info title="Recommended Homework (or pre-requisites)"}}
4 +It's //really// worth doing your homework on maven in order to understand it. The place to start is Learning Maven found at [[http:~~/~~/maven.apache.org>>url:http://maven.apache.org||shape="rect"]]. Various guides are also found at [[http:~~/~~/maven.apache.org/guides/>>url:http://maven.apache.org/guides/||shape="rect"]].
4 4  
5 -It's _really_ worth doing your homework on maven in order to understand it. The place to start is Learning Maven found at [http://maven.apache.org]. Various guides are also found at [http://maven.apache.org/guides/].
6 +At the very least you want to have read through, and understood, the [[Getting Started Tutorial>>url:http://maven.apache.org/guides/getting-started/index.html||shape="rect"]].
6 6  
7 -At the very least you want to have read through, and understood, the [Getting Started Tutorial|http://maven.apache.org/guides/getting-started/index.html].
8 -
9 -The maven user mailing list is also recommended for getting help. It's quite active and, as you find for the WebObjects mailing lists, is an invaluable resource. See [Getting Help|http://maven.apache.org/users/getting-help.html].
10 -
8 +The maven user mailing list is also recommended for getting help. It's quite active and, as you find for the WebObjects mailing lists, is an invaluable resource. See [[Getting Help>>url:http://maven.apache.org/users/getting-help.html||shape="rect"]].
11 11  {{/info}}
12 12  
13 13  {{tip title="Hang in there"}}
14 -
15 15  This particular guide might look long but some of the xml is duplicated a few times to show differing examples.
16 -
17 17  {{/tip}}
18 18  
19 -=== What's the aim ===
15 +=== Why Maven ===
20 20  
21 -This might be stating the obvious, but an OO developer will, in the course of time (or is //supposed// to anyway), build up various encapsulated, //reusable//, libraries or frameworks that can be tapped into for differing projects. So let's assume we have multiple frameworks and applications in our build. Each of these has some common ground, such as their dependencies on certain WebObjects frameworks, or the file layout, and of course they each may have something distinctive about them.
17 +This might be stating the obvious, but an OO developer will, in the course of time (or is //supposed// to anyway), build up various encapsulated, //reusable//, libraries or frameworks that can be tapped into for differing projects. In addition, those frameworks or libraries will themselves often depend on third party frameworks like apache commons, log4j, or WebObjects.
22 22  
19 +It can be extraordinarily tedious to manage downloading, installing, compiling, and packaging these dependencies. Just finding a particular version of commons-logging-1.1.jar can take 20 minutes. Then everyone in your workgroup has to agree where to put it, and copy it over. If you decide to update to 1.1.1, you have to talk to everyone in your workgroup again, remember to put it into production when you deploy, etc.
20 +
21 +This is not a new problem in computer science. There are other tools that attempt to solve this problem, maven just takes it beyond just the build stage into nightly builds, running tests, packaging, deploying, etc.
22 +
23 +So in essence, the goal of maven is to automate even more of the whole build/test/install process then is currently done, even to the point of downloading software needed as part of the build. In addition, maven emphasizes //standards// over //configuration//. In WebObjects terms, that's a fancy way of saying that if you put your .wo files in Components, maven will know they need to go into the Resources folder in the .woa.
24 +
25 +So while you still have to provide maven with information on the dependencies, if you use the standard locations for things, you won't have to specify much else.
26 +
27 +=== A sample build ===
28 +
29 +So let's assume we have multiple frameworks and applications in our build. Each of these has some common ground, such as their dependencies on certain WebObjects frameworks, or the file layout, and of course they each may have something distinctive about them.
30 +
23 23  The layout of the frameworks and applications might look like this:
24 24  
25 25  {{noformat}}
26 -
27 27  /trunk/
28 28  /trunk/apps/
29 29  /trunk/apps/ApplicationA/
... ... @@ -35,9 +35,9 @@
35 35  
36 36  {{/noformat}}
37 37  
38 -Our aim is twofold:
45 +This is a pretty standard way for many WO developers to group their projects. Framework projects go into frameworks, apps into apps. We can leverage that standard layout to accomplish two things:
39 39  
40 -1. put as much configuration as possible that's shared between all frameworks, for example, into /frameworks/pom.xml so we only have to define it once. The configuration is inherited by a child pom.
47 +1. put as much configuration as possible that's shared between all frameworks, for example, into /frameworks/pom.xml so we only have to define it once. The configuration is inherited by a child pom. This makes the child pom.xml files simpler.
41 41  1. Be able to issue a single command that will package each and every framework and application.
42 42  
43 43  === Key Concepts ===
... ... @@ -44,30 +44,30 @@
44 44  
45 45  Typical things that make up a pom are as follows. (Note: only pom identification is mandatory. All the others have defaults.)
46 46  
47 -1. pom identification (who am I?)
48 -The base triplet used to identify an artifact (i.e., product)
54 +1. (((
55 +pom identification (who am I?)
56 + The base triplet used to identify an artifact (i.e., something you need to build/package/install)
49 49  
50 50  {{noformat}}
51 -
52 52   <artifactId>CustomExtensions</artifactId>
53 53   <groupId>com.mywostuff.frameworks</groupId>
54 54   <version>0.0.1-SNAPSHOT</version>
55 55  
56 56  {{/noformat}}
64 +)))
65 +1. (((
66 +pom packaging (i.e., what are we building?)
67 + The default value for the packaging element is JAR if not specified. For the purposes of this exercise, we'll use JAR for the frameworks and woapplication for the applications, which requires the woproject maven plugin (TODO revisit this scenario with the apple maven plugin)
57 57  
58 -1. pom packaging (i.e., what are we building?)
59 -The default value for the packaging element is JAR if not specified. For the purposes of this exercise, we'll use JAR for the frameworks and woapplication for the applications, which requires the woproject maven plugin (TODO revisit this scenario with the apple maven plugin)
60 -
61 61  {{noformat}}
70 + <packaging>woapplication</packaging>
62 62  
63 - <packaging>woapplication</artifactId>
64 -
65 65  {{/noformat}}
73 +)))
74 +1. (((
75 +pom parent identification (who do I belong to?)
66 66  
67 -1. pom parent identification (who do I belong to?)
68 -
69 69  {{noformat}}
70 -
71 71   <parent>
72 72   <artifactId>frameworks</artifactId>
73 73   <groupId>com.mywostuff</groupId>
... ... @@ -74,11 +74,11 @@
74 74   </parent>
75 75  
76 76  {{/noformat}}
84 +)))
85 +1. (((
86 +modules (a.k.a kids; who belongs to me?)
77 77  
78 -1. modules (a.k.a kids; who belongs to me?)
79 -
80 80  {{noformat}}
81 -
82 82   <modules>
83 83   <module>CustomExtensions</module>
84 84   <module>CustomBusinessLogic</module>
... ... @@ -85,11 +85,11 @@
85 85   </modules>
86 86  
87 87  {{/noformat}}
95 +)))
96 +1. (((
97 +dependencies (what do I need?)
88 88  
89 -1. dependencies (what do I need?)
90 -
91 91  {{noformat}}
92 -
93 93   <dependencies>
94 94   <dependency>
95 95   <groupId>log4j</groupId>
... ... @@ -106,7 +106,7 @@
106 106   </dependencies>
107 107  
108 108  {{/noformat}}
109 -
116 +)))
110 110  1. build sources/resources (what do I have?)
111 111  1. properties and filtering resources (variable definitions)
112 112  1. dependency/plugin management (shared configuration and versioning)
... ... @@ -116,18 +116,15 @@
116 116  
117 117  === Alternate File System Layout Concepts ===
118 118  
119 -As you would (i.e., should) have read by now, Maven has what it calls //standards//. One such standard is the [[standard directory layout>>http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html_standard]]. One of the advantages of following the standards is that you get something for free: you have less to configure (or even almost nothing) in order to build a jar, for example, from your sources and resources. When that's not possible, options are available that allow you to //subvert// these standards or provide extra resouces.
126 +As you would (i.e., should) have read by now, Maven has what it calls //standards//. One such standard is the [[standard directory layout>>url:http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html_standard||shape="rect"]]. One of the advantages of following the standards is that you get something for free: you have less to configure (or even almost nothing) in order to build a jar, for example, from your sources and resources. When that's not possible, options are available that allow you to //subvert// these standards or provide extra resouces.
120 120  
121 121  {{tip title="Mavan Model Reference Doco"}}
122 -
123 -To see what built-in options are available for maven see [Maven Model|http://maven.apache.org/ref/2.0.9/maven-model/maven.html].
124 -
129 +To see what built-in options are available for maven see [[Maven Model>>url:http://maven.apache.org/ref/2.0.9/maven-model/maven.html||shape="rect"]].
125 125  {{/tip}}
126 126  
127 -The following roughly resembles the current WebObjects WOLips produced project layout (a.k.a Fluffy Bunny layout).
132 +In this case though, we're just trying to "kick the tyres", so we don't want to have to move our files around. The following roughly resembles the current WebObjects WOLips produced project layout (a.k.a Fluffy Bunny layout).
128 128  
129 129  {{noformat}}
130 -
131 131  /MyProject
132 132  /MyProject/Components
133 133  /MyProject/Resources
... ... @@ -137,10 +137,9 @@
137 137  
138 138  {{/noformat}}
139 139  
140 -Assuming your building a framework, for example, the following is an extract from the relevant pom.xml. It specifies where to find your java source files and resources. Notice we've also defined the target path for each resource. (See the [[Maven Model#class//resource//>>http://maven.apache.org/ref/2.0.9/maven-model/maven.html#class_resource]] for a definition of targetPath)
144 +Assuming your building a framework, for example, the following is an extract from the relevant pom.xml. It specifies where to find your java source files and resources, we can put this in /trunk/pom.xml and then all the child pom.xml files will know we're using Fluffy Bunny Layout. Notice we've also defined the target path for each resource. (See the [[WOL:Maven Model#class_resource>>url:http://maven.apache.org/ref/2.0.9/maven-model/maven.html#class_resource||shape="rect"]] for a definition of targetPath)
141 141  
142 -{{code title="pom.xml"}}
143 -
146 +{{code title="pom.xml" 0="xml"}}
144 144  <...>
145 145   <build>
146 146   <sourceDirectory>Sources</sourceDirectory>
... ... @@ -172,12 +172,11 @@
172 172  
173 173  === Project Dependencies Concepts ===
174 174  
175 -Most projects, of course, have dependencies on other libraries or frameworks. See the [[Maven Getting Started#How//do//I//use//external//dependencies//>>http://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies]].
178 +Most projects, of course, have dependencies on other libraries or frameworks. See the [[WOL:Maven Getting Started#How_do_I_use_external_dependencies>>url:http://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies||shape="rect"]].
176 176  
177 -The following shows the mixture of third party dependencies and custom framework dependencies. Notice that the scope element determines the life cycle phase each dependency is relevant for. See [[Maven Model#class//dependency//>>http://maven.apache.org/ref/2.0.9/maven-model/maven.html#class_dependency]] for specific definitions.
180 +The following shows the mixture of third party dependencies and custom framework dependencies. Notice that the scope element determines the life cycle phase each dependency is relevant for. See [[WOL:Maven Model#class_dependency>>url:http://maven.apache.org/ref/2.0.9/maven-model/maven.html#class_dependency||shape="rect"]] for specific definitions.
178 178  
179 179  {{noformat}}
180 -
181 181   <dependencies>
182 182   <dependency>
183 183   <artifactId>CustomExtensions</artifactId>
... ... @@ -201,12 +201,17 @@
201 201  
202 202  {{/noformat}}
203 203  
206 +=== Project Inheritance ===
207 +
208 +It naturally gets a bit boring having to define the same things over and over again. So, you can utilise a parent pom file specifying its packaging as 'pom'. Dependencies, plugins and executions, resources specifications and so forth can be defined once and shared by any sub-modules. See [[http:~~/~~/maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance>>url:http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance||shape="rect"]] and [[Java World's The Maven 2 POM demystified>>url:http://www.javaworld.com/javaworld/jw-05-2006/jw-0529-maven.html||shape="rect"]] for further information and examples.
209 +
210 +For our example we'll have trunk/pom.xml which will define everything common to any and all modules in the hierarchy. Likewise, trunk/frameworks/pom.xml and trunk/apps/pom.xml will define everything common to frameworks and applications respecively.
211 +
204 204  === Repositories ===
205 205  
206 -So far we have assumed that maven just knows where to find third party libraries. There is the default local repository (e.g., ,,/.m2/repository) and a remote one at ibiblio.org or a mirror of the same. See [[http://maven.apache.org/guides/introduction/introduction-to-repositories.html]].,,
214 +So far we have assumed that maven just knows where to find third party libraries. There is the default local repository (e.g., ~~/.m2/repository) and a remote one at ibiblio.org or a mirror of the same. See [[http:~~/~~/maven.apache.org/guides/introduction/introduction-to-repositories.html>>url:http://maven.apache.org/guides/introduction/introduction-to-repositories.html||shape="rect"]]. Repositories are what lets you specify, "my app needs commons-logging-1.1.1" and maven can then pull it into the build as needed. Here we're adding some additional repositories to the defaults. You might want to setup one for your workgroup, and then there are some useful WO-related ones as well. We can include this in the master trunk/pom.xml file, then all the children can use it.
207 207  
208 208  {{noformat}}
209 -
210 210  <repositories>
211 211   <repository>
212 212   <id>system-repo</id>
... ... @@ -274,14 +274,17 @@
274 274  
275 275  {{/noformat}}
276 276  
277 -Note: A remote repository is not guaranteed to keep older versions of libraries, for example, indefinitely. It's recommended that you set up one for your intranet which stores what you need for longevity. See both the above intro to repositories and [[http://www.theserverside.com/tt/articles/article.tss?l=SettingUpMavenRepository]].
284 +Note: A remote repository is not guaranteed to keep older versions of libraries, for example, indefinitely. This is why it's recommended that you set up one for your intranet which stores what you need for longevity. See both the above intro to repositories and [[http:~~/~~/www.theserverside.com/tt/articles/article.tss?l=SettingUpMavenRepository>>url:http://www.theserverside.com/tt/articles/article.tss?l=SettingUpMavenRepository||shape="rect"]].
278 278  
279 279  === Packaging Frameworks as Jars ===
280 280  
281 -Here's the definition for /frameworks/pom.xml.
288 +Here's the definition for /frameworks/pom.xml, definitions here will be shared by all of the individual framework pom.xml files. Note that it depends on the following Info.plist file being located under trunk/frameworks/src/main/resources (maven builds can use files stored in common off of a shared structure):
282 282  
283 -{{code title="/frameworks/pom.xml"}}
284 284  
291 +
292 +{{attachments patterns="Info.plist" upload="false"/}}
293 +
294 +{{code title="/frameworks/pom.xml" 0="xml"}}
285 285  <?xml version="1.0" encoding="UTF-8"?>
286 286  <project xmlns="http://maven.apache.org/POM/4.0.0"
287 287   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
... ... @@ -289,7 +289,7 @@
289 289   http://maven.apache.org/xsd/maven-4.0.0.xsd">
290 290  
291 291   <modelVersion>4.0.0</modelVersion>
292 -
302 +
293 293   <!-- parent artifact -->
294 294   <parent>
295 295   <artifactId>mywostuff</artifactId>
... ... @@ -301,7 +301,7 @@
301 301   <artifactId>frameworks</artifactId>
302 302   <groupId>com.mywostuff</groupId>
303 303   <packaging>pom</packaging>
304 -
314 +
305 305   <!-- framework relevant properties -->
306 306   <properties>
307 307   <!-- NS related properties fills in Info.plist etc-->
... ... @@ -405,10 +405,9 @@
405 405  
406 406  {{/code}}
407 407  
408 -and CustomExtensions which has no further dependencies
418 +Since our CustomExtensions has no further dependencies, its pom.xml merely specifies its parent and its identity.
409 409  
410 -{{code title="/frameworks/CustomBusinessLogic/pom.xml"}}
411 -
420 +{{code title="/frameworks/CustomBusinessLogic/pom.xml" 0="xml"}}
412 412  <?xml version="1.0"?>
413 413  <project>
414 414   <!-- parent artifact -->
... ... @@ -425,10 +425,9 @@
425 425  
426 426  {{/code}}
427 427  
428 -and CustomBusinessLogic (which has a further dependency on CustomExtensions)
437 +CustomBusinessLogic has a further dependency on CustomExtensions, so it specifies its parent, its identity, and the dependency.
429 429  
430 -{{code title="/frameworks/CustomBusinessLogic/pom.xml"}}
431 -
439 +{{code title="/frameworks/CustomBusinessLogic/pom.xml" 0="xml"}}
432 432  <?xml version="1.0"?>
433 433  <project>
434 434   <!-- parent artifact -->
... ... @@ -441,7 +441,7 @@
441 441   <!-- artifact identity -->
442 442   <artifactId>CustomBusinessLogic</artifactId>
443 443   <groupId>com.mywostuff.frameworks</groupId>
444 -
452 +
445 445   <!-- specific dependencies -->
446 446   <dependencies>
447 447   <dependency>
... ... @@ -455,18 +455,233 @@
455 455  
456 456  === Packaging Applications ===
457 457  
458 -details to come...
466 +Here's the definition for /apps/pom.xml which is shared by any sub-modules (i.e., ApplicationA and ApplicationB). Both apps need certain WebObjects frameworks, so we specify those only once for both, here in the parent pom. We also specify Fluffy Bunny Layout, and some maven plugins we want to use. Again, this is for both applications.
459 459  
460 -=== Packaging Applications as True WAR ===
468 +{{code title="/apps/pom.xml" 0="xml"}}
469 +<?xml version="1.0" encoding="UTF-8"?>
470 +<project xmlns="http://maven.apache.org/POM/4.0.0"
471 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
472 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
473 + http://maven.apache.org/xsd/maven-4.0.0.xsd">
461 461  
462 -You can find steps to package WO Applications as True WAR [[here>>Packaging WO Applications as true WAR with Maven]].
475 + <modelVersion>4.0.0</modelVersion>
463 463  
464 -more details to come...
477 + <!-- parent artifact -->
478 + <parent>
479 + <groupId>com</groupId>
480 + <artifactId>mywostuff</artifactId>
481 + <version>1.0-SNAPSHOT</version>
482 + </parent>
465 465  
466 -=== Project Inheritance ===
484 + <!-- artifact identity -->
485 + <artifactId>apps</artifactId>
486 + <groupId>com.mywostuff</groupId>
487 + <packaging>pom</packaging>
467 467  
468 -details to come...
489 + <!-- modules -->
490 + <modules>
491 + <module>ApplicationA</module>
492 + <module>ApplicationB</module>
493 + </modules>
469 469  
495 + <!-- specific dependencies (for modules) -->
496 + <dependencies>
497 + <!-- wonder frameworks -->
498 + <dependency>
499 + <artifactId>ERExtensions</artifactId>
500 + <groupId>${wonder.common.groupId}</groupId>
501 + </dependency>
502 + <dependency>
503 + <artifactId>JavaWOExtensions</artifactId>
504 + <groupId>${wonder.common.groupId}</groupId>
505 + </dependency>
506 +
507 + <!-- project libs -->
508 + <dependency>
509 + <artifactId>CustomExtensions</artifactId>
510 + <groupId>${my.frameworks.groupId}</groupId>
511 + </dependency>
512 + <dependency>
513 + <artifactId>CustomBusinessLogic</artifactId>
514 + <groupId>${my.frameworks.groupId}</groupId>
515 + </dependency>
516 +
517 + <!-- webobjects dependencies -->
518 + <dependency>
519 + <artifactId>JavaFoundation</artifactId>
520 + <groupId>${webobjects.groupId}</groupId>
521 + </dependency>
522 + <dependency>
523 + <artifactId>JavaJDBCAdaptor</artifactId>
524 + <groupId>${webobjects.groupId}</groupId>
525 + </dependency>
526 + <dependency>
527 + <artifactId>JavaWebObjects</artifactId>
528 + <groupId>${webobjects.groupId}</groupId>
529 + </dependency>
530 + <dependency>
531 + <artifactId>JavaEOControl</artifactId>
532 + <groupId>${webobjects.groupId}</groupId>
533 + </dependency>
534 + <dependency>
535 + <artifactId>JavaEOAccess</artifactId>
536 + <groupId>${webobjects.groupId}</groupId>
537 + </dependency>
538 + <dependency>
539 + <artifactId>JavaWebObjects</artifactId>
540 + <groupId>${webobjects.groupId}</groupId>
541 + </dependency>
542 + <dependency>
543 + <artifactId>JavaXML</artifactId>
544 + <groupId>${webobjects.groupId}</groupId>
545 + </dependency>
546 + </dependencies>
547 +
548 + <!-- build config (for modules) -->
549 + <build>
550 + <sourceDirectory>src</sourceDirectory>
551 + <testSourceDirectory>tests</testSourceDirectory>
552 + <resources>
553 + <resource>
554 + <targetPath>Resources</targetPath>
555 + <filtering>false</filtering>
556 + <directory>Components</directory>
557 + </resource>
558 + <resource>
559 + <targetPath>Resources</targetPath>
560 + <filtering>false</filtering>
561 + <directory>Resources</directory>
562 + </resource>
563 + <resource>
564 + <targetPath>WebServerResources</targetPath>
565 + <filtering>false</filtering>
566 + <directory>WebServerResources</directory>
567 + </resource>
568 + </resources>
569 + <plugins>
570 + <plugin>
571 + <artifactId>maven-wolifecycle-plugin</artifactId>
572 + <groupId>org.objectstyle.woproject.maven2</groupId>
573 + <version>2.0.15</version>
574 + <extensions>true</extensions>
575 + <configuration>
576 + <source>${java.target}</source>
577 + <target>${java.target}</target>
578 + </configuration>
579 + </plugin>
580 + <plugin>
581 + <groupId>org.apache.maven.plugins</groupId>
582 + <artifactId>maven-javadoc-plugin</artifactId>
583 + <configuration>
584 + <javadocVersion>${java.target}</javadocVersion>
585 + <locale>en-AU</locale>
586 + <minmemory>128m</minmemory>
587 + <maxmemory>512m</maxmemory>
588 + </configuration>
589 + </plugin>
590 + <!--
591 + TODO build numbering
592 + <plugin>
593 + <groupId>org.codehaus.mojo</groupId>
594 + <artifactId>maven-buildnumber-plugin</artifactId>
595 + <version>0.9.6</version>
596 + <executions>
597 + <execution>
598 + <phase>validate</phase>
599 + <goals>
600 + <goal>create</goal>
601 + </goals>
602 + </execution>
603 + </executions>
604 + <configuration>
605 + <doCheck>true</doCheck>
606 + <doUpdate>true</doUpdate>
607 + </configuration>
608 + </plugin>
609 + -->
610 + </plugins>
611 + <pluginManagement>
612 + <plugins>
613 + <plugin>
614 + <groupId>org.apache.maven.plugins</groupId>
615 + <artifactId>maven-compiler-plugin</artifactId>
616 + <configuration>
617 + <source>${java.target}</source>
618 + <target>${java.target}</target>
619 + </configuration>
620 + </plugin>
621 + </plugins>
622 + </pluginManagement>
623 + </build>
624 +</project>
625 +
626 +{{/code}}
627 +
628 +With most stuff specified in the parent pom, ApplicationA needs only to specify its parent, its idenity, and add a couple of extra specific dependencies to those inherited from its parent.
629 +
630 +{{code title="/apps/ApplicationA/pom.xml" 0="xml"}}
631 +<?xml version="1.0"?>
632 +<project>
633 + <modelVersion>4.0.0</modelVersion>
634 +
635 + <!-- parent artifact -->
636 + <parent>
637 + <artifactId>apps</artifactId>
638 + <groupId>com.mywostuff</groupId>
639 + <version>1.0-SNAPSHOT</version>
640 + <relativePath>../apps</relativePath> <!-- e.g., (optional) if your app is under /trunk -->
641 + </parent>
642 +
643 + <!-- artifact identity -->
644 + <artifactId>ApplicationA</artifactId>
645 + <groupId>com.mywostuff.apps</groupId>
646 + <packaging>woapplication</packaging> <!-- woproject specific packaging -->
647 +
648 + <!-- specific properties -->
649 + <properties>
650 + <!-- general properties -->
651 + <mainclass>your.app.Application</mainclass>
652 + </properties>
653 +
654 + <!-- specific dependencies -->
655 + <dependencies>
656 + <!-- wonder frameworks -->
657 + <dependency>
658 + <artifactId>Ajax</artifactId>
659 + <groupId>${wonder.ajax.groupId}</groupId>
660 + </dependency>
661 + <dependency>
662 + <artifactId>ERCaptcha</artifactId>
663 + <groupId>${wonder.common.groupId}</groupId>
664 + <!-- requires jcaptcha-all below -->
665 + </dependency>
666 + <dependency>
667 + <artifactId>WOOgnl</artifactId>
668 + <groupId>${wonder.common.groupId}</groupId>
669 + </dependency>
670 +
671 + <!-- general libs -->
672 + <dependency>
673 + <artifactId>jcaptcha-all</artifactId>
674 + <groupId>com.octo.captcha</groupId>
675 + </dependency>
676 + <dependency>
677 + <artifactId>commons-collections</artifactId>
678 + <groupId>commons-collections</groupId>
679 + </dependency>
680 + <dependency>
681 + <groupId>ognl</groupId>
682 + <artifactId>ognl</artifactId>
683 + </dependency>
684 + </dependencies>
685 +</project>
686 +
687 +{{/code}}
688 +
689 +=== Packaging Applications as True WAR ===
690 +
691 +You can find steps to package WO Applications as True WAR [[here>>doc:WOL.Packaging WO Applications as true WAR with Maven]].
692 +
470 470  === Eclipse Integration ===
471 471  
472 472  details to come...