•Include the compiled JavaDoc (optional)
•Include sources of client-side classes for widget set compilation (optional)
•Include any JavaScript dependency libraries (optional)
•Exclude any test or demo code in the project
The exact contents depend on the add-on type. Component add-ons often include a widget set, but also JavaScript components and pure server-side components are possible, which do not have a widget set. You can also have data container add-ons and theme add-ons, which do not have a widget set, as well as various tools.
It is common to distribute the JavaDoc in a separate JAR, but you can also include it in the same JAR.
16.10.1. Exporting Add-on in Eclipse
If you use the Vaadin Plugin for Eclipse for your add-on project, you can simply export the addon from Eclipse.
1. |
Select the project and then File Export from the menu |
2. |
In the export wizard that opens, select Vaadin Vaadin Add-on Package, and click |
|
Next |
3.In the Select the resources to export panel, select the content that should be included in the add-on package. In general, you should include sources in src folder (at least for the client-side package), compiled server-side classes, themes in WebContent/VAADIN/themes. These are all included automatically. You probably want to leave out any demo or example code.
If you are submitting the add-on to Vaadin Directory, the Implementation title should be exactly the name of the add-on in Directory.The name may contain spaces and most other letters. Notice that it is not possible to change the name later.
The Implementation version is the version of your add-on. Typically experimental or beta releases start from 0.1.0, and stable releases from 1.0.0.
The Widgetsets field should list the widget sets included in the add-on, separated by commas. The widget sets should be listed by their class name, that is, without the
.gwt.xml extension.
The JAR file is the file name of the exported JAR file. It should normally include the version number of the add-on. You should follow the Maven format for the name, such as myaddon-1.0.0.jar.
Finally, click Finish.
16.10.2.Building Add-on with Ant
Building an add-on with Ant is similar to building Vaadin applications. Vaadin libraries and other dependencies are retrieved and included in the classpath using Apache Ivy.
In the following, we assume the Eclipse project structure. Let us put the build script in the build folder under the project. We begin the Ant script as follows: