(corrected post after some more investigations)
I use an application on the office, which is based on WebObjects. To understand, how the application works, I’ll try to go deeper into the WebObjects framework.
To develop applications with WebObjects, you can use Eclipse with the WOLips plugin.
I decided to install Eclipse Neon:
Neon.3
Download the package as tar.gz into /tmp.
Switch to root and uncompress the package to /opt
# su - # cd /opt # mv /tmp/eclipse-java-neon-3-linux-gtk-x86_64.tar.gz . # tar xvzf eclipse-java-neon-3-linux-gtk-x86_64.tar.gz # mv eclipse eclipse-java-neon-3 # chown -R arothe:users eclipse-java-neon-3 # exit
As non-privileged user you should now create a directory, which will hold all the WebObjects stuff, including your Eclipse workspace. There is also a warning, that you should not use folder names with space characters and special characters.
# cd # mkdir -p WODevelopment/workspace
Open the Eclipse platform as non-privileged user (you) and choose your workspace directory (see above, ~/WODevelopment/workspace).
Now it is time to download the WOLips plugin. Go to “Help->Install New Software” and click the “Add” button. Now enter the following URL:
Name: WOLips for Eclipse 4.6
Location: https://jenkins.wocommunity.org/job/WOLips46/lastSuccessfulBuild/artifact/temp/dist/
For a Linux-based installation choose WOLips, not the optional package. The latter will only work on Windows and Mac. You must restart Eclipse to finish the installation process. After the installation you have to change the perspective of Eclipse to WOLips. There you can see a lot of new menu items and taskbar icons.
As described in “Learning The Wonders”, I create more folders:
# cd # mkdir -p WODevelopment/Libraries/WOnder/User/Library/Frameworks # mkdir -p WODevelopment/Libraries/WOnder/Network/Library/Frameworks # mkdir -p WODevelopment/WonderSource # mkdir -p WODevelopment/Tools # ln -s /opt/eclipse-java-neon-3/ WODevelopment/Tools/eclipse-java-neon-3
I have to install the WebObjects framework files. There is an installer, which I can use. The installer is available on http://wocommunity.org/documents/tools/WOInstaller.jar.
# cd ~/WODevelopment/Tools # curl -O http://wocommunity.org/documents/tools/WOInstaller.jar # cd # java -jar WODevelopment/Tools/WOInstaller.jar 5.4.3 ~/WODevelopment/Libraries/WOnder
This creates new stuff within ~/WODevelopment/Libraries/WOnder. Rename some folders, which are shuffled from the installer:
# cd /wo-destination # mkdir System # mv Library System/. # mv Local/Library Library # rm -rf Local
To work with WOLips in Eclipse, we need an important file, wolips.properties. This I can store into ~/WODevelopment/wolips.properties.
wo.api.root=/home/arothe/WODevelopment/Libraries/WOnder/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.WebObjectsReference.docset/Contents/Resources/Documents/documentation/InternetWeb/Reference/WO542Reference wo.apps.root=/home/arothe/WODevelopment/Libraries/WOnder/Library/WebObjects/Applications wo.bootstrapjar=/home/arothe/WODevelopment/Libraries/WOnder/System/Library/WebObjects/JavaApplications/wotaskd.woa/WOBootstrap.jar wo.extensions=/home/arothe/WODevelopment/Libraries/WOnder/Library/WebObjects/Extensions wo.local.frameworks=/home/arothe/WODevelopment/Libraries/WOnder/Library/Frameworks wo.local.root=/home/arothe/WODevelopment/Libraries/WOnder wo.network.frameworks=/home/arothe/WODevelopment/Libraries/WOnder/Network/Library/Frameworks wo.network.root=/home/arothe/WODevelopment/Libraries/WOnder/Network wo.system.frameworks=/home/arothe/WODevelopment/Libraries/WOnder/System/Library/Frameworks wo.system.root=/home/arothe/WODevelopment/Libraries/WOnder/System wo.user.frameworks=/home/arothe/WODevelopment/Libraries/WOnder/User/Library/Frameworks wo.user.root=/home/arothe/WODevelopment/Libraries/WOnder/User wolips.properties=/home/arothe/WODevelopment/wolips.properties
Store this file and create a new directory, which is the default search path for the wolips.properties. The build procedures look there for the file, but to edit it, its better to have it on the top-most folder.
# cd # mkdir -p "/home/arothe/WODevelopment/Libraries/WOnder/Library/Application Support/WOLips" # ln -s /home/arothe/WODevelopment/wolips.properties "/home/arothe/WODevelopment/Libraries/WOnder/Library/Application Support/WOLips/wolips.properties"
Open in Eclipse “Window->Preferences”. On the left side there must be a category “WOLips”. There I can setup the new wolips.properties file and leave the textfield with TAB. Now you can see the new folders. Click on every textfield, there must no error be visible on top of the window. You cannot create valid projects until you have installed the WebObjects framework and have configured it right within Eclipse. There is a strange error: sometimes WOLips forgets the configured file and folders. After you close the configuration window, you should come back and look, whether or not the new settings are still there.
I have created a new “WebObjects Application” within Eclipse. There shouldn’t any errors (maybe a warning of Java1.5 compatibility). Right-click on the project and choose “WOLips Ant Tools->Install”. This should run without any errors (warnings are okay). If there is a problem with an EO* framework, you have to set a new user.home property for the Ant process. It can be set on Window->Preferences->Ant->Runtime->Properties. Add a new global property like:
user.home
/home/arothe/WODevelopment/Libraries/WOnder
Test the Ant install process again, you can delete the project, if all is fine.
To install the Project Wonder stuff I need the git-Tools first. As root we have to install some packages (look for git in your software repository, sometimes the package is named “git”, sometimes “git-all”):
# su - # yum install git-all # exit
As unprivileged user you can now clone the Git repository:
# cd ~/WODevelopment # git clone https://github.com/wocommunity/wonder.git WonderSource
Now we have the source code, but we need the binary frameworks, which will be linked to our Wonder projects. To build these frameworks on the commandline, we need a local Ant installation. Download Ant (e.g. 1.9.9) and uncompress the archive into /opt:
# su - # cd /opt # curl -O http://ftp.fau.de/apache//ant/binaries/apache-ant-1.9.9-bin.tar.gz # tar xvzf apache-ant-1.9.9-bin.tar.gz # chown -R root:root /opt/apache-ant-1.9.9 # exit
The environment variables ANT_HOME and JAVA_HOME must be set, both can be made within the .bash_profile of the non-privileged user or globally in /etc/profile.d
export ANT_HOME=/opt/apache-ant-1.9.9 export JAVA_HOME=/opt/jdk1.8.0_25 export PATH=${PATH}:${ANT_HOME}/bin
Test the Ant installation as non-privileged user with
# ant -version Apache Ant(TM) version 1.9.9 compiled on February 2 2017
Now I can start the build process of the WOnder frameworks.
# cd # cd WODevelopment/WonderSource # ant -Duser.home=/home/arothe/WODevelopment/Libraries/WOnder frameworks
All frameworks will be built. Open the Eclipse and create a new “WOnder project”. The project in Eclipse can be run and install.
To finish the last step, the installation of the frameworks on the local webserver, I have found a property “wo.server.root”, which is defined in WonderSource/Build/build/default.properties as /Library/WebServer/Documents/WebObjects. This I have changed to “/srv/www/htdocs/WebObjects” within the wolips.properties. I have to execute the following statement as root (superuser because of the file permissions for /srv/www/htdocs/WebObjects):
# su - # cd /home/arothe/WODevelopment/WonderSource # ant -Duser.home=/home/arothe/WODevelopment/Libraries/WOnder frameworks.install
This runs successsfully, all frameworks are installed in /srv/www/htdocs/WebObjects/Frameworks.