WOLips 3.4.x, and later, Side-note
If you are updating an older project, make sure you get the latest build.xml file. Create a new project, then copy/paste the contents of the fresh build.xml file into your project's build.xml file.
For WOLips 3.4.x and later, while embedding is built-in, it's not enabled by default. To enable embedding:
- make sure you are in the WO Explorer view
- right-click your project folder, select Properties, select WOLips Deployment
- check the related, if not all, options under Embed Frameworks
To create a versioned/dated bundle of your app and resources:
- make sure you are in the Navigator view
- edit build.properties, and add:
There is a known bug with WO 5.4.x (for those not using the latest Wonder release) regarding proper linking to your web server resources within the embedded frameworks. The WOFrameworksBaseURL isn't set correctly. To do this you'll need to programmatically set this within your Application constructor:
Another way to fix this bug is to set the following launch parameter:
Within build.properties (I may need to be corrected on this), the best approach to linking your embedded framework's web server resources automatically is to include (however the bug noted above breaks this):
There was an old bug in the build.xml file but fixed if you have WOLips more recent than october 2010:
Below is outlined "simple embedding" concepts, however full embedding and split-installing are really recommended. This provides fully versioned self-contained bundles of both the application deployment bundle and the webserver deployment bundle. Read the docs on that technique for more advantages. This technique fully explained along with a ready-to-use ant build script is available at:
This simple approach can be used to embed frameworks already installed on your development machine right into the app.woa bundle.
Open your build.xml project file and change embed="false" to embed="true" for the appropriate directory paths in this section of the build.xml file inside the woapplication task
The most common choice is to embed locally installed WOnder and 3rd party frameworks that your app references by setting embed="true" on the wolocalroot frameworks dir as shown below:
The various dirs referenced in the build.xml from which you can select the embed option are:
If you are working with framework source in your Eclipse workspace (which you should be!), then it is critical that you build and install all frameworks before building the deployment bundles to ensure that the embedded frameworks are the same as the source you have been developing and testing with. See next subsection for one approcah to automating this.
Pre-installing Workspace Frameworks Before Embedded Build
You could write a task to install the frameworks directly from the workspace, for example:
... and then you could put a depends attribute on the build target to ensure the frameworks are installed before the embedded build task is executed:
Caveat: This example assumes that each framework you want to embed has an ant "build.xml" file with a "compileAndBuild" target. For frameworks you create yourself using WOLips, you will have this, but for a case where you are checking out individual Wonder framework projects from CVS, then you probably will not have such a build.xml file, so this approach is not quick to implement in that case unless you want to spend a lot of time working on ant build files to resolve the missing build.xml having a compileAndBuild target for those external projects. (KK 3/30/2007)
See also FrameworkSet documentation.
Example for embedding WOFrameworks.
It's often a good idea to create your own targets in the build.xml or even create your own build.xml (with a different name). This leaves the door open for an update of the default build.xml.
Assume two projects: One named Foo( a framework) and the other named Uli (an application). The parent folder has another folder named packandgo.
The packageandgobuild.xml from the application. Two minor changes to the default build.xml:
1 application target
2 compile target
The build.xml from the packageandgo folder:
Just invoke ant in the packageandgo folder and grap the App from the applications folder within the packageandgo folder.