Skip to content

Commit 855e006

Browse files
Merge pull request #12 from xdev-software/develop
Release v1.0.0
2 parents 4cfb4dc + 2e1943b commit 855e006

File tree

206 files changed

+14950
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

206 files changed

+14950
-72
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66

77
env:
88
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
9-
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo
109

1110
permissions:
1211
contents: write
@@ -58,17 +57,16 @@ jobs:
5857
run: |
5958
git config --global user.email "[email protected]"
6059
git config --global user.name "GitHub Actions"
61-
62-
- name: Un-SNAP root
63-
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
64-
65-
- name: Un-SNAP demo
66-
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
67-
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
6860
6961
- name: Un-SNAP
70-
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
71-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
62+
run: |
63+
modules=("") # root
64+
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
65+
for i in "${modules[@]}"
66+
do
67+
echo "Processing $i/pom.xml"
68+
(cd "$i" && mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false)
69+
done
7270
7371
- name: Get version
7472
id: version
@@ -204,17 +202,16 @@ jobs:
204202
git config --global user.email "[email protected]"
205203
git config --global user.name "GitHub Actions"
206204
git pull
207-
208-
- name: Inc Version and SNAP root
209-
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
210-
211-
- name: Inc Version and SNAP demo
212-
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
213-
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
214-
205+
215206
- name: Inc Version and SNAP
216-
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
217-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
207+
run: |
208+
modules=("") # root
209+
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
210+
for i in "${modules[@]}"
211+
do
212+
echo "Processing $i/pom.xml"
213+
(cd "$i" && mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true)
214+
done
218215
219216
- name: Git Commit and Push
220217
run: |

.github/workflows/sonar.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ jobs:
5353
restore-keys: ${{ runner.os }}-m2
5454

5555
- name: Build with Maven
56-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} -Dsonar.organization=${{ env.SONARCLOUD_ORG }} -Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
56+
run: |
57+
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
58+
-DskipTests \
59+
-Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} \
60+
-Dsonar.organization=${{ env.SONARCLOUD_ORG }} \
61+
-Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
5762
env:
5863
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
5964
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ target/
6666
.flattened-pom.xml
6767
.tern-project
6868

69+
# EclipseStore
70+
storage
71+
6972
# == IntelliJ ==
7073
*.iml
7174
*.ipr

.idea/codeStyles/Project.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.run/Run Benchmark.run.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Run Benchmark" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.benchmark.BenchmarkRunner" />
4+
<module name="spring-data-eclipse-store-benchmark" />
5+
<option name="VM_PARAMETERS" value="--add-opens java.base/java.util=ALL-UNNAMED" />
6+
<extension name="coverage">
7+
<pattern>
8+
<option name="PATTERN" value="software.xdev.spring.data.eclipse.store.benchmark.benchmarks.simple.user.*" />
9+
<option name="ENABLED" value="true" />
10+
</pattern>
11+
</extension>
12+
<method v="2">
13+
<option name="Make" enabled="true" />
14+
</method>
15+
</configuration>
16+
</component>

.run/Run Complex Demo.run.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Run Complex Demo" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.demo.complex.ComplexDemoApplication" />
4+
<module name="spring-data-eclipse-store-demo" />
5+
<option name="VM_PARAMETERS" value="--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED" />
6+
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
7+
<extension name="coverage">
8+
<pattern>
9+
<option name="PATTERN" value="software.xdev.*" />
10+
<option name="ENABLED" value="true" />
11+
</pattern>
12+
</extension>
13+
<method v="2">
14+
<option name="Make" enabled="true" />
15+
</method>
16+
</configuration>
17+
</component>

.run/Run Demo.run.xml renamed to .run/Run Simple Demo.run.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
3-
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="standard-maven-template-demo" />
2+
<configuration default="false" name="Run Simple Demo" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.demo.simple.SimpleDemoApplication" />
4+
<module name="spring-data-eclipse-store-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 1.0.0
2+
* Initial release

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ You should have the following things installed:
3333
* Ensure that the JDK/Java-Version is correct
3434

3535

36-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/standard-maven-template/release.yml?branch=master)](https://github.com/xdev-software/standard-maven-template/actions/workflows/release.yml)
36+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-data-eclipse-store/release.yml?branch=master)](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/release.yml)
3737

3838
Before releasing:
39-
* Consider doing a [test-deployment](https://github.com/xdev-software/standard-maven-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
39+
* Consider doing a [test-deployment](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4040
* Check the [changelog](CHANGELOG.md)
4141

4242
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

README.md

Lines changed: 83 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,95 @@
1-
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/standard-maven-template?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/standard-maven-template)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/standard-maven-template/checkBuild.yml?branch=develop)](https://github.com/xdev-software/standard-maven-template/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
3-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_standard-maven-template&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_standard-maven-template)
1+
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/spring-data-eclipse-store?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/spring-data-eclipse-store)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-data-eclipse-store/checkBuild.yml?branch=develop)](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
3+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_spring-data-eclipse-store&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_spring-data-eclipse-store)
44

