Child pages
  • Maven Creating Wonder Applications

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removing obsolete warnings

...

  • eclipse + wolips > see tutorial about installation and operation.
  • Maven > see the Maven Quick Start tutorial.
  • plugins like m2eclipse which supports Maven-eclipse integration.
  • Wonder sources which then are built and installed in your local repository.

One reasonable way to get and maintain the Wonder sources is have a directory which holds all the sources (see here: Download Wonder Source), then use Maven to install and build Wonder (see here: Building the wonder source code with maven).

Several things you should know, currently:

...

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.

...

titleWarning

The woapplication-archtype is under construction, so you must fix a few things.

...


...
	<properties>
		<woversion>5.4.3</woversion>
		<wonderclassifier>wo54</wonderclassifier>
		<wonderversion>5.0.0-SNAPSHOT</wonderversion>
	</properties>

	<!-- the dependency management section defines the characteristics of your dependencies to use when referenced elsewhere -->
	<!-- See http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html -->
	<dependencyManagement>
		<!-- Only ERExtensions and WOOgnl need a wo53 or wo54 classifier but adding it for all WOnder dependencies safeguards it for any future changes to WOnder -->
		<dependencies>
			<!-- in the order you'd like -->
			<dependency>
				<groupId>wonder.core</groupId>
				<artifactId>ERExtensions</artifactId>
				<version>${wonderversion}</version>
				<classifier>${wonderclassifier}</classifier>
			</dependency>
			<dependency>
				<groupId>wonder.core</groupId>
				<artifactId>WOOgnl</artifactId>
				<version>${wonderversion}</version>
				<classifier>${wonderclassifier}</classifier>
			</dependency>
			<dependency>
				<groupId>wonder.core</groupId>
				<artifactId>ERPrototypes</artifactId>
				<version>${wonderversion}</version>
			</dependency>
			<dependency>
				<groupId>com.webobjects</groupId>
				<artifactId>JavaWebObjects</artifactId>
				<version>${woversion}</version>
			</dependency>
			<dependency>
				<groupId>com.webobjects</groupId>
				<artifactId>JavaEOAccess</artifactId>
				<version>${woversion}</version>
			</dependency>
			<dependency>
				<groupId>com.webobjects</groupId>
				<artifactId>JavaFoundation</artifactId>
				<version>${woversion}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<!-- now you just reference the groupId and artifactId of each dependency required. This will work for any child pom also. -->
	<!-- See http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html -->
	<dependencies>
		 <dependency>
			<groupId>wonder.core</groupId>
			<artifactId>ERExtensions</artifactId>
			<classifier>${wonderclassifier}</classifier>
		</dependency>
		<dependency>
			<groupId>wonder.core</groupId>
			<artifactId>WOOgnl</artifactId>
			<classifier>${wonderclassifier}</classifier>
		</dependency>
		<dependency>
			<groupId>wonder.core</groupId>
			<artifactId>ERPrototypes</artifactId>
		</dependency>
		<dependency>
			<groupId>com.webobjects</groupId>
			<artifactId>JavaFoundation</artifactId>
		</dependency>
		<dependency>
			<groupId>com.webobjects</groupId>
			<artifactId>JavaWebObjects</artifactId>
		</dependency>
		<dependency>
			<groupId>com.webobjects</groupId>
			<artifactId>JavaEOAccess</artifactId>
		</dependency>
	</dependencies>

...

2. Fix the Application, Session, DirectAction jave files import statements. As of this writing the import statements are incorrect for Wonder 5.0 which refactored all its classes into packages other than

Code Block
er.extensions

. So just right click on These three files and choose Source > Organize Imports which should, as of this writing, make them

Code Block
import er.extensions.appserver.ERX...

3. Possibly change web components to extend er.extensions.components.ERXComponent instead of the standard WOComponent.
4. The "Properties" file is blank, you can copy one from a non Maven Wonder Application.
5. Main component is NSMacOSRomanStringEncoding, non-Maven Wonder apps use "UTF-8" in the woo.