title | order | layout |
---|---|---|
Overview |
1 |
page |
Vaadin applications are written in Java, and optionally HTML, JavaScript, or TypeScript. You can develop Vaadin applications in essentially any development environment that has the Java SDK and deploys to a Java Servlet container. You can use Vaadin with any Java IDE or no IDE at all. Vaadin has special support for the Eclipse, NetBeans, and IntelliJ IDEA IDEs.
You need at least the following tools during application development:
-
Java JDK (8 or newer)
-
Maven (3 or newer) or Gradle (5.6 or newer)
-
Node.js (10 or newer, installed automatically by Vaadin 14.2+)
-
npm (5.6 or newer, installed automatically by Vaadin 14.2+)
While Java 8 is supported, we recommend using Java 11 (the latest LTS version) or later, but you need to make sure that your entire toolchain supports it.
Optionally, you can use:
-
A Java IDE (Eclipse EE, NetBeans IDE, IntelliJ IDEA, VS Code, etc.)
-
A front-end IDE such as VS Code, WebStorm, or Atom
-
An external Java Servlet Container (Tomcat, TomEE, JBoss, Wildfly, Glassfish, etc)
For a particular version of the Vaadin Framework, please see the release notes for a more comprehensive list of requirements.
Vaadin applications are run by deploying them to a Java Servlet Container (a server application). All Vaadin starter packs come with an embedded servlet container that can be used during development. You can also use an external servlet container, such as Tomcat, Wildfly, or WebLogic. IDEs include integration with external containers and one can make debugging easier, and more compatible if you use the same one for production.
Managing Vaadin and other Java libraries can get tedious to do manually, so using a build system that manages dependencies automatically is recommended. Vaadin is distributed in the Maven central repository, and can be used with any build or dependency management system that can access Maven repositories, such as Ivy or Gradle, in addition to Maven.
The npm package manager is used for managing Vaadin frontend JavaScript dependencies.
Since Vaadin 14.2, Vaadin automatically downloads and installs (via its Maven plugin) supported versions of Node.js and npm into the ~/.vaadin
directory in the user’s home, unless it detects that these tools are already installed globally.
If installed globally, Vaadin validates that the installed tools are of valid versions.
Other frontend tooling used by Vaadin, such as Webpack and pnpm, are installed locally into each project by npm. pnpm is a caching package manager that reduces the download time across multiple projects.
Older platform versions in the 14 series still require manual installation of Node.js, either globally or in the project directory (the Maven plugin will inform how to do this in a single command if it detects missing tools). Node.js can be downloaded from https://nodejs.org/en/download/ and installing it automatically installs npm as well.
If you are behind a proxy server you should config your proxy settings so Vaadin can use them to download the frontend toolchain. There are four places where Vaadin read proxy settings from. You can set your proxy data in either of the followings:
-
system properties:
-
{project directory}/.npmrc file
-
{user home directory}/.npmrc file
-
environment variables
The settings are read from the list above in order. For example, if you set your proxy in system properties, other sources will be ignored. The keys that you should use to define your proxy settings are as follows:
In System Properties and Environment Variables |
In .npmrc files |
Description |
HTTP_PROXY |
proxy |
a proxy to use for outgoing http requests |
HTTPS_PROXY |
https-proxy |
a proxy to use for outgoing https requests |
NOPROXY |
noproxy |
a comma-separated string of domain extensions that a proxy should not be used for |
.npmrc
file structure is ini (like Java properties files).
It includes pairs of key-values separated by =
.
Here is an example of the content of such a file with proxy settings:
proxy=http://myusername:s3cr3tpassw0rd@proxyserver1:8085"
https-proxy=http://myusername:s3cr3tpassw0rd@proxyserver1:8086"
noproxy=192.168.1.1,vaadin.com,mycompany.com
To learn more about .npmrc
file you can see official npmrc document.
If you are using Travis as a Continuous Integration server then there are two different options to install a proper Node.js version: * Specify the version via Travis configuration in .travis.yml * Install node automatically by Vaadin (14.2+)
Please refer to Specifying Node.js versions in Travis docs how to specify the Node version via .travis.yml
file.
Vaadin (14.2+) automatically installs node
if it can’t be found. It downloads and
installs 12.16.0
version. But it happens only if there is no node
found.
You may force node
installation to the .vaadin
folder inside a home directory
via require.home.node
property. This property sets the maven requireHomeNodeExec
parameter value,
so you may configure the maven goal using <requireHomeNodeExec>true</requireHomeNodeExec>
.
To be able to force node installation into home directory in dev mode you should
use vaadin.require.home.node
system property or require.home.node
web init parameter.