You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

addons-eclipse.asciidoc 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ---
  2. title: Installing Add-ons in Eclipse with Ivy
  3. order: 3
  4. layout: page
  5. ---
  6. [[addons.eclipse]]
  7. = Installing Add-ons in Eclipse with Ivy
  8. The Vaadin Plugin for Eclipse uses Apache Ivy to resolve dependencies. The
  9. dependencies should be listed in the [filename]#ivy.xml# file in the project
  10. root. The Vaadin Directory allows dowloading add-ons from a Maven repository,
  11. which can be accessed also by Ivy.
  12. You can also use Ivy to resolve dependencies in an Ant script.
  13. . Open the add-on page in Vaadin Directory.
  14. . Select the version. The latest is shown by default, but you can choose another
  15. the version from the dropdown menu in the header of the add-on details page.
  16. . Click the [guilabel]#Maven/Ivy# to display the Ivy dependency declaration, as
  17. illustrated in Figure <<figure.addons.eclipse.ivybutton>>. If the add-on is
  18. available with multiple licenses, you will be prompted to select a license for
  19. the dependency.
  20. +
  21. [[figure.addons.eclipse.ivybutton]]
  22. .Ivy Dependency Declaration
  23. image::img/directory-ivy-dependency.png[]
  24. . Open the [filename]#ivysettings.xml# in your Eclipse project either in the XML
  25. or Ivy Editor (either double-click the file or right-click it and select "Open
  26. With > Ivy Editor").
  27. +
  28. Check that the settings file has the [literal]#++<ibiblio>++# entry given in the
  29. Directory page. It should be, if the file was created by the Vaadin project
  30. wizard in Eclipse. If not, copy it there.
  31. +
  32. ----
  33. <chain name="default">
  34. ...
  35. <ibiblio name="vaadin-addons"
  36. usepoms="true"
  37. m2compatible="true"
  38. root="http://maven.vaadin.com/vaadin-addons"/>
  39. ...
  40. </chain>
  41. ----
  42. +
  43. If you get Vaadin addons from another repository, such as the local repository
  44. if you have compiled them yourself, you need to define a resolver for the
  45. repository in the settings file.
  46. . Open the [filename]#ivy.xml# in your Eclipse project and copy the Ivy dependency
  47. to inside the [literal]#++dependencies++# element. It should be as follows:
  48. +
  49. [subs="normal"]
  50. ----
  51. &lt;dependencies&gt;
  52. ...
  53. &lt;dependency org="**com.vaadin.addon**"
  54. name="**vaadin-charts**"
  55. rev="**1.0.0**"/&gt;
  56. &lt;/dependencies&gt;
  57. ----
  58. +
  59. You can specify either a fixed version number or a dynamic revision tag, such as
  60. [literal]#++latest.release++#. You can find more information about the
  61. link:http://ant.apache.org/ivy/history/2.1.0/ivyfile/dependency.html[dependency
  62. declarations] in Ivy documentation.
  63. +
  64. If the [filename]#ivy.xml# does not have a [literal]#++<configurations
  65. defaultconfmapping="default->default">++# defined, you also need to have
  66. [literal]#++conf="default->default"++# in the dependency to resolve transient
  67. dependencies correctly.
  68. +
  69. IvyIDE immediately resolves the dependencies when you save the file.
  70. . Compile the add-on widget set
  71. ////
  72. , as described in &lt;xref
  73. linkend="addons.compiling.eclipse"/&gt;.
  74. ////
  75. by clicking the [guilabel]#Compile Vaadin widgets# button in the toolbar.
  76. +
  77. [[figure.addons.eclipse.toolbar]]
  78. .Compiling Widget Set in Eclipse
  79. image::img/widgetset-compiling-toolbar-hi.png[]
  80. If you experience problems with Ivy, first check all the dependency parameters.
  81. IvyDE can sometimes cause unexpected problems. You can clear the Ivy dependency
  82. cache by right-clicking the project and selecting "Ivy > Clean all caches". To
  83. refresh Ivy configuration, select "Ivy > Refresh". To try resolving again Ivy,
  84. select "Ivy > Resolve".