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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # Vaadin Framework
  2. *[Vaadin Framework](https://vaadin.com/framework) allows you to build modern web apps efficiently in plain Java, without touchking low level web technologies.*
  3. For instructions about _using_ Vaadin to develop applications, please refer to [Vaadin tutorial](https://vaadin.com/docs/-/part/framework/tutorial.html) and other [documentation](https://vaadin.com/docs/).
  4. To contribute, first refer to [Contributing Code](https://vaadin.com/wiki/-/wiki/Main/Contributing+Code) for general instructions and requirements for contributing code to the Vaadin framework.
  5. Instructions on how to set up a working environments for developing the Vaadin Framework follow below.
  6. ## Building a package
  7. The distribution files can be built by running the standard Maven goal `mvn install` in the project root.
  8. ## Eclipse Quick Setup
  9. 1. Run
  10. <code>git clone https://github.com/vaadin/vaadin.git</code>
  11. command or clone the repository your favorite Git tool.
  12. If using Windows, you might want to add these Git settings: `core.autocrlf=false` and `core.fileMode=false`.
  13. 1. Run <code>mvn install</code> in the project root.
  14. Note that the first compilation takes a while to finish as maven downloads dependencies used in the projects.
  15. 1. Start Eclipse with the workspace you would like to use. It is usually a good idea to use the parent folder of the Git repository as the workspace folder.
  16. 1. Import the project into Eclipse as a maven project. Use *File* -> *Import* -> *Maven* -> *Existing Maven Projects*.
  17. 1. Select the *vaadin* folder (where you cloned the project)
  18. 1. Click “Finish” to complete the import of Vaadin Framework
  19. Now the project should compile without further configuration.
  20. ### Compiling the Default Widget Set and Themes
  21. * Compile the default widgetset by running <code>install</code> maven goal in `vaadin-client-compiled` module root.
  22. In Eclipse this is done by right clicking on vaadin-client-compiled project it and choosing *Run As* -> *Maven Build...*.
  23. * Compile the default themes by running <code>install</code> maven goal in `vaadin-themes` module root.
  24. In Eclipse this is done by right clicking on vaadin-themes project it and choosing *Run As* -> *Maven Build...*.
  25. ### Set up extra workspace preferences
  26. The following preferences need to be set to keep the project consistent. You need to do this especially to be able to contribute changes to the project.
  27. 1. Open *Window* -> *Preferences* (Windows) or *Eclipse* -> *Preferences* (Mac)
  28. 1. Go to *General* -> *Workspace*
  29. 1. Set *Text file encoding* to *UTF-8*
  30. 1. Set *New text file line delimiter* to *Unix*
  31. 1. Go to XML -> XML Files -> Editor
  32. 1. Ensure the settings are follows:
  33. Line width: 72
  34. Format comments: true
  35. Join lines: true
  36. Insert whitespace before closing empty end-tags: true
  37. Indent-using spaces: true
  38. Indentation size: 4
  39. ### Running a UI test
  40. 1. In a Project Explorer right-click *vaadin-uitest*
  41. 1. Open *Run As* -> *Maven build...*
  42. 1. Type in <code>jetty:run-exploded</code> into *Goals* and click *Run*
  43. 1. Open URL *http://localhost:8080/run/<testUI>*
  44. ## Setting up IntelliJ IDEA to Develop Vaadin 7
  45. 1. Intall and run IDEA. Ultimate Edition is better but Community Edition should also work.
  46. 1. Ensure if Git and Maven plugins are installed, properly configured and enabled.
  47. 1. Clone the repository, using menu VCS -> Checkout from Version Control -> Git -> Git Repository URL -> https://github.com/vaadin/vaadin.git.
  48. When the repository is cloned, do **NOT** open it as a project.
  49. 1. Open cloned repository as a maven object. Use File -> Open and choose root _pom.xml_ file
  50. 1. Have a coffee break while IDEA is loading dependencies and indexing the project
  51. 1. Run Maven targets <code>clean</code> and <code>install</code> using *Maven Projects* tool window to compile the whole project
  52. ## Running a specific UI test
  53. 1. Open *Maven Projects*
  54. 1. Open *vaadin-uitest* -> *Plugins* -> *jetty* -> *jetty:run-exploded*
  55. 1. Open URL *http://localhost:8080/run/<testUI>*
  56. ## Running a Development Server
  57. 1. Open *File* -> *New* -> *Module...*
  58. 1. Choose type *Java* and click *Next*
  59. 1. Type in name <code>uitest-run</code> and set *Content Root* and *Module File Location* to <code>&lt;your project location&gt;/uitest-run</code>
  60. 1. Click *Finish*
  61. 1. Open *File* -> *Project Structure...*
  62. 1. Choose <code>uitest-run</code> module
  63. 1. Open *Dependencies* tab
  64. 1. Click *+* -> *Module Dependency* -> *vaadin-uitest* -> *OK*
  65. 1. Click *+* -> *Library...* -> *New Library...* -> *From Maven*
  66. 1. Type in <code>org.eclipse.jetty.aggregate:jetty-all:9.4.0.M0</code> and press *Tab*
  67. 1. Wait a little while Idea is trying to download the library, then click *OK*
  68. 1. Close *Project Structure* dialog by pressing *OK*
  69. 1. Open *Run* -> *Edit Configurations...* then create a new configuration of type *Application* named <code>DevelopmentServerLauncher</code>
  70. 1. Set *Main class* to <code>com.vaadin.launcher.DevelopmentServerLauncher</code>
  71. 1. Set *Single instance only* checkmark
  72. 1. Set *VM options* to <code>-ea</code>
  73. 1. Set *Use classpath options* to <code>uitest-run</code>
  74. 1. Set *Working directory* to <code>uitest</code>
  75. 1. Close *Run/Debug Configurations* dialog by pressing *OK*
  76. The run configuration is ready.