Difference between revisions of "How to install an existing Gazelle Web application and work safely on it"

From IHE Wiki
Jump to navigation Jump to search
(Created page with "<br><br> Gazelle is using several modules. These modules may be .jar files, .war files or directories on the Forge (sources). * a .jar file is a library containing java class...")
 
(No difference)

Latest revision as of 17:16, 7 March 2019



Gazelle is using several modules. These modules may be .jar files, .war files or directories on the Forge (sources).

  • a .jar file is a library containing java classes. It can be used by others modules of Gazelle.
  • a .war file is an archive (web) which can be deployed in your JBoss environment.

Those .jar and .war archives will be included in an .ear archive (Enterprise archive). This archive will be your application, using modules you will map within, and will normally use its own database.

In this chapter are the different steps to install a Web project from the Forge and work/commit safely on it in your own Eclipse environment.


To illustrate this chapter, we will take the SampleGazelle application as example. This application is a small Gazelle application, mapped with its own database.


This application uses the following modules :

  • SampleCommon-ejb : Includes an example of common libraries (eg. Audit, Authentication), provided to others modules. Generate a JAR file ready to be loaded in our application.
  • SampleGazelle-ear : This module will build our application using others modules. This application will be represent as a EAR file, generated by this module..
  • SampleGazelle-ui : Web part of our application. It generates a WAR file ready to be loaded in our application.
  • SampleGazelle-persistence : This module corresponds a persistence layer for this application. It's used by all modules. This helps our projects to represent them as one application, using one database. Generate a JAR file ready to be loaded in our application.
  • SampleTF-ejb : This module contains an example of codes from the Technical Framework. Generate a JAR file ready to be loaded in our application.
  • SampleUsers-ejb : This module contains an example of codes managing Gazelle users. Generate a JAR file ready to be loaded in our application.



Step #1 - Check out from the Forge

1. First of all, you have to install JBoss Application Server on your system (If it's not installed, take a look on Prerequisites - Developement Tools). Then, launch Eclipse and select "New project > Checkout projects from SVN"

Go into the directory "/svn/gazelle/SampleGazelle", and select all the projects inside (do not select the SampleGazelle folder but the projects in this folder) and install/check out all the projects in your workspace.



/!\ Note : If you are not able to access to the Forge with SVN, please read section Code control - Access to the Forge.


Be sure that you can see now the projects (as projects and not folders).

It is now recommended to define a Working set "SampleGazelle" in your Eclipse environment. You will see those projects in a folder, this will be a sight of your application. Read the section " How to configure your Eclipse environment ? " for further informations.


Step #2 - Take a look to the read-me.txt file

2. This is very important now to read the 'read-me-txt', which will explain you and resume all the important things to know. This file exists in the ear module. In our example, please read the /SampleGazelle-ear/read-me.txt.



Step #3 - Check your installation is successfully done

3. Following the previous step, your application is now reachable on your Web browser, from the address : http://localhost:8080/SampleGazelle (if your JBoss AS uses the 8080 port).

Your 'gazelle-example' database has been normally created with many tables, and populated using an import SQL script.



Step #4 - Protect your environment

4. IMPORTANT STEP : If the project from the Forge deploys and works, we need to make it safe before developing. Because many files could be generated and are not committable, because they could make troubles for other people in the development team. For that, in the Eclipse environment, select your working set.

Then, in the “Java” perspective (or "Synchronize with the repository" perspective), add to the SVN:ignore all the generated files/directories out of commit procedures:


Please make sure that the following elements are not commitable :

  • '/build' directory
  • '/dist' directory
  • '/exploded-archives' directory
  • '/lib-TF' directory (which contains the .jar file corresponding to this project)
  • '/build.properties' file


Please make sure that those files are checked in :

  • '/.classpath' file
  • '/.project' file


/!\ In another way, please always perform a “svn:ignore” for all generated files after your first compilation.

Step #5 - Let's work

Congratulations, you can now work/commit safely in your application inside your eclipse environment. To start to develop your web-application, you have to take a look on section “How to start to develop your EJB3-JSF in your project ? “.




Back to the Gazelle Developers Guide homepage.