6.2. Project File Structure
Below is the project file structure of a simple application, Sales, consisting of the Middleware, Web Client and Web Portal blocks.

The project root contains build scripts (build.gradle
, settings.gradle
) and IntelliJ IDEA project files.
The modules
directory includes the subdirectories of the project modules − global, core, gui, portal, web.

The global module contains the source code directory, src
, with configuration files – metadata.xml, persistence.xml and views.xml. The com.sample.sales.service
package contains interfaces of the Middleware services; the com.sample.sales.entity
package contains entity classes and localization files for them.

The core module contains the following directories:
-
db
– directory with the database create and update scripts. -
src
– source code directory; its root contains the application properties file of the Middleware block and the spring.xml configuration file. Thecom.samples.sales.core
package contains the Middleware classes: implementations of services, managed beans and JMX beans. -
web
– directory with the configuration files of the web application built from the Middleware block: context.xml and web.xml.

The gui module includes the source code directory, src
, with the screens.xml configuration file. The com.sample.sales.gui
package contains XML descriptors and screen controllers, and localization files for them.

The web module contains the following directories:
-
src
– source code directory with the application properties file of the Web Client block and configuration files – web-menu.xml, web-permissions.xml, web-screens.xml and web-spring.xml. Thecom.samples.sales.web
package contains the main class of the Web Client block (inheritor ofDefaultApp
) and the main localized messages pack. -
web
– directory with configuration files of the web application built from the Web Client: context.xml and web.xml.