Quick Start
Last modified by Paul Hoadley on 2025/01/30 02:09
You should be able to get a "Hello, World!" Wonder application running using Maven in about 10 minutes.
Assumptions
We're going to make a few assumptions to keep this page brief:
- You are running macOS X. You can probably get a WebObjects development environment up on a different OS, but we won't cover that here.
- You have Java installed. Any version will do. People are running WebObjects on Java 21 in production.
- You have Eclipse and WOLips installed. Install the latest version of Eclipse, along with the latest WOLips if you haven't already.
Setup
You need to install Maven:
$ cd ~/Applications $ curl -O https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.zip $ unzip apache-maven-3.9.9-bin.zip $ ln -s apache-maven-3.9.9 apache-maven
Add bin to your path in your shell's startup file, say ~/.zshrc:
PATH=$PATH:/Users/paulh/Applications/apache-maven-3.9.9/bin
Confirm you have it installed:
$ mvn --version Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Finally, add ~/.m2/settings.xml:
<settings xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>wocommunity</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>wocommunity</id>
<url>https://maven.wocommunity.org/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>wocommunity</id>
<url>https://maven.wocommunity.org/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>
Create a new application project
Make a new directory somewhere, and run:
$ mvn archetype:generate -DarchetypeArtifactId=erxapplication-archetype \
-DarchetypeGroupId=org.wocommunity \
-DarchetypeVersion=3.0 -DaskForDefaultPropertyValues=trueAfter some downloading, Maven will prompt you:
Define value for property 'JavaVersion' 1.8: : 1.8 Define value for property 'WonderVersion' 7.2: : 7.4 Define value for property 'groupId': example.app Define value for property 'artifactId': Foo Define value for property 'version' 1.0-SNAPSHOT: : 0.1-SNAPSHOT Define value for property 'package' example.app: : example.app.foo
You can enter any version of Java. You should definitely change WonderVersion from 7.2 → 7.4. Hit 'Y' to confirm when requested.
Build and launch the application
From the same directory, run:
$ cd Foo $ mvn package
Once Maven has finished building, you can launch:
$ ./target/Foo.woa/Foo
A browser should open and show:
Hello WOnder world!
Import your project into Eclipse
A final, optional step is to bring the project into Eclipse.
- File > Import... > Maven > Existing Maven Projects
- Using the file browser, find the top-level "Foo" folder containing the project you created above, click Open.
- Ensure pom.xml is checked and click Finish.
You're done.