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

Mobile Applications with TouchKit

Library Dependencies

TouchKit requires the Reflections library for compiling the widget set. You can get the JAR from http://code.google.com/p/reflections/.

If you use the Vaadin Plugin for Eclipse and manage the Vaadin library dependencies with Ivy, you can get the Reflections library by adding the following dependency:

<dependency org="org.reflections" name="reflections" rev="0.9.8" />

22.3.2. Installing in Maven

You can install Vaadin TouchKit in a Maven project by adding it a dependency, as described first below. If you are creating a new project, you can use the TouchKit Maven archetype to create a project skeleton.

Defining as a Dependency

To use TouchKit in a Vaadin project, you need to include the following dependency in the POM. The artifactId should be vaadin-touchkit-agpl or vaadin-touchkit-cval, depending on your choise for the license.

<dependency>

<groupId>com.vaadin.addon</groupId> <artifactId>vaadin-touchkit-agpl</artifactId> <version>LATEST</version>

</dependency>

You can use the LATEST version as shown above or a specific version by its version number.

You also need to define the repository for the Vaadin add-ons under the <repositories> element:

<repository> <id>vaadin-addons</id>

<url>http://maven.vaadin.com/vaadin-addons</url> </repository>

You also need to enable the widget set compilation in the POM, as described in Section 17.4.3, “Enabling Widget Set Compilation”, and compile it.

Using the Archetype

You can create a new TouchKit application project using the Maven vaadin-archetype-touchkit archetype, as described in Section 2.6, “Using Vaadin with Maven”.

For example, from command-line, you could do:

$ mvn archetype:generate \ -DarchetypeGroupId=com.vaadin \ -DarchetypeArtifactId=vaadin-archetype-touchkit \ -DgroupId=example.com -DartifactId=myproject \ -Dversion=0.1.0 -Dpackaging=war

480

Installing in Maven

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