Parent POM
The starter app parent POM is provided as a convenience to act as the <parent> for Apache Causeway applications.
It builds upon a similar POM provided by the Spring Boot framework, which ensures a consistent set of dependencies, as well as configuring various build plugins.
Usage
To use it, just add:
<parent>
<groupId>org.apache.causeway.app</groupId>
<artifactId>causeway-app-starter-parent</artifactId>
<version>3.4.0</version> (1)
</parent>
| 1 | update as required for new versions of the framework. |
You’ll see that it is used by both the HelloWorld and SimpleApp starter apps.
Relationship to other POMs
The diagram below shows how the starter POM (on the right hand side) relates to other POMs:
As the diagram shows, the parent POM inherits two Spring Boot parent POMs: directly from org.springframework.boot:spring-boot-starter-parent, and transitively inherits from org.springframework.boot:spring-boot-dependencies.
-
spring-boot-starter-parentconfigures various<build>/<plugins>and<resources>, while -
spring-boot-dependenciesthe second defines numerousxxx.versionproperties for various third party applications (validated as being compatible with each other by the Spring Boot team), and sets up corresponding<dependencyManagement>/<dependencies>.
The parent POM also import (using scope=import, type=pom) each of the "bill of material" POMs provided by Apache Causeway framework:
-
org.apache.causeway.core:causeway-The two core modules most commonly referenced by domain applications are
o.a.c.core:causeway-applibando.a.c.core:causeway-schema. -
o.a.c.testing:causeway-testingFor the
causeway-testing-xxxmodules (fixture scripts, unit test support, integ test support etc) -
o.a.c.extensions:causeway-extensions -
o.a.c.subdomains:causeway-subdomains -
o.a.c.valuetypes:causeway-valuetypes -
o.a.c.incubator:causeway-incubator -
o.a.c.legacy:causeway-legacy
These all set up <dependencyManagement>/<dependencies> entries for all of the modules, meaning that there’s only one place to update the version to Apache Causeway (the reference to the parent POM).
Surefire Configuration
The parent pom configures the Maven surefire plugin to execute multiple times, based on test class name. These must match
-
*Test*.java(unit tests)Test classes named "*Testing.java", "*IntegTest*.java" and "*Abstract*.java" are all excluded.
-
*IntegTest*.java(integration tests)Test classes named "*Abstract*.java" are excluded.
-
*Spec*.java(Cucumber BDD specs)Test classes named "*Test.java", "*Testing.java", "*IntegTest*.java" and "*Abstract*.java" are all excluded.