Skip to content

PR for v1.1.2 #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 156 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
ed3b903
Merge branch 'main' into development
ThomasJejkal Jan 20, 2025
37da7f7
Merge branch 'development' of https://github.com/kit-data-manager/map…
ThomasJejkal Jan 20, 2025
e1044c6
Update plugin com.gradle.enterprise to v3.19.1
renovate[bot] Jan 23, 2025
ada458e
Update plugin org.springframework.boot to v3.4.2
renovate[bot] Jan 23, 2025
4e51b3a
Update plugin io.freefair.lombok to v8.12
renovate[bot] Jan 24, 2025
0d5d600
Update plugin io.freefair.maven-publish-java to v8.12
renovate[bot] Jan 24, 2025
f843b62
Update dependency gradle to v8.12.1
renovate[bot] Jan 24, 2025
1defea2
Update springDocVersion to v2.8.4
renovate[bot] Jan 26, 2025
e5d98e0
Merge pull request #162 from kit-data-manager/renovate/springdocversion
ThomasJejkal Jan 27, 2025
701af9e
Merge pull request #161 from kit-data-manager/renovate/gradle-8.x
ThomasJejkal Jan 27, 2025
d9528a9
Merge pull request #160 from kit-data-manager/renovate/io.freefair.ma…
ThomasJejkal Jan 27, 2025
29769d6
Merge pull request #159 from kit-data-manager/renovate/io.freefair.lo…
ThomasJejkal Jan 27, 2025
9bc52f6
Merge pull request #158 from kit-data-manager/renovate/org.springfram…
ThomasJejkal Jan 27, 2025
af937c2
Merge pull request #157 from kit-data-manager/renovate/com.gradle.ent…
ThomasJejkal Jan 27, 2025
b82eea6
Update plugin io.freefair.lombok to v8.12.1
renovate[bot] Feb 3, 2025
39c2e29
Update plugin io.freefair.maven-publish-java to v8.12.1
renovate[bot] Feb 3, 2025
9c6209f
Update dependency org.apache.tika:tika-core to v2.9.3
renovate[bot] Feb 7, 2025
5456141
Update dependency net.bytebuddy:byte-buddy to v1.17.1
renovate[bot] Feb 14, 2025
01e3d8f
Update dependency org.javers:javers-spring-boot-starter-sql to v7.8.0
renovate[bot] Feb 16, 2025
1b06abb
Update plugin com.gradle.enterprise to v3.19.2
renovate[bot] Feb 18, 2025
97aea08
Merge pull request #176 from kit-data-manager/renovate/com.gradle.ent…
ThomasJejkal Feb 18, 2025
7daa4e7
Merge pull request #175 from kit-data-manager/renovate/javersversion
ThomasJejkal Feb 18, 2025
77b15f1
Update springDocVersion to v2.8.5
renovate[bot] Feb 18, 2025
4290a5b
Merge pull request #168 from kit-data-manager/renovate/io.freefair.ma…
ThomasJejkal Feb 18, 2025
dd61795
Merge pull request #167 from kit-data-manager/renovate/io.freefair.lo…
ThomasJejkal Feb 18, 2025
ba16108
Update plugin org.owasp.dependencycheck to v12.1.0
renovate[bot] Feb 18, 2025
71d53a7
Merge pull request #164 from kit-data-manager/renovate/net.bytebuddy-…
ThomasJejkal Feb 18, 2025
6ad9722
Merge pull request #165 from kit-data-manager/renovate/org.owasp.depe…
ThomasJejkal Feb 18, 2025
1b0e49d
Merge pull request #173 from kit-data-manager/renovate/org.apache.tik…
ThomasJejkal Feb 18, 2025
6de6e80
Merge pull request #174 from kit-data-manager/renovate/springdocversion
ThomasJejkal Feb 18, 2025
5f99a14
Update plugin org.springframework.boot to v3.4.3
renovate[bot] Feb 20, 2025
83d2fe9
Merge branch 'development' of https://github.com/kit-data-manager/map…
ThomasJejkal Feb 25, 2025
c79a719
Leaving plugins out of boot jar, removed duplicated gradle task, remo…
ThomasJejkal Feb 25, 2025
18036d5
Update dependency gradle to v8.13
renovate[bot] Feb 25, 2025
44bf16c
Merge branch 'main' into development
ThomasJejkal Feb 25, 2025
24d761e
Started reorganization of status propagation
ThomasJejkal Feb 27, 2025
0f838a4
Continued with rework, implemented loading plugins from classpath
ThomasJejkal Feb 28, 2025
0bfe188
Updated .gitignore to remove custom folder
ThomasJejkal Feb 28, 2025
4dc6e2f
Update dependency net.bytebuddy:byte-buddy to v1.17.2
renovate[bot] Mar 3, 2025
11435c1
Update dependency org.mockito:mockito-core to v5.16.0
renovate[bot] Mar 3, 2025
82ba476
Update plugin io.freefair.maven-publish-java to v8.12.2.1
renovate[bot] Mar 3, 2025
8467bcb
Fixed tests, fixed several issues with Git adapter, improved error ha…
ThomasJejkal Mar 3, 2025
492082f
Commit test
Mar 4, 2025
044f5af
First working version allowing to load plugin in code base, further t…
ThomasJejkal Mar 5, 2025
074e8f8
Merge branch 'development' of https://github.com/kit-data-manager/map…
ThomasJejkal Mar 5, 2025
9abba2a
Working on making python dependency optional
ThomasJejkal Mar 5, 2025
382c1da
Fixed runner configuration issues, integrated keycloak support and au…
ThomasJejkal Mar 6, 2025
27e518e
Update plugin com.gorylenko.gradle-git-properties to v2.5.0
renovate[bot] Mar 7, 2025
8578964
Merge pull request #183 from kit-data-manager/renovate/com.gorylenko.…
ThomasJejkal Mar 10, 2025
abe72b8
Merge pull request #182 from kit-data-manager/renovate/org.mockito-mo…
ThomasJejkal Mar 10, 2025
ef4e311
Merge pull request #180 from kit-data-manager/renovate/gradle-8.x
ThomasJejkal Mar 10, 2025
c99d059
Merge pull request #181 from kit-data-manager/renovate/net.bytebuddy-…
ThomasJejkal Mar 10, 2025
7129cfa
Merge pull request #179 from kit-data-manager/renovate/io.freefair.ma…
ThomasJejkal Mar 10, 2025
6d4292b
Update plugin io.freefair.lombok to v8.12.2.1
renovate[bot] Mar 10, 2025
4939dbf
Merge pull request #177 from kit-data-manager/renovate/org.springfram…
ThomasJejkal Mar 10, 2025
b5d25f7
Merge pull request #178 from kit-data-manager/renovate/io.freefair.lo…
ThomasJejkal Mar 10, 2025
4af15f6
Added sample test script, started adding support for optional Python …
ThomasJejkal Mar 10, 2025
d6362a1
Merge branch 'development' of github.com:kit-data-manager/mapping-ser…
ThomasJejkal Mar 10, 2025
b7febcd
Update dependency python to 3.13
renovate[bot] Mar 11, 2025
8fac387
Finished making Python requirement optional, updated README
ThomasJejkal Mar 11, 2025
915eadf
Add monitoring with prometheus
craquet Mar 17, 2025
e1b985e
Add some more metrics
craquet Mar 17, 2025
6210f12
Monitor specific plugin and mapping usage
craquet Mar 17, 2025
62b296b
Try to fix test issues
craquet Mar 18, 2025
f01b57a
Consistent naming for all metrics
craquet Mar 18, 2025
314cd7b
Consistent naming for all metrics (2)
craquet Mar 18, 2025
c2bd23b
Merge pull request #188 from craquet/monitoring
ThomasJejkal Mar 20, 2025
f7817a4
Update dependency org.eclipse.jgit:org.eclipse.jgit to v7.2.0.2025030…
renovate[bot] Mar 20, 2025
b673d49
Update WebSecurityConfig.java
ThomasJejkal Mar 20, 2025
d294ecc
Update application-default.properties
ThomasJejkal Mar 20, 2025
42ce309
Update WebSecurityConfig.java
ThomasJejkal Mar 20, 2025
738fb17
Update plugin org.springframework.boot to v3.4.4
renovate[bot] Mar 21, 2025
f6d551b
Update springDocVersion to v2.8.6
renovate[bot] Mar 23, 2025
4c417ab
Try to parse X-Forwarded-For header for client ip
craquet Mar 24, 2025
a1e14ba
Merge pull request #195 from craquet/monitoring
ThomasJejkal Mar 24, 2025
bea7019
Update plugin io.freefair.lombok to v8.13.1
renovate[bot] Mar 25, 2025
b7e2702
Update plugin io.freefair.maven-publish-java to v8.13.1
renovate[bot] Mar 25, 2025
3a17e01
Update dependency net.bytebuddy:byte-buddy to v1.17.5
renovate[bot] Mar 31, 2025
7111d3d
Update dependency org.mockito:mockito-core to v5.17.0
renovate[bot] Apr 4, 2025
150dd5b
Update dependency com.google.guava:guava to v33.4.8-jre
renovate[bot] Apr 14, 2025
e79bdfa
Update CI.yml
ThomasJejkal Apr 15, 2025
56c1a8e
Merge branch 'development' into renovate/net.bytebuddy-byte-buddy-1.x
ThomasJejkal Apr 15, 2025
4b90524
Merge branch 'development' into renovate/springdocversion
ThomasJejkal Apr 15, 2025
6e38a5e
Merge branch 'development' into renovate/org.eclipse.jgit-org.eclipse…
ThomasJejkal Apr 15, 2025
d665504
Merge branch 'development' into renovate/com.google.guava-guava-33.x
ThomasJejkal Apr 15, 2025
59daf6d
Merge branch 'development' into renovate/org.springframework.boot-3.x
ThomasJejkal Apr 15, 2025
1c83cb9
Merge branch 'development' into renovate/org.mockito-mockito-core-5.x
ThomasJejkal Apr 15, 2025
c5ca853
Merge branch 'development' into renovate/io.freefair.maven-publish-ja…
ThomasJejkal Apr 15, 2025
59875b2
Merge branch 'development' into renovate/io.freefair.lombok-8.x
ThomasJejkal Apr 15, 2025
dbc2fff
Merge branch 'development' into renovate/python-3.x
ThomasJejkal Apr 15, 2025
ca24500
Merge pull request #194 from kit-data-manager/renovate/springdocversion
ThomasJejkal Apr 15, 2025
514f699
Merge pull request #193 from kit-data-manager/renovate/net.bytebuddy-…
ThomasJejkal Apr 15, 2025
bd0fc81
Merge pull request #192 from kit-data-manager/renovate/org.springfram…
ThomasJejkal Apr 15, 2025
83416f8
Update dependency jacoco to v0.8.13
renovate[bot] Apr 15, 2025
4700168
Update plugin org.owasp.dependencycheck to v12.1.1
renovate[bot] Apr 15, 2025
55fa90c
Merge pull request #191 from kit-data-manager/renovate/org.eclipse.jg…
ThomasJejkal Apr 15, 2025
69c2a75
Merge pull request #197 from kit-data-manager/renovate/org.owasp.depe…
ThomasJejkal Apr 15, 2025
365fa19
Merge pull request #189 from kit-data-manager/renovate/com.google.gua…
ThomasJejkal Apr 15, 2025
949fce0
Merge pull request #187 from kit-data-manager/renovate/org.mockito-mo…
ThomasJejkal Apr 15, 2025
01fc9e7
Merge pull request #185 from kit-data-manager/renovate/io.freefair.lo…
ThomasJejkal Apr 15, 2025
14607c1
Merge branch 'development' into renovate/io.freefair.maven-publish-ja…
ThomasJejkal Apr 15, 2025
4012645
Merge pull request #186 from kit-data-manager/renovate/io.freefair.ma…
ThomasJejkal Apr 15, 2025
a1085d3
Merge pull request #184 from kit-data-manager/renovate/python-3.x
ThomasJejkal Apr 15, 2025
af13b48
Merge branch 'development' into prometheus_monitoring
ThomasJejkal Apr 15, 2025
51f9ccb
Merge pull request #196 from kit-data-manager/renovate/jacoco-0.x
ThomasJejkal Apr 15, 2025
c2aa345
Fixed failed tests
ThomasJejkal Apr 15, 2025
83e851c
Update dependency commons-io:commons-io to v2.19.0
renovate[bot] Apr 15, 2025
d501c89
Update eclipse-temurin Docker tag to v24
renovate[bot] Apr 15, 2025
c3af072
Added check for mappingId and mappingType during mapping creation, te…
ThomasJejkal Apr 15, 2025
0e07de5
Fixed tests to work with new plugin availability check
ThomasJejkal Apr 16, 2025
7ae7ca4
Merge pull request #199 from kit-data-manager/renovate/eclipse-temuri…
ThomasJejkal Apr 17, 2025
742e96b
Merge pull request #198 from kit-data-manager/renovate/commons-io-com…
ThomasJejkal Apr 17, 2025
18cf797
Merge branch 'development' into prometheus_monitoring
ThomasJejkal Apr 17, 2025
45617b8
Update plugin org.springframework.boot to v3.4.5
renovate[bot] Apr 24, 2025
fac2302
Update dependency gradle to v8.14
renovate[bot] Apr 25, 2025
778b062
Started integrating possibility for Python version check
ThomasJejkal Apr 28, 2025
89d9d24
Update dependency org.apache.commons:commons-collections4 to v4.5.0
renovate[bot] Apr 28, 2025
b08b339
Update dependency org.apache.maven:maven-artifact to v3.9.9
renovate[bot] Apr 28, 2025
f2e3db2
Started new base plugin for Python-based mappers
ThomasJejkal May 4, 2025
5462193
Merge branch 'development' of https://github.com/kit-data-manager/map…
ThomasJejkal May 4, 2025
8b572dd
Update springDocVersion to v2.8.8
renovate[bot] May 4, 2025
63351d8
Continued with AbstractPythonMappingPlugin, integrated Python version…
ThomasJejkal May 6, 2025
b86d2de
Fixed autowire of applicationProperties in AbstractPythongMappingPlug…
ThomasJejkal May 7, 2025
778c109
Update dependency edu.kit.datamanager:service-base to v1.3.4
renovate[bot] May 7, 2025
6d16d7b
Fixed tests, made requirements.dist.txt optional, fixed providing cod…
ThomasJejkal May 8, 2025
3ff0eaa
Reworked closing Git repo after failed checkout
ThomasJejkal May 8, 2025
45d9a40
Updated tika-core to 3.1.0
ThomasJejkal May 8, 2025
d8c9be7
Merge branch 'development' into renovate/edu.kit.datamanager-service-…
ThomasJejkal May 9, 2025
cf893ba
Merge branch 'development' into renovate/org.apache.maven-maven-artif…
ThomasJejkal May 9, 2025
a55f03b
Merge branch 'development' into renovate/springdocversion
ThomasJejkal May 9, 2025
832c8b7
Merge branch 'development' into renovate/gradle-8.x
ThomasJejkal May 9, 2025
b74097b
Merge branch 'development' into renovate/org.springframework.boot-3.x
ThomasJejkal May 9, 2025
b5bc828
Merge branch 'development' into renovate/org.apache.commons-commons-c…
ThomasJejkal May 9, 2025
ff9879e
Merge branch 'development' into prometheus_monitoring
ThomasJejkal May 9, 2025
b29ca2e
Merge pull request #205 from kit-data-manager/renovate/springdocversion
ThomasJejkal May 9, 2025
ecf6895
Merge pull request #204 from kit-data-manager/renovate/edu.kit.datama…
ThomasJejkal May 9, 2025
7cf8578
Merge pull request #203 from kit-data-manager/renovate/org.apache.mav…
ThomasJejkal May 9, 2025
05745c1
Merge pull request #202 from kit-data-manager/renovate/gradle-8.x
ThomasJejkal May 9, 2025
18ea2a1
Merge branch 'development' into renovate/org.apache.commons-commons-c…
ThomasJejkal May 9, 2025
a6ed1cd
Merge branch 'development' into renovate/org.springframework.boot-3.x
ThomasJejkal May 9, 2025
71252da
Merge branch 'development' into prometheus_monitoring
ThomasJejkal May 9, 2025
401dd70
Merge pull request #201 from kit-data-manager/renovate/org.springfram…
ThomasJejkal May 9, 2025
c0372df
Merge pull request #200 from kit-data-manager/renovate/org.apache.com…
ThomasJejkal May 9, 2025
18dd7c0
Merge branch 'development' into prometheus_monitoring
ThomasJejkal May 9, 2025
6a8e839
Update dependency org.eclipse.jgit:org.eclipse.jgit to v7.2.1.2025051…
renovate[bot] May 15, 2025
cef69c2
Merge pull request #207 from kit-data-manager/renovate/org.eclipse.jg…
ThomasJejkal May 15, 2025
acaafc2
Merge branch 'development' into prometheus_monitoring
ThomasJejkal May 15, 2025
140d0f2
Merge pull request #190 from kit-data-manager/prometheus_monitoring
ThomasJejkal May 15, 2025
2c3f7d8
Started working on separate release of plugin-core jar
ThomasJejkal May 15, 2025
8987d92
Update dependency org.json:json to v20250517
renovate[bot] May 17, 2025
a864642
Creating only mapping-plugin-core if release is called, testing of si…
ThomasJejkal May 19, 2025
cdda2e2
Update dependency io.micronaut.micrometer:micronaut-micrometer-regist…
renovate[bot] May 19, 2025
5b44256
Merge branch 'development' into renovate/org.json-json-20250517.x
ThomasJejkal May 20, 2025
d8f5ba0
Merge pull request #210 from kit-data-manager/renovate/org.json-json-…
ThomasJejkal May 20, 2025
2925a4a
Merge branch 'development' into renovate/io.micronaut.micrometer-micr…
ThomasJejkal May 20, 2025
7d74829
Merge pull request #208 from kit-data-manager/renovate/io.micronaut.m…
ThomasJejkal May 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.13'
- name: Get Python location
run: python -c "import os, sys; print(sys.executable)"
- name: Update pip
run: python3 -m pip install --upgrade pip
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Prepare
run: mkdir -p /tmp/mapping-service/{schemas,plugins}
- name: Copy Plugins
run: cp plugins/* /tmp/mapping-service/plugins
- name: List Plugins
run: ls -la /tmp/mapping-service/plugins
run: mkdir -p /tmp/mapping-service/{schemas}
- name: Clean
run: ./gradlew clean
# - if: matrix.os == 'windows-latest'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Set up Python3
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.13'
- name: Set up OpenJDK
uses: actions/setup-java@v4
with:
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Set up Python3
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.13'

- name: Set up OpenJDK
uses: actions/setup-java@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,4 @@ gradle-app.setting
lib/gemma
!/plugins/gemma-plugin-0.1.0-SNAPSHOT-plain.jar
!/plugins/empty-plugin-0.0.0-SNAPSHOT-plain.jar
custom
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG SERVICE_ROOT_DIRECTORY_DEFAULT=/spring/
####################################################
# Building environment (java & git)
####################################################
FROM eclipse-temurin:23 AS build-env-java
FROM eclipse-temurin:24 AS build-env-java
LABEL maintainer=webmaster@datamanager.kit.edu
LABEL stage=build-env

Expand Down Expand Up @@ -48,7 +48,7 @@ RUN bash ./build.sh $SERVICE_DIRECTORY
####################################################
# Runtime environment 4 metastore2
####################################################
FROM eclipse-temurin:23 AS run-service-mapping-service
FROM eclipse-temurin:24 AS run-service-mapping-service
LABEL maintainer=webmaster@datamanager.kit.edu
LABEL stage=run

Expand Down
5 changes: 0 additions & 5 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Read Me First
The following was discovered as part of building this project:

* The original package name 'edu.kit.datamanager.mapping-service' is invalid and this project uses 'edu.kit.datamanager.mappingservice' instead.

# Getting Started

### Reference Documentation
Expand Down
68 changes: 27 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,72 +17,58 @@ The REST-API is documented at the following link: [http://\<IP or hostname>:8095
Dependencies that are needed to build and are not being downloaded via gradle:

- OpenJDK 17
- Python 3
- pip (runtime only)
- (Optional) Python 3
- (Optional) pip (runtime only)

`./gradlew build`

### Python Location

Currently, mapping-service requires Python to be installed in order to build and to run. At runtime, the Python executable is configured in
`application.properties`(see below). For building the mapping-service Python executable is set to `/usr/bin/python3` by default. In case you want to build
the mapping-service on a machine on which the Python installation is located elsewhere, e.g., under Windows, you can provide the Python location
used at compile time externally, i.e.:
The mapping-service supports plugins running Python code. To provide basic testing for this feature, some tests require configured Python in order to be executed.
While at runtime, the Python executable is configured in application.properties, at build time the Python location may differ depending on the build environment.
By default, '/usr/bin/python' is assumed as Python location. If you are using a different Python installation, e.g., under Windows or MacOS, you may either modify
'build.gradle' (look out for pythonExecutable) or you provide the Python executable as command line argument, e.g.,

```
.\gradlew "-DpythonExecutable=file:///C:/Python310/python.exe" build
```

## How to start

Before you can start the mapping-service, you first have to create an `application.properties` file in the source folder. As an example you may use `config/application.default.properties`
Before you can start the mapping-service, you first have to create an `application.properties` file in the source folder. As an example you may use `settings/application.default.properties`
and modify it according to your needs. Espacially the following properties (at the end of the file) are important:
- `spring.datasource.url=jdbc:h2:file:/tmp/mapping-service/database`
The path points to the location of the database in which your configured mappings are stored.
- `mapping-service.pythonExecutable=${pythonExecutable:'file:///usr/bin/python3'}` \
If no pythonExecutable is provided externally (see above) the default `/usr/bin/python3` is used.
- `mapping-service.pluginLocation=file:///tmp/mapping-service/plugins` \
The local folder where available plugins are located.
- `mapping-service.mappingsLocation:file:///tmp/mapping-service/` \
Enter the location where you want to store your mappings. This folder will be created if it does not exist yet.

In order to provide the mapping-service with mapping functionality, there are already some pre-compiled plugins available under in the `plugins` folder of this repository.
Copy them to your configured `mapping-service.pluginLocation` to make them available to the mapping-service.
The source code of the gemma-plugin can be found [here](https://github.com/maximilianiKIT/gemma-plugin). The plugin shows how to integrate Python mappings easily.
| Property | Description | Default |
|----------|-------------|---------|
| spring.datasource.url | The path points to the location of the database in which your configured mappings are stored. For production use it is not recommended to use the pre-configured H2 database! | jdbc:h2:file:/tmp/mapping-service/database |
| mapping-service.pythonExecutable | The path to your local Python executable. The default uses the pythonExecutable system property provided via -DpythonExecutable= or file:///usr/bin/python3 if no such system property is provided. | ${pythonExecutable:'file:///usr/bin/python3'} |
| mapping-service.pluginLocation | The local folder from where plugins are loaded. The folder will be created on startup if it does not exist. | None |
| mapping-service.mappingSchemasLocation | The local folder where the mapping files are stored. The folder will be created on startup if it does not exist. | None |
| mapping-service.jobOutput | The local folder where asynchronous mapping execution job outputs are stored. The folder will be created on startup if it does not exist. | None |
| mapping-service.packagesToScan | Packages scanned for mapping plugins in addition to plugins located in mapping-service.pluginLocation. Typically, this property has not the be changed. | edu.kit.datamanager.mappingservice.plugins.impl |
| mapping-service.executionTimeout | The timeout in seconds a plugin process, i.e., Python of Shell, may take before it is assumed to be stale. | 30 |

There is also the possibility to add new plugins directly at the source tree and create a pluggable Jar out of them. Therefor, check
`src/main/java/edu/kit/datamanager/mappingservice/plugins/impl`. Just add your new plugin, e.g., based on the `TestPlugin` example.
In order to make the plugin usable by the mapping service, you then have to build a plugin Jar out of it. In order to do that, just call:
## Starting the Mapping-Service

```
./gradlew buildPluginJar
```

This task creates a file `default-plugins-<VERSION>` at `build/libs` which has to be copied to `mapping-service.pluginLocation` to make it available.

After doing this, the mapping-service is ready for the first start. This can be achieved by executing:

`java -jar build/lib/mapping-service-<VERSION>.jar`
The executable jar of the mapping-service is located at 'build/libs/mapping-service-<VERSION>.jar' You should copy it to some dedicated folder,
place 'application.properties' next to it, adapt it according to your needs, and startt he mapping-service by calling:

This assumes, that the command is called from the source folder and that your `application.properties` is located in the same folder.
Otherwise, you may use:

`java -jar build/lib/mapping-service-<VERSION>.jar --spring.config.location=/tmp/application.properties`
`java -jar mapping-service-<VERSION>.jar`

Ideally, for production use, you place everything (`mapping-service-<VERSION>.jar`, `application.properties`, `mapping-service.pluginLocation`, `mapping-service.mappingsLocation`,
and `spring.datasource.url`) in a separate folder from where you then call the mapping-service via:
If your 'application.properties' is located in another folder, you may use the following call:

`java -jar mapping-service-<VERSION>.jar`
`java -jar mapping-service-<VERSION>.jar --spring.config.location=/myConfigFolder/application.properties`

## Installation
There are three ways to install metaStore2 as a microservice:
There are three ways to install the mapping-service as a system service:

- [Using](#Installation-via-GitHub-Packages) the image available via [GitHub Packages](https://github.com/orgs/kit-data-manager/packages?repo_name=mapping-service) (***recommended***)
- [Building](#Build-docker-container-locally) docker image locally
- [Building](#Build-and-run-locally) and running locally

## Installation via GitHub Packages
### Prerequisites
In order to run this microservice via docker you'll need:
In order to run the mapping-service via docker you'll need:

* [Docker](https://www.docker.com/)

Expand Down Expand Up @@ -110,7 +96,7 @@ user@localhost:/home/user/mapping-service$
```

#### Create image
Now you'll have to create an image containing the microservice. This can be done via a script.
Now you'll have to create an image containing the mapping-service. This can be done via a script.
On default the created images will be tagged as follows:

*'latest tag'-'actual date(yyyy-mm-dd)'* (e.g.: 1.1.0-2023-06-27)
Expand All @@ -128,7 +114,7 @@ user@localhost:/home/user/mapping-service$
```

#### Build docker container
After building image you have to create (and start) a container for executing microservice:
After building image you have to create (and start) a container for executing the mapping-service:
```
# If you want to use a specific image you may list all possible tags first.
user@localhost:/home/user/mapping-service$ docker images ghcr.io/kit-data-manager/mapping-service --format {{.Tag}}
Expand Down
108 changes: 65 additions & 43 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
plugins {
id 'org.springframework.boot' version '3.4.1'
id 'org.springframework.boot' version '3.4.5'
id 'io.spring.dependency-management' version '1.1.7'
id 'org.asciidoctor.jvm.convert' version '4.0.4'
id 'io.freefair.maven-publish-java' version '8.11'
id "org.owasp.dependencycheck" version "12.0.1"
id 'io.freefair.maven-publish-java' version '8.13.1'
id "org.owasp.dependencycheck" version "12.1.1"
id 'net.researchgate.release' version '3.1.0'
id "com.gorylenko.gradle-git-properties" version "2.4.2"
id 'io.freefair.lombok' version '8.11'
id "com.gorylenko.gradle-git-properties" version "2.5.0"
id 'io.freefair.lombok' version '8.13.1'
id 'java'
id 'application'
id 'jacoco'
// plugins for release and publishing to maven repo
id "signing"
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id 'maven-publish'
}

description = 'Generic mapping service supporting different mapping implementations.'
Expand Down Expand Up @@ -45,23 +50,27 @@ repositories {
ext {
set('snippetsDir', file('build/generated-snippets'))
applicationProperties = System.getProperty('applicationProperties', './src/test/resources/test-config/application-test.properties')
pythonExecutable = System.getProperty('pythonExecutable', 'file:///usr/bin/python')
pythonExecutable = System.getProperty('pythonExecutable', "file:///usr/bin/python3")
userDir = System.getProperty('user.dir')
set('springBootVersion', "3.2.1")
set('springDocVersion', "2.8.3")
set('javersVersion', "7.7.0")
set('springDocVersion', "2.8.8")
set('javersVersion', "7.8.0")
set('keycloakVersion', "19.0.0")
}

dependencies {
implementation 'org.eclipse.jgit:org.eclipse.jgit:7.1.0.202411261347-r'
implementation 'org.eclipse.jgit:org.eclipse.jgit:7.2.1.202505142326-r'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation "org.springframework.boot:spring-boot-starter-data-rest"
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'

// monitoring
implementation 'io.micronaut.micrometer:micronaut-micrometer-registry-prometheus:5.10.2'
implementation 'org.springframework.boot:spring-boot-starter-actuator:3.3.4'

// springdoc
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocVersion}"
implementation "org.springdoc:springdoc-openapi-starter-common:${springDocVersion}"
Expand All @@ -74,15 +83,20 @@ dependencies {

implementation "org.javers:javers-spring-boot-starter-sql:${javersVersion}"
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'org.apache.commons:commons-collections4:4.4'
implementation 'org.json:json:20250107'
implementation 'org.apache.commons:commons-collections4:4.5.0'
implementation 'org.apache.maven:maven-artifact:3.9.9'
implementation 'org.json:json:20250517'
implementation 'com.github.jknack:handlebars:4.4.0'
implementation 'com.google.guava:guava:33.4.0-jre'
implementation 'commons-io:commons-io:2.18.0'
implementation 'com.google.guava:guava:33.4.8-jre'
implementation 'commons-io:commons-io:2.19.0'
implementation 'javax.validation:validation-api:2.0.1.Final'
implementation 'edu.kit.datamanager:service-base:1.3.3'
implementation ('edu.kit.datamanager:service-base:1.3.4'){
//exclude dependency as spring boot includes
//org.glassfish.jaxb:jaxb-core:4.0.5 which leads to a duplication conflict
exclude group: "com.sun.xml.bind"
}
// apache
implementation "org.apache.tika:tika-core:2.9.2"
implementation "org.apache.tika:tika-core:3.1.0"

testImplementation platform('org.junit:junit-bom')
testImplementation 'org.junit.jupiter:junit-jupiter'
Expand All @@ -94,10 +108,10 @@ dependencies {
//testImplementation 'org.springframework:spring-test'

testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc:3.0.3'
testImplementation 'org.mockito:mockito-core:5.15.2'
testImplementation 'org.mockito:mockito-core:5.17.0'
testImplementation 'org.powermock:powermock-module-junit4:2.0.9'
testImplementation 'org.powermock:powermock-api-mockito2:2.0.9'
testImplementation 'net.bytebuddy:byte-buddy:1.16.1'
testImplementation 'net.bytebuddy:byte-buddy:1.17.5'

annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'

Expand Down Expand Up @@ -125,7 +139,7 @@ test {
}

jacoco {
toolVersion = "0.8.12"
toolVersion = "0.8.13"
}

jacocoTestReport{
Expand All @@ -142,27 +156,31 @@ asciidoctor {
dependsOn test
}

/*jar {
manifest {
attributes 'Main-Class': 'edu.kit.datamanager.mapping-service.MappingServiceApplication'
}
archiveBaseName = 'mapping-service'
// version is defined in file 'gradle.properties'
archiveVersion = System.getenv('version')
// disable plain jar file
enabled = false
}*/

