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

Integrating with the Server-Side

<!-- Compile server-side --> <target name="compile-server-side"

depends="init, resolve">

<delete dir="${result-dir}/classes"/> <mkdir dir="${result-dir}/classes"/>

<javac srcdir="${src-location}" destdir="${result-dir}/classes">

<classpath>

<path refid="compile.classpath"/> </classpath>

</javac>

</target>

Compiling the JavaDoc

You may want to include API documentation for the add-on in the same or in a different JAR file. You can do it as follows, using the configuration we defined earlier. You may want to exclude the client-side classes and any test and demo classes from the JavaDoc, as is done in this example, if they are in the same source tree.

<!-- Compile JavaDoc -->

<target name="compile-javadoc" depends="init"> <delete dir="${result-dir}/javadoc"/> <mkdir dir="${result-dir}/javadoc"/>

<javadoc destdir="${result-dir}/javadoc"> <sourcefiles>

<fileset dir="${src-location}" id="src"> <include name="**/*.java"/>

<!-- Excluded stuff from the package --> <exclude name="**/client/**/*"/> <exclude name="**/demo/**/*"/>

<exclude name="**/MyDemoUI.java"/> </fileset>

</sourcefiles>

<classpath>

<path refid="compile.classpath"/> </classpath>

</javadoc>

</target>

Packaging the JAR

An add-on JAR typically includes the following:

Vaadin add-on manifest

The compiled server-side classes

The compiled JavaDoc (optional)

Sources of client-side classes (optional)

Any JavaScript dependency libraries (optional)

Let us begin crafting the target. The JAR requires the compiled server-side classes and the optional API documentation.

<!--

Build the JAR --

>

<target name="package-jar"

376

Building Add-on with Ant

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