summaryrefslogtreecommitdiffstats
path: root/documentation/getting-started/getting-started-netbeans.asciidoc
blob: 6e2fa660de5e5aa01d8500388205ca621d808d2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: Creating a Project with NetBeans IDE
order: 7
layout: page
---

[[getting-started.netbeans]]
= Creating a Project with NetBeans IDE

The easiest way to develop Vaadin application with the NetBeans IDE is to use
the Vaadin Plugin for NetBeans. It allows you to create new Vaadin projects
easily and provides many features for working on a project. You can download the
plugin at http://plugins.netbeans.org/plugin/50531/vaadin-plug-in-for-netbeans.
The download page contains a link to a plugin features overview in NetBeans
Wiki.

Without the plugin, you can most easily create a Vaadin project as a Maven
project using a Vaadin archetype. You can also create a Vaadin project as a
regular web application project, but it requires many manual steps to install
all the Vaadin libraries, create the UI class, configure the servlet, create
theme, and so on.

[[getting-started.netbeans.maven]]
== Maven Project from a Vaadin Archetype

Creating a Maven project with a Vaadin archetype creates an application skeleton
with a UI class and project theme, defines the [filename]#web.xml# deployment
descriptor, and also retrieves the latest Vaadin library automatically.

. Select "File > New Project".

. Select "Maven > Project from Archetype" and click [guibutton]#Next#.

. Find [literal]#++vaadin-archetype-application++#, select it, and click
[guilabel]#Next#.

. In the [guilabel]#Name and Location# step, enter [guilabel]#Project Name#, which
is recommended to be only lower-case alphabetics, as it is used also as a
suggestion for the Java package name of the project. Modify the other parameters
for your project and click [guibutton]#Finish#.

+
[[figure.getting-started.netbeans.maven.new-project]]
.Adding a New Maven Project in NetBeans
image::img/netbeans-maven-newproject-name.png[]


Creating the project can take a while as Maven loads all the needed
dependencies. Once created, you can run it by right-clicking on the project in
the [guilabel]#Projects# view and selecting [guilabel]#Run#. In the
[guilabel]#Select deployment server# window that opens, select
[guilabel]#Glassfish# or [guilabel]#Apache Tomcat#, and click [guibutton]#OK#.
If all goes well, NetBeans starts the server in port 8080 and, depending on your
system configuration, launches the default browser to display the web
application. If not, you can open it manually, for example, at
http://localhost:8080/myproject. The project name is used by default as the
context path of the application.