4.2. Project File Structure

Below is the project file structure of a simple application, Sales, consisting of the Middleware and Web Client blocks.

project structure
Figure 45. Project File Structure

The project root contains build scripts: build.gradle and settings.gradle.

The modules directory includes the subdirectories of the project default modulesglobal, core, 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.

project structure global
Figure 46. The global Module Structure

The core module contains the following directories:

  • db – directory with the database migration scripts.

  • src – source code directory; its root contains the application properties file of the Middleware block and the spring.xml configuration file. The com.samples.sales.core package contains the Middleware classes: implementations of services, Spring beans and JMX beans.

  • test - middleware integration test sources root.

  • web – directory with the configuration files of the web application built from the Middleware block: context.xml and web.xml.

project structure core
Figure 47. The core Module Structure

The web module contains the following directories:

project structure web
Figure 48. The web Module Structure