Tuesday, May 28, 2013

Vaadin 7 - Ivyde - Eclipse




Installing Vaadin Plugin for Eclipse

If you are using the Eclipse IDE, using the Vaadin Plugin for Eclipse helps greatly. Notice that you can also create Vaadin projects as Maven projects in Eclipse.
The plugin includes:
  • An integration plugin with wizards for creating new Vaadin-based projects, themes, and client-side widgets and widget sets.
  • A visual editor for editing custom composite user interface components in a WYSIWYG fashion. With full round-trip support from source code to visual model and back, the editor integrates seamlessly with your development process.
  • A version of Book of Vaadin that you can browse in the Eclipse Help system.

Installing the IvyDE Plugin

The Vaadin Plugin for Eclipse requires the Apache IvyDE plugin, which needs to be installed manually in Eclipse before the Vaadin plugin.
  1. Select HelpInstall New Software....
  2. Add the IvyDE update site by clicking the Add... button.
    Enter a name such as "Apache Ivy Update Site" and the URL of the update site:
    http://www.apache.org/dist/ant/ivyde/updatesite
    Then click OK. The Vaadin site should now appear in the Available Software window.
  3. Select the new "Apache Ivy Update Site" from the Work with list.
  4. Select the Apache Ivy, Apache Ivy Ant Tasks, and Apache IvyDE plugins.
    The Apache IvyDE Resolve Visualizer is optional, and would require additional dependency plugins to be installed.
    Then, click Next.
  5. Review the installation details and click Next.
  6. Accept or unaccept the license. Finally, click Finish.
  7. Eclipse may warn about unsigned content. If you feel safe, click OK.
  8. After the plugin is installed, Eclipse will ask to restart itself. You can proceed to install the Vaadin plugin before the restart, as described in the following section, so you can answer Apply Changes Now.

Installing the Vaadin Plugin

You can install the plugin as follows:
  1. Select HelpInstall New Software....
  2. Add the Vaadin plugin update site by clicking Add... button.
    Enter a name such as "Vaadin Update Site" and the URL of the update site: http://vaadin.com/eclipse. If you want or need to use the latest unstable plugin, which is usually more compatible with development and beta releases of Vaadin, you can use http://vaadin.com/eclipse/experimental. Then click OK. The Vaadin site should now appear in the Available Software window.
  3. Select all the Vaadin plugins in the tree.
    Then, click Next.
  4. Review the installation details and click Next.
  5. Accept or unaccept the license. Finally, click Finish.
  6. After the plugin is installed, Eclipse will ask to restart itself. Click Restart.
More installation instructions for the Eclipse plugin can be found at http://vaadin.com/eclipse.

Updating the Plugins

If you have automatic updates enabled in Eclipse (see WindowPreferencesInstall/UpdateAutomatic Updates), the Vaadin plugin will be updated automatically along with other plugins. Otherwise, you can update the Vaadin plugin manually as follows:
  1. Select HelpCheck for Updates. Eclipse will contact the update sites of the installed software.
  2. After the updates are installed, Eclipse will ask to restart itself. Click Restart.
Notice that updating the Vaadin plugin updates only the plugin and not the Vaadin libraries, which are project specific. See below for instructions for updating the libraries.

Updating the Vaadin Libraries

Updating the Vaadin plugin does not update Vaadin libraries. The libraries are project specific, as a different version might be required for different projects, so you have to update them separately for each project.
  1. Open the ivy.xml in an editor Eclipse.
  2. Edit the entity definition at the beginning of the file to set the Vaadin version.
    <!ENTITY vaadin.version "7.0.1">
    You can specify either a fixed version number, as shown in the above example, or a dynamic revision tag such as latest.release. You can find more information about the dependency declarations in Ivy documentation.
  3. Right-click the project and select IvyResolve.
    Updating the libraries can take several minutes. You can see the progress in the Eclipse status bar. You can get more details about the progress by clicking the indicator.
  4. If you have compiled the widget set for your project, recompile it by clicking the Compile Vaadin widgets button in Eclipse toolbar.
  5. Stop the integrated Tomcat (or other server) in Eclipse, clear its caches by right-clicking the server and selecting Clean as well as Clean Tomcat Work Directory, and restart it.
If you experience problems after updating the libraries, you can try clearing the Ivy resolution caches by right-clicking the project and selecting IvyClean all caches. Then, do the IvyResolve and other tasks again. 

Update Vaadin 7 Project with Ivyde

Right click/ Ivyde / Resolve

Source:
https://vaadin.com/book/vaadin7/-/page/getting-started.eclipse.html

0 comments:

Post a Comment