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.

README.md 5.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/framework-8?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
  2. # Vaadin Framework
  3. *[Vaadin Framework](https://vaadin.com/framework) allows you to build modern web apps efficiently in plain Java, without touching low level web technologies.*
  4. 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/).
  5. To contribute, first refer to [Contributing Code](https://github.com/vaadin/framework/blob/master/CONTRIBUTING.md)
  6. for general instructions and requirements for contributing code to the Vaadin framework.
  7. Instructions on how to set up a working environment for developing the Vaadin Framework follow below.
  8. ## Building a package
  9. The distribution files can be built by running the standard Maven goal `mvn install` in the project root.
  10. ## Eclipse Quick Setup
  11. 1. Run
  12. <code>git clone https://github.com/vaadin/framework.git</code>
  13. command or clone the repository your favorite Git tool.
  14. If using Windows, you might want to add these Git settings: `core.autocrlf=false`, `core.fileMode=false` and `core.longpaths=true`.
  15. 1. Run <code>mvn install</code> in the project root.
  16. Note that the first compilation takes a while to finish as maven downloads dependencies used in the projects.
  17. 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.
  18. 1. Import the project into Eclipse as a maven project. Use *File* -> *Import* -> *Maven* -> *Existing Maven Projects*.
  19. 1. Select the *framework* folder (where you cloned the project)
  20. 1. Click “Finish” to complete the import of Vaadin Framework
  21. Now the project should compile without further configuration.
  22. ### Compiling the Default Widget Set and Themes
  23. * Compile the default widgetset by running <code>install</code> maven goal in `vaadin-client-compiled` module root.
  24. In Eclipse this is done by right clicking on vaadin-client-compiled project it and choosing *Run As* -> *Maven Build...*.
  25. * Compile the default themes by running <code>install</code> maven goal in `vaadin-themes` module root.
  26. In Eclipse this is done by right clicking on vaadin-themes project it and choosing *Run As* -> *Maven Build...*.
  27. ### Set up extra workspace preferences
  28. 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.
  29. 1. Open *Window* -> *Preferences* (Windows) or *Eclipse* -> *Preferences* (Mac)
  30. 1. Go to *General* -> *Workspace*
  31. 1. Set *Text file encoding* to *UTF-8*
  32. 1. Set *New text file line delimiter* to *Unix*
  33. 1. Go to XML -> XML Files -> Editor
  34. 1. Ensure the settings are follows:
  35. * Line width: 72
  36. * Format comments: true
  37. * Join lines: true
  38. * Insert whitespace before closing empty end-tags: true
  39. * Indent-using spaces: true
  40. * Indentation size: 4
  41. ### Running a UI test
  42. 1. In a Project Explorer right-click *vaadin-uitest*
  43. 1. Open *Run As* -> *Maven build...*
  44. 1. Type in <code>jetty:run-exploded</code> into *Goals* and click *Run*
  45. 1. Open URL [http://localhost:8888/run/&lt;testUI&gt;](http://localhost:8888/run/<testUI>)
  46. For full instructions please visit [README-TESTS.md](README-TESTS.md).
  47. ## Setting up IntelliJ IDEA to Develop Vaadin Framework 8
  48. 1. Install and run IDEA. Ultimate Edition is better but Community Edition should also work.
  49. 1. Ensure if Git and Maven plugins are installed, properly configured and enabled.
  50. 1. Clone the repository, using menu VCS -> Checkout from Version Control -> Git -> Git Repository URL -> https://github.com/vaadin/framework.git.
  51. When the repository is cloned, do **NOT** open it as a project.
  52. 1. Open cloned repository as a maven object. Use File -> Open and choose root _pom.xml_ file
  53. 1. Have a coffee break while IDEA is loading dependencies and indexing the project
  54. 1. Run Maven targets <code>clean</code> and <code>install</code> using *Maven Projects* tool window to compile the whole project
  55. ### Running a specific UI test
  56. 1. Open *Maven Projects*
  57. 1. Open *vaadin-uitest* -> *Plugins* -> *jetty* -> *jetty:run-exploded*
  58. 1. Open URL [http://localhost:8888/run/&lt;testUI&gt;](http://localhost:8888/run/<testUI>)
  59. For full instructions please visit [README-TESTS.md](README-TESTS.md).
  60. ### Running a Development Server
  61. 1. Open *Run* menu and click *Edit Configurations*
  62. 1. Click green ***+*** sign at top left corner, select *Maven* from popup
  63. 1. In the run configuration page, set any name for the configuration, select *vaadin-uitest* project folder as *Working directory*
  64. 1. Type <code>exec:exec@run-development-server</code> into *Command line* and save the configuration
  65. 1. Run the configuration and open URL [http://localhost:8888/run/&lt;testUI&gt;](http://localhost:8888/run/<testUI>)
  66. ### Running a Development Server in a debug mode
  67. 1. Type <code>exec:exec@debug-development-server</code> into *Command line* and save the configuration
  68. 1. In the same dialog, create new "Remote" debug configuration, using *localhost* and *Port 5005*
  69. 1. Start both configurations and open URL [http://localhost:8888/run/&lt;testUI&gt;](http://localhost:8888/run/<testUI>)