type=page
status=published
title=Building and Deploying the Duke's Forest Case Study Application
next=dukes-forest004.html
prev=dukes-forest002.html
~~~~~~
Building and Deploying the Duke's Forest Case Study Application
===============================================================

[[GLNQP]]

[[building-and-deploying-the-dukes-forest-case-study-application]]
Building and Deploying the Duke's Forest Case Study Application
---------------------------------------------------------------

You can use NetBeans IDE or Maven to build and deploy Duke's Forest.

The following topics are addressed here:

* link:#CHDJDIFH[To Build and Deploy the Duke's Forest Application Using
NetBeans IDE]
* link:#CHDEJHBJ[To Build and Deploy the Duke's Forest Application Using
Maven]

[[CHDJDIFH]]

[[to-build-and-deploy-the-dukes-forest-application-using-netbeans-ide]]
To Build and Deploy the Duke's Forest Application Using NetBeans IDE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1.  Make sure that GlassFish Server has been started (see
link:usingexamples002.html#BNADI[Starting and Stopping GlassFish
Server]), as well as the database server (see
link:usingexamples004.html#BNADK[Starting and Stopping Apache Derby]).
2.  From the File menu, choose Open Project.
3.  In the Open Project dialog box, navigate to:
+
[source,oac_no_warn]
----
tut-install/examples/case-studies
----
4.  Select the `dukes-forest` folder.
5.  Select the Open Required Projects check box and click Open Project.
6.  Right-click the `dukes-forest` folder and select Build.
+
This task configures the server, creates and populates the database,
builds all the subprojects, assembles them into JAR and WAR files, and
deploys the `dukes-payment`, `dukes-store,` and `dukes-shipment`
applications.
+
To configure the server, this task creates a JDBC security realm named
jdbcRealm, enables default principal-to-role mapping, and enables single
sign-on (SSO) for the HTTP Service.

[[CHDEJHBJ]]

[[to-build-and-deploy-the-dukes-forest-application-using-maven]]
To Build and Deploy the Duke's Forest Application Using Maven
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1.  Make sure that GlassFish Server has been started (see
link:usingexamples002.html#BNADI[Starting and Stopping GlassFish
Server]), as well as the database server (see
link:usingexamples004.html#BNADK[Starting and Stopping Apache Derby]).
2.  In a terminal window, go to:
+
[source,oac_no_warn]
----
tut-install/examples/case-studies/dukes-forest/
----
3.  Enter the following command to configure the server, create and
populate the database, build all the subprojects, assemble them into JAR
and WAR files, and deploy the `dukes-payment`, `dukes-store,` and
`dukes-shipment` applications:
+
[source,oac_no_warn]
----
mvn install
----
+
To configure the server, this task creates a JDBC security realm named
jdbcRealm, enables default principal-to-role mapping, and enables single
sign-on (SSO) for the HTTP Service.
