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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. Vaadin
  2. ======
  3. *[Vaadin](https://vaadin.com) is a Java framework for building modern web applications that look great, perform well and make you and your users happy.*
  4. For instructions about _using_ Vaadin to develop applications, please refer to
  5. https://vaadin.com/learn
  6. To contribute, first refer to https://vaadin.com/wiki/-/wiki/Main/Contributing+Code
  7. for general instructions and requirements for contributing code to the Vaadin framework.
  8. Instructions on how to set up a working environment for developing the Vaadin
  9. framework follow below.
  10. Quick Setup
  11. ======
  12. 1. <code>git clone https://github.com/vaadin/vaadin.git</code>
  13. 1. Install IvyDE, including Ant Tasks, if needed (http://www.apache.org/dist/ant/ivyde/updatesite)
  14. 1. Import the project into Eclipse
  15. 1. Run build/ide.xml in Eclipse
  16. For more details, see below
  17. Cloning the project repositories
  18. ======
  19. The Vaadin repository can be cloned using
  20. <pre><code>git clone https://github.com/vaadin/vaadin.git</code></pre>
  21. or using your favorite Git tool.
  22. If using Windows, you might want to add these Git settings: core.autocrlf=false and core.fileMode=false.
  23. Setting up Eclipse to Develop Vaadin 7
  24. =========
  25. Start Eclipse
  26. -------------
  27. 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.
  28. Install IvyDE
  29. ---------
  30. You'll need the Apache Ivy plug-in for Eclipse to build the project:
  31. 1. Go to *Help* -> *Install New Software...*
  32. 1. Enter `http://www.apache.org/dist/ant/ivyde/updatesite` in the "Work with:" text field
  33. 1. Select and install all items
  34. If you have installed IvyDE via the Eclipse Marketplace previously, **make sure** that you also have *Apache Ivy Ant Tasks* installed, which is not included in that IvyDE installation:
  35. 1. Go to *Help* -> *Install New Software...*
  36. 1. Click the hyperlink in the "What is already installed?" sentence near the bottom right-hand corner
  37. 1. Verify that the list includes *Apache Ivy Ant Tasks*
  38. 1. If it isn't included, follow the installation process above, but select only *Apache Ivy library* > *Apache Ivy Ant Tasks*
  39. Import the Project into the Workspace
  40. ------------
  41. 1. Do *File* -> *Import* -> *General* -> *Existing Projects into Workspace*
  42. ![ImportProject](http://f.cl.ly/items/0G361519182v1z2T1o1O/Import.png "Import project")
  43. 1. Select the *vaadin* folder (where you cloned the project)
  44. 1. Ensure the *vaadin* project is checked
  45. 1. Click “finish” to complete the import of Vaadin Framework
  46. The project should compile without further configuration. If the project does not compile without errors, choose *Ivy* -> *Resolve* from the vaadin project popup menu to ensure all dependencies have been resolved.
  47. Note that the first compilation takes a while to finish as Ivy downloads dependencies used in the projects.
  48. Compiling the Default Widget Set and Themes
  49. --------
  50. Compile the default widget set by executing the default target in build/ide.xml in the vaadin project.
  51. In Eclipse this is done by opening build/ide.xml, right clicking on it and choosing *Run As* -> *Ant Build*.
  52. ![CompileWidgetSet](http://cl.ly/image/1R43162b282e/build.png "Compiling the Widget Set")
  53. Set up extra workspace preferences
  54. --------
  55. 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.
  56. 1. Open *Window* -> *Preferences* (Windows) or *Eclipse* -> *Preferences* (Mac)
  57. 1. Go to *General* -> *Workspace*
  58. 1. Set *Text file encoding* to *UTF-8*
  59. 1. Set *New text file line delimiter* to *Unix*
  60. 1. Go to XML -> XML Files -> Editor
  61. 1. Ensure the settings are follows:
  62. <pre><code>Line width: 72
  63. Format comments: true
  64. Join lines: true
  65. Insert whitespace before closing empty end-tags: true
  66. Indent-using spaces: true
  67. Indentation size: 4
  68. </code></pre>
  69. Running a UI test
  70. ------
  71. The *vaadin* project includes an embedded Jetty (*com.vaadin.launcher.DevelopmentServerLauncher*) which is used for running the UI tests.
  72. In Eclipse you can launch it using the included launch configuration: Right click on *eclipse/Development Server (vaadin).launch" and select *Debug As* -> *Development Server (vaadin)*.
  73. This launches a Jetty on port 8888 which allows you to run any UI class in the project by opening http://localhost:8888/run/&lt;UI class name&gt;?restartApplication in your browser, e.g. [http://localhost:8888/run/com.vaadin.tests.components.label.LabelModes?restartApplication](http://localhost:8888/run/com.vaadin.tests.components.label.LabelModes?restartApplication) (Use ?restartApplication to ensure the correct UI is shown).
  74. Running JUnit tests
  75. =====
  76. The unit tests for the projects can be run using
  77. <pre><code>ant test</code></pre>
  78. Note that the included Vaadin TestBench (browser) tests require access to a TestBench cluster, currently only available internally at Vaadin Ltd.
  79. Building a package
  80. =====
  81. The distribution files can be built in two steps.
  82. 1. Unpack required gwt jars into the project
  83. <pre><code>ant -f gwt-files.xml unpack.gwt</code></pre>
  84. 2. Build the project by running
  85. <pre><code>ant</code></pre>
  86. in the project root directory (add -Dvaadin.version=1.2.3 to use a specific version number).
  87. Setting up other IDEs to Develop Vaadin 7
  88. =========
  89. - Unofficial instructions
  90. - IntelliJ IDEA: http://github.com/Saulis/vaadin-idea-workspace/