Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
book-of-vaadin.pdf
Скачиваний:
88
Добавлен:
24.03.2015
Размер:
13.43 Mб
Скачать

Integrating with the Server-Side

depends="compile-server-side, compile-javadoc"> <jar jarfile="${target-jar}" compress="true">

First, you need to include a manifest that defines basic information about the add-on. The implementation title must be the exact title of the add-on, as shown in the Vaadin Directory title. The vendor is you. The manifest also includes the license title and file reference for the add-on.

<!-- Manifest required by Vaadin Directory --> <manifest>

<attribute name="Vaadin-Package-Version" value="1" />

<attribute name="Vaadin-Widgetsets" value="${widgetset}" />

<attribute name="Implementation-Title" value="My Own Addon" />

<attribute name="Implementation-Version" value="${version}" />

<attribute name="Implementation-Vendor" value="Me Myself" />

<attribute name="Vaadin-License-Title" value="Apache2" />

<attribute name="Vaadin-License-File" value="http://www.apache.org/licenses/LICENSE-2.0" />

</manifest>

The rest of the package-jar target goes as follows. As was done in the JavaDoc compilation, you also need to exclude any test or demo code in the project here. You need to modify at least the emphasized parts for your project.

<!-- Include built server-side classes --> <fileset dir="build/result/classes">

<patternset>

<include name="com/example/myaddon/**/*"/> <exclude name="**/client/**/*"/>

<exclude name="**/demo/**/*"/> <exclude name="**/test/**/*"/> <exclude name="**/MyDemoUI*"/>

</patternset>

</fileset>

<!-- Include widget set sources --> <fileset dir="src">

<patternset>

<include name="com/exaple/myaddon/**/*"/> </patternset>

</fileset>

<!-- Include JavaDoc in the JAR --> <fileset dir="${result-dir}/javadoc" includes="**/*"/>

</jar>

</target>

You should now be ready to run the build script with Ant.

16.11. Migrating from Vaadin 6

The client-side architecture was redesigned almost entirely in Vaadin 7. In Vaadin 6, state synchronization was done explicitly by serializing and deserializing the state on the serverand clientside. In Vaadin 7, the serialization is handled automatically by the framework using state objects.

Migrating from Vaadin 6

377

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]