summaryrefslogtreecommitdiffstats
path: root/documentation/getting-started/getting-started-netbeans.asciidoc
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/getting-started/getting-started-netbeans.asciidoc')
-rw-r--r--documentation/getting-started/getting-started-netbeans.asciidoc103
1 files changed, 70 insertions, 33 deletions
diff --git a/documentation/getting-started/getting-started-netbeans.asciidoc b/documentation/getting-started/getting-started-netbeans.asciidoc
index 6e2fa660de..eff1697243 100644
--- a/documentation/getting-started/getting-started-netbeans.asciidoc
+++ b/documentation/getting-started/getting-started-netbeans.asciidoc
@@ -1,18 +1,15 @@
---
-title: Creating a Project with NetBeans IDE
-order: 7
+title: Creating a Project in NetBeans
+order: 110
layout: page
---
[[getting-started.netbeans]]
-= Creating a Project with NetBeans IDE
+= Creating a Project with the 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.
+In the following, we walk you through the creation of a Vaadin project in NetBeans and show how to run it.
+
+Installation of NetBeans and the Vaadin plugin is covered in <<DUMMY/../../../framework/installing/installing-netbeans#installing.netbeans, "Installing the NetBeans IDE and Plugin">>.
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
@@ -20,42 +17,82 @@ 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
+[[getting-started.netbeans.creating]]
+== Creating a Project
+
+. Select "File > Net Project..." from the main menu or press kbd:[Ctrl+Shift+N].
-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.
+. In the [guilabel]#New Project# window that opens, select the [guilabel]#Vaadin# category and one of the Vaadin archetypes from the right.
++
+image::img/netbeans-newproject-1.png[]
++
+The archetypes are described in more detail in <<getting-started-archetypes#getting-started.archetypes, "Overview of Maven Archetypes">>.
-. Select "File > New Project".
+. In the [guilabel]#Name and Location# step, enter the project parameters.
++
+image::img/netbeans-newproject-2.png[]
-. Select "Maven > Project from Archetype" and click [guibutton]#Next#.
+[guilabel]#Project Name#:: A project name.
+The name must be a valid identifier that may only contains alphanumerics, minus, and underscore.
+It is appended to the group ID to obtain the Java package name for the sources.
-. Find [literal]#++vaadin-archetype-application++#, select it, and click
-[guilabel]#Next#.
+[guilabel]#Project Location#::
+Path to the folder where the project is to be created.
-. 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#.
+[guilabel]#Group Id#:: A Maven group ID for your project.
+It is normally your organization domain name in reverse order, such as `com.example`.
+The group ID is also used as a prefix for the Java source package, so it should be Java-compatible package name.
-+
-[[figure.getting-started.netbeans.maven.new-project]]
-.Adding a New Maven Project in NetBeans
-image::img/netbeans-maven-newproject-name.png[]
+[guilabel]#Version#:: Initial version of your application.
+The number must obey the Maven version numbering format.
+[guilabel]#Package#:: The Java package name to put sources in.
+
+[guilabel]#Additional Creation Properties#::
+The properties control various names.
+They are specific to the archetype you chose.
+
++
+Click [guibutton]#Finish#.
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#.
+dependencies.
+
+[[getting-started.netbeans.exploring]]
+== Exploring a Project
+
+The project wizard has done all the work for you: a UI class skeleton has been written to the [filename]#src# directory.
+The project hierarchy shown in the Project Explorer is shown in <<figure.getting-started.netbeans.exploring>>.
+
+[[figure.getting-started.netbeans.exploring]]
+.A new Vaadin project in NetBeans
+image::img/netbeans-created-annotated-hi.png[width=80%]
+
+The Vaadin libraries and other dependencies are managed by Maven.
+Notice that the libraries are not stored under the project folder, even though they are listed in the "Java Resources > Libraries > Maven Dependencies" virtual folder.
+
+[[getting-started.netbeans.running]]
+== Running the Application
+
+Once created, you can run it in a server as follows.
+
+. In [guilabel]#Projects# tab, select the project and click in the [guilabel]#Run Project# button in the tool bar (or press kbd:[F6]).
+
+. In the [guilabel]#Select deployment server#, select a server from the [guilabel]#Server# list.
+It should show either GlassFish or Apache Tomcat, depending on what you chose in NetBeans installation.
++
+image::img/netbeans-server.png[width=60%]
++
+Also, select [guilabel]#Remember Permanently# if you want to use the same server also in future while developing applications.
++
+Click [guibutton]#OK#.
+.
+It will compile the widget set at this point, which may take a while.
+
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.
-
-
-
+Now when you edit the UI class in the source editor and save it, NetBeans will automatically redeploy the application. After it has finished after a few seconds, you can reload the application in the browser.