You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-119Lines changed: 9 additions & 119 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
3
3
## Module Overview
4
4
5
-
This module provides common code used by more than one of the Stacks modules: Both [Events](https://github.com/amido/stacks-java-core-messaging/)
6
-
and [CQRS Commands](https://github.com/amido/stacks-java-core-cqrs/) use the `OperationsContext` abstract
5
+
This module provides common code used by more than one of the Stacks modules: Both [Events](https://github.com/Ensono/stacks-java-core-messaging/)
6
+
and [CQRS Commands](https://github.com/Ensono/stacks-java-core-cqrs/) use the `OperationsContext` abstract
7
7
class and `StacksPersistence` provides a basic CRUD repository interface used in persistence related
8
-
modules like[Stacks Cosmos](https://github.com/amido/stacks-java-cosmos). Please refer to these
8
+
modules like[Stacks Cosmos](https://github.com/Ensono/stacks-java-cosmos). Please refer to these
9
9
modules as examples.
10
10
11
11
## Module Structure
@@ -17,27 +17,19 @@ deploy.
17
17
### Project structure
18
18
19
19
java
20
-
\_.mvn
21
-
: |_settings.xml
22
-
|_archetype.properties
23
20
|_pom.xml
24
21
\_src
25
22
: \_main
26
23
: \_java
27
-
: \_com.amido.stacks.core
24
+
: \_com.ensono.stacks.core
28
25
: \_operations
29
26
: |_OperationContext.java
30
27
: \_repository
31
28
: |_StacksPersistence.java
32
29
33
30
## How to use
34
31
35
-
There are four ways to integrate this module into your project:
36
-
37
-
- Use it as a [dependency](#use-it-as-a-dependency)
38
-
- Create a localized solution using [Maven Archetypes artifacts](#localized-solution-using-maven-archetypes) available in our Artifactory repo
39
-
- Clone this repo, [locally build](#building-the-module-locally-from-this-repository) and use it as a Maven dependency
40
-
- Clone this repo, create a [custom archetype](#creating-an-archetype-from-this-repository) and then use it as a Maven dependency
32
+
Use it as a dependency.
41
33
42
34
### Use it as a dependency
43
35
@@ -47,12 +39,14 @@ In the `dependencies` section of your application's `pom.xml` add:
47
39
48
40
```xml
49
41
<dependency>
50
-
<groupId>com.amido.stacks.modules</groupId>
42
+
<groupId>com.ensono.stacks.modules</groupId>
51
43
<artifactId>stacks-core-commons</artifactId>
52
-
<version>1.0.0</version>
44
+
<version>2.0.0</version>
53
45
</dependency>
54
46
```
55
47
48
+
NOTE: You should check to see the latest version and use that.
49
+
56
50
Then you can do a `./mvnw clean compile` to fetch it; after that, you can use it like any other dependency.
57
51
58
52
```bash
@@ -63,48 +57,6 @@ Then you can do a `./mvnw clean compile` to fetch it; after that, you can use it
63
57
64
58
Use it as you'd use any dependency in your build tool.
65
59
66
-
### Localized solution using Maven Archetypes
67
-
68
-
If you wish to customise the module and use your organisation's namespaces instead of Amido's. You can create a
69
-
[Maven archetype](https://maven.apache.org/archetype/index.html). Archetype is Maven's tool for
70
-
scaffolding and offers lots of extra functionality. We suggest spending some time looking into them. We use Archetype to create a template and enable you to adopt this module under your organisation's namespace.
- `<your-group-id>` is a placeholder for your group ID
88
-
- `<your-artifact-id>` is a placeholder for your artefact ID
89
-
- `<your-version>` is a placeholder for your version
90
-
- `<package-name>` is a placeholder for the root package name and structure. It should start with your `groupdId` and continue with the name of the root package.
91
-
92
-
> For example, using `-DgroupId=com.test` and `-Dpackage=com.test.stacks` will instruct Maven to place the code in`src/main/java/com/test/stacks` and update all the relevant references accordingly (i.e. `imports`)
93
-
94
-
3. Go to the `pom.xml` file of the project you'll be using this module in and add it as a [dependency](#use-it-as-a-dependency)
95
-
96
-
**Example**: Using `-DgroupId=com.test` and `-Dpackage=com.test.stacks` will instruct Maven to place the code in `src/main/java/com/test/stacks` and update all the relevant references accordingly (i.e. `imports`)
97
-
98
-
> **If you previously had used this module under different namespace (i.e. the default `com.amido.stacks.core-commons`):**
99
-
>
100
-
> Maven ONLY updates the imports for the module you generated. Any references in other projects will remain to the previous namespace.
101
-
>
102
-
> You will need to
103
-
>
104
-
>- Update them manually
105
-
>- Re-create the relevant `import` statements to use the new-made module instead
106
-
>- If you plan to use this with Amido Stacks, include your namespace in the `@ComponentScan` annotation of the `Application` class.
107
-
108
60
### Building the module locally from this repository
109
61
110
62
To build the module locally:
@@ -113,65 +65,3 @@ To build the module locally:
113
65
2. Navigate to the `java` folder
114
66
3. run `./mvnw clean install` to install the module locally.
115
67
4. Add it as any other [dependency](#use-it-as-a-dependency)
116
-
117
-
### Creating an Archetype from this repository
118
-
119
-
If you wish to customise the module and use your organisation's namespaces instead of Amido's. You can create a
120
-
[Maven archetype](https://maven.apache.org/archetype/index.html). Archetype is Maven's tool for
121
-
scaffolding and offers lots of extra functionality. We suggest spending some time looking into them. We use Archetype to create a template and enable you to adopt this module under your organisation's namespace.
122
-
To use the deployed archetypes:
123
-
To build, install and use the archetype follow these steps:
124
-
125
-
1. Clone this repo
126
-
2. Navigate to the `<directory you cloned the project into>/java` in the terminal
127
-
3. Then issue the following Maven commands, using the included wrapper:
1. `<your-group-id>` is a placeholder for your group ID
161
-
2. `<your-artifact-id>` is a placeholder for your artefact ID
162
-
3. `<your-version>` is a placeholder for your version
163
-
4. `<package-name>` is a placeholder for the root package name and structure. It should start with your `groupdId` and continue with the name of the root package.
164
-
> For example, using `-DgroupId=com.test` and `-Dpackage=com.test.stacks` will instruct Maven to place the code in `src/main/java/com/test/stacks` and update all the relevant references accordingly (i.e. `imports`)
165
-
6. Go to the `pom.xml` file of the project you'll be using this module in and add it as a [dependency](#use-it-as-a-dependency)
166
-
167
-
**Example**: Using `-DgroupId=com.test` and `-Dpackage=com.test.stacks` will instruct Maven to place the code in`src/main/java/com/test/stacks` and update all the relevant references accordingly (i.e. `imports`)
168
-
169
-
>**If you previously had used this module under different namespace (i.e. the default `com.amido.stacks.core-commons`):**
170
-
>
171
-
> Maven ONLY updates the imports forthe module you generated. Any referencesin other projects will remain to the previous namespace.
172
-
>
173
-
> You will need to
174
-
>
175
-
>- Update them manually
176
-
>- Re-create the relevant `import` statements to use the new-made module instead
177
-
>- If you plan to use this with Amido Stacks, include your namespace in the `@ComponentScan` annotation of the `Application` class.
0 commit comments