bootJar {
println 'Create bootable jar...'
dependsOn asciidoctor
//dependsOn 'buildPluginJar'

from ("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
archiveFileName = "${archiveBaseName.get()}.${archiveExtension.get()}"
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Main-Class': 'org.springframework.boot.loader.launch.PropertiesLauncher'
}
//exclude '**/plugins/impl/**'

// from('build/libs/default-plugins-1.1.2-SNAPSHOT.jar') {
// into('BOOT-INF/lib/plugins' )
// }
launchScript()
}

if (project.hasProperty('release')) {
println 'Using \'release\' profile for building ' + project.getName()
apply from: 'gradle/profile-deploy.gradle'
}

springBoot {
buildInfo()
}
Expand All @@ -172,25 +190,29 @@ bootRun {
systemProperty "pythonLocation", pythonExecutable
}

bootJar {
dependsOn asciidoctor
from ("${asciidoctor.outputDir}/html5") {
into 'static/docs'
}
launchScript()
}

release {
tagTemplate = 'v${version}'
}

task buildPluginJar(type: Jar) {
description = 'Bundeling only plugin classes'
archiveFileName.set("default-plugins-${version}.jar")
from sourceSets.main.output
include '**/plugins/impl/*.class'
tasks.named("jar") {
enabled = false
}

//task buildPluginJar(type: Jar) {
// description = 'Bundeling plugin core classes'
// archiveFileName.set("plugin-core-${version}.jar")
// from sourceSets.main.output
// include '**/configuration/ApplicationProperties.class',
// '**/exception.BadExitCodeException.class',
// '**/plugins/AbstractPythonMappingPlugin.class',
// '**/plugins/IMappingPlugin.class',
// '**/plugins/MappingPluginException.class',
// '**/plugins/MappingPluginState.class',
// '**/util/PythonRunnerUtil.class',
// '**/util/ShellRunnerUtil.class'
// includeEmptyDirs false
//}

// task for printing project name.
// should be the last task inside file
task printProjectName {
Expand Down
7 changes: 0 additions & 7 deletions custom/map-valid-document/curl-request.adoc

This file was deleted.

Loading
Loading