Version 42.1 by Greg.Brown on 2009/02/18 14:56

Hide last authors
Greg.Brown 17.1 1 = Creating Wonder Applications using Maven + m2eclicpse =
2
3 {{note}}
Lachlan Deck 21.1 4 Under Construction
Greg.Brown 17.1 5 {{/note}}
6
7 If you want to use Wonder in your applications (and why woundn't one) you must be correctly setup with:
8
9 * eclipse + wolips > see tutorial about installation and operation.
10 * Maven > see the Maven [[Quick Start]] tutorial.
11 * plugins like [[m2eclipse>>http://m2eclipse.codehaus.org/]] which supports Maven-eclipse integration.
12 * Wonder sources which then are built and installed in your local repository.
13
14 One reasonable way to get and maintain the Wonder sources is have a directory which holds all the sources (see here: [[Download Wonder Source>>http://wiki.objectstyle.org/confluence/display/WONDER/Download+Wonder+Source%2C+Build+and+Install]]), then use Maven to install and build Wonder (see here: [[Building the wonder source code with maven]]).
15
Greg.Brown 37.1 16 Several things you should know:
Greg.Brown 17.1 17
18 * Wonder is built using a maven "build profile", e.g. "mvn clean install --P wo53" builds things for a WebObjects 5.3.x environment and "mvn clean install --P wo54" builds things for a WebObjects 5.4.x environment.
19 * The only frameworks which are different because of this are ERExtensions and WOOgnl.
20 * Because of this difference you must specify which version you want. For instance, you may want the ERExtensions-5.0.0-SNAPSHOT-wo53.jar, or the ERExtensions-5.0.0-SNAPSHOT-wo54.jar. You specify by adding a "classifier", which would have the value of wo53 or wo54. The other frameworks should not have this classifier.
21
22 With all the tools ready, it's time to make a Wonder application.
23
Greg.Brown 33.1 24 1. Make a new project File > New > Other project, choose a Maven project:
Greg.Brown 29.1 25 1. Hit Next
Greg.Brown 31.1 26 1. Select an archtype, use the local catalog, select the woapplication-archtype, hit Next:
Greg.Brown 29.1 27 1. Fill in appropriate parameters for the woapplication-archtype to set up your new application, hit Finish!
Greg.Brown 17.1 28
29 The eclipse plugins now create your application!
30
Greg.Brown 41.1 31 You should create a WOApplication Run Configuration and add the projects build folder's Java to the classpath as detailed here: [[Maven Running or Debugging as WO Application]], otherwise classes won't be found, etc.
Greg.Brown 17.1 32
33 {{note title="Warning"}}
34 The woapplication-archtype is under construction, so you must fix a few things.
35 # Fix the pom.xml. Delete the properties and dependencies sections that the woapplication-archtype created, and paste this into the pom:
36 {code:xml}
Lachlan Deck 25.1 37
Greg.Brown 17.1 38 <properties>
Greg.Brown 27.1 39 <woversion>5.3.3</woversion>
Greg.Brown 17.1 40 <wonderversion>5.0.0-SNAPSHOT</wonderversion>
41 </properties>
42
43 <dependencyManagement>
44 <dependencies>
45 <dependency>
Greg.Brown 27.1 46 <groupId>com.webobjects</groupId>
47 <artifactId>JavaFoundation</artifactId>
48 <version>${woversion}</version>
Greg.Brown 17.1 49 </dependency>
50 <dependency>
51 <groupId>com.webobjects</groupId>
52 <artifactId>JavaWebObjects</artifactId>
53 <version>${woversion}</version>
54 </dependency>
55 <dependency>
56 <groupId>com.webobjects</groupId>
57 <artifactId>JavaEOAccess</artifactId>
58 <version>${woversion}</version>
59 </dependency>
Greg.Brown 27.1 60 <dependency>
61 <groupId>wonder.core</groupId>
62 <artifactId>ERExtensions</artifactId>
63 <version>${wonderversion}</version>
64 <classifier>wo53</classifier>
65 </dependency>
Greg.Brown 17.1 66 <dependency>
Greg.Brown 27.1 67 <groupId>wonder.core</groupId>
68 <artifactId>ERPrototypes</artifactId>
69 <version>${wonderversion}</version>
70
Greg.Brown 17.1 71 </dependency>
72 </dependencies>
73 </dependencyManagement>
Greg.Brown 27.1 74 <!-- Only ERExtensions and WOOgnl need a wo53 or wo54 classifier -->
Greg.Brown 17.1 75 <dependencies>
76 <dependency>
77 <groupId>wonder.core</groupId>
78 <artifactId>ERExtensions</artifactId>
Greg.Brown 27.1 79 <version>${wonderversion}</version>
80 <classifier>wo53</classifier>
Greg.Brown 17.1 81 </dependency>
82 <dependency>
83 <groupId>wonder.core</groupId>
84 <artifactId>ERPrototypes</artifactId>
Greg.Brown 27.1 85 <version>${wonderversion}</version>
Greg.Brown 17.1 86 </dependency>
87 <dependency>
88 <groupId>com.webobjects</groupId>
89 <artifactId>JavaFoundation</artifactId>
Greg.Brown 27.1 90 <version>${woversion}</version>
Greg.Brown 17.1 91 </dependency>
92 <dependency>
93 <groupId>com.webobjects</groupId>
94 <artifactId>JavaWebObjects</artifactId>
Greg.Brown 27.1 95 <version>${woversion}</version>
Greg.Brown 17.1 96 </dependency>
97 <dependency>
98 <groupId>com.webobjects</groupId>
99 <artifactId>JavaEOAccess</artifactId>
Greg.Brown 27.1 100 <version>${woversion}</version>
Greg.Brown 17.1 101 </dependency>
Greg.Brown 27.1 102
Greg.Brown 17.1 103 </dependencies>
104
Greg.Brown 39.1 105 {code} Fix the versions and classifiers in the pom to be the correct values.
Greg.Brown 17.1 106
Greg.Brown 41.1 107 2. Fix the Application, Session, DirectAction jave files. They all should: {code}import er.extensions.appserver.ERX????{code} But the ".appserver." is left out of the import statements.
Greg.Brown 17.1 108
109 {{/note}}