5-
# standard-maven-template
5+
<div align="center">
6+
<img src="assets/Logo.png" height="200" alt="XDEV Spring-Data Eclipse-Store Logo">
7+
</div>
68

9+
# spring-data-eclipse-store
10+
11+
A library to simplify using [EclipseStore](https://eclipsestore.io/) in the [Spring environment](https://spring.io/projects/spring-data/).
12+
13+
What makes this library special is, that it creates a working copy of the data.
14+
This way EclipseStore behaves almost exactly like relational database from a coding perspective.
15+
16+
## Features
17+
18+
The library provides following features:
19+
20+
* Enforces the
21+
**[Spring data repository concept](https://docs.spring.io/spring-data/jpa/reference/repositories/core-concepts.html)**
22+
for EclipseStore by using [working copies](#working-copies)
23+
* **[Drop in compatible](#usage)** for your existing Spring application
24+
* Utilizes **ultra-fast EclipseStore serializing and storing**
25+
* Enables your application to **select
26+
any [EclipseStore target](https://docs.eclipsestore.io/manual/storage/storage-targets/index.html)** (e.g.
27+
[PostgreSQL](https://docs.eclipsestore.io/manual/storage/storage-targets/sql-databases/postgresql.html),
28+
[AWS S3](https://docs.eclipsestore.io/manual/storage/storage-targets/blob-stores/aws-s3.html) or
29+
[IBM COS](https://github.com/xdev-software/eclipse-store-afs-ibm-cos))
30+
* Can save up to **99%[^1] of monthly costs** in the IBM Cloud and up to 82%[^2] in the AWS Cloud
31+
32+
[^1]:If the COS Connector is used in the IBM Cloud instead of a PostgreSQL and approx. 10,000 entries with a total size
33+
of 1
34+
GB of data are stored. ([IBM Cloud Pricing](https://cloud.ibm.com/estimator/estimates), as of 08.01.2024)
35+
36+
[^2]: If the S3 connector is used instead of DynamoDB under the same conditions at
37+
AWS. ([AWS Pricing Calculator](https://calculator.aws/#/estimate?id=ab85cddf77f0d1aa0457111ed82785dfb836b1d8), as of
38+
08.01.2024)
39+
40+
### Working copies
41+
42+
If you use EclipseStore without our library, EclipseStore loads the data from the datastore directly into memory. You make your changes on these loaded Java objects and by calling ``store`` EclipseStore writes it directly from memory to the datastore.
43+
44+
![Native behavior of EclipseStore](assets/WorkingCopy_1.svg)
45+
46+
If you e.g. change the address of a person, the changed address is already in your data model, **even before storing** this person.
47+
This is very different from the behavior a Spring user expects.
48+
49+
With *Spring-Data-Eclipse-Store* every time an object is loaded from the datastore, a working copy of that object (or rather the object tree) is created and returned to the user. Therefore, the user can make the changes on the working copy without any changes to the actual data model. The changes are only persisted after calling ``save`` on a repository.
50+
51+
![Behavior of EclipseStore with Spring-Data-Eclipse-Store](assets/WorkingCopy_2.svg)
752

853
## Installation
9-
[Installation guide for the latest release](https://github.com/xdev-software/standard-maven-template/releases/latest#Installation)
54+
[Installation guide for the latest release](https://github.com/xdev-software/spring-data-eclipse-store/releases/latest#Installation)
55+
56+
### Prerequisites
57+
58+
| | Minimal Version |
59+
|--------------|-----------------|
60+
| Java | ``17`` |
61+
| Spring Data | ``3.2.2`` |
62+
| EclipseStore | ``1.1.0`` |
63+
64+
### Usage
65+
66+
After adding the library in your dependencies, using it is as easy as adding the ``@EnableEclipseStoreRepositories`` annotation to your ``@SpringBootApplication`` annotation.
67+
68+
## Demo
69+
70+
To see how easy it is to implement EclipseStore in your Spring project, take a look at the two
71+
[demos](./spring-data-eclipse-store-demo):<br/>
72+
A [simple](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple)
73+
and a
74+
more [complex demo](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex).
75+
76+
> [!NOTE]
77+
> Since the library is using reflection to copy data, the following JVM-Arguments may have to be set:
78+
> ```
79+
> --add-opens=java.base/java.util=ALL-UNNAMED
80+
> --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
81+
> --add-opens=java.base/java.lang=ALL-UNNAMED
82+
> --add-opens=java.base/java.time=ALL-UNNAMED
83+
> ```
1084
1185
1286
## Support
13-
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
87+
88+
If you need support as soon as possible, and you can't wait for any pull request, feel free to
89+
use [our support](https://xdev.software/en/services/support).
1490
1591
## Contributing
1692
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
1793
1894
## Dependencies and Licenses
19-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/standard-maven-template/dependencies/)
95+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/spring-data-eclipse-store/dependencies/)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/standard-maven-template/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/spring-data-eclipse-store/security/advisories/new).

assets/Logo.png

45.2 KB
Loading

0 commit comments

Comments
 (0)