選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

README.md 4.9KB

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