This module provides common code used by more than one of the Stacks modules: Both Events
and CQRS Commands use the OperationsContext
abstract
class and StacksPersistence
provides a basic CRUD repository interface used in persistence related
modules likeStacks Cosmos. Please refer to these
modules as examples.
In the following diagram, you can see all the relevant files of this module. Be aware, pulling from the repository will have some extra files that are not relevant to the logic but required to build and deploy.
java
|_pom.xml
\_src
: \_main
: \_java
: \_com.ensono.stacks.core
: \_operations
: |_OperationContext.java
: \_repository
: |_StacksPersistence.java
Use it as a dependency.
In the dependencies
section of your application's pom.xml
add:
<dependency>
<groupId>com.ensono.stacks.modules</groupId>
<artifactId>stacks-core-commons</artifactId>
<version>2.0.0</version>
</dependency>
NOTE: You should check to see the latest version and use that.
Then you can do a ./mvnw clean compile
to fetch it; after that, you can use it like any other dependency.
./mvnw clean compile
Use it as you'd use any dependency in your build tool.
To build the module locally:
- Clone this repo
- Navigate to the
java
folder - run
./mvnw clean install
to install the module locally. - Add it as any other dependency