Our goal when designing Openwings was to have a single jar file
that can be used to install your component. As a result, the unit
of deployment in Openwings is the installable jar file.
Before a component is packaged, a cross-platform description
of component execution must first be provided. The mechanism for
this is to create a InstallableComponentDescriptorPolicy.xml.
The Hello World demos already have these policy files created
for you. They reside in <net.openwings.home>/<componentName>/policies/.
How
Do I Package a Component?
To package a Hello World component, open a DOS or Unix
shell window and navigate to the directory of the Hello
World component. Then execute the command:
ant image
-or-
ant build
|
The image target will perform the following steps:
- create an image directory
- populate directories in the image directory:
- lib
- docs
- http
- policies
- src
- jar up the image directory
The result of all this will be an installable jar file.
The build command will build the component. This includes
compiling component code, generating policies, jar-ing the main
classes, and generating connectors.
To learn more about Ant, go to the Compilation section of the
Developing Components tutorial. To learn more about packaging,
go to the Packaging section of the Developing Components tutorial.
Next: Installing
Your Component