2024-01-06 21:03:03 +01:00
Archi-data
==========
Archi-data is a framework that simplify:
- Creating a REST server with:
- Right control
- Swagger display interface
- Normalize error generate by the server
- Access to the DB:
- introspect Object and insert in the TD (SQLITE & MY-SQL)
- Manage migration
- JPA checker for many generic request
- simplify the request of the Test-service
Develop in cmd-line:
--------------------
The first step is configuring your JAVA version (or select the JVM with the OS)
2022-11-07 00:26:59 +01:00
2024-01-06 21:03:03 +01:00
```bash
export PATH=$(ls -d --color=never /usr/lib/jvm/java-2*-openjdk)/bin:$PATH
```
2022-11-07 00:26:59 +01:00
2024-01-06 21:03:03 +01:00
Install the dependency:
2022-11-07 00:26:59 +01:00
2024-01-06 21:03:03 +01:00
```bash
2022-11-07 00:26:59 +01:00
mvn install
2024-01-06 21:03:03 +01:00
```
2022-11-07 00:26:59 +01:00
2024-01-06 21:03:03 +01:00
Run the test
```bash
mvn test
```
Install it for external use
```bash
mvn install
```
2022-11-07 00:26:59 +01:00
2024-01-06 21:03:03 +01:00
Develop With Eclipse:
--------------------
2022-11-07 00:26:59 +01:00
2024-01-06 21:03:03 +01:00
Import the project:
- Open a (new) project on eclipse
- `File` -> `Import`
- `Maven` -> `Existing Maven project`
- Select the `pom.xml` file and click on import
2022-11-07 00:26:59 +01:00
2024-01-06 21:03:03 +01:00
Run the Test:
- Open the package `test.kar.archidata`
- Click right on it
- Select `Debug As` -> `JUnit Test`
2022-11-07 00:26:59 +01:00
2024-01-06 21:03:03 +01:00
Install in the local maven repository:
- Click right on the `pom.xml` file
- Select `Run As` -> `Maven install`
2022-11-07 00:26:59 +01:00
2023-11-13 21:38:07 +01:00
Somes tools:
============
Auto-update dependency:
-----------------------
2024-01-06 21:03:03 +01:00
Auto-update to the last version dependency:
2023-01-05 00:11:07 +01:00
```bash
mvn versions:use-latest-versions
```
2023-11-13 21:38:07 +01:00
Format the code
---------------
Simply run the cmd-line:
```bash
mvn formatter:format
```
2024-01-06 21:03:03 +01:00
Reformat XML file like the pom.xml
```bash
XMLLINT_INDENT=" " xmllint --format "back/pom.xml" -o "back/pom.xml"
```
Enable the pre-commit checker
-----------------------------
```bash
./tools/configure_precommit.bash
```
> **_Note_**: You can change the code in `.git/hooks/pre-commit` by replacing `formatter:verify` with `formatter:format` to auto format the code @ every commit
2023-01-05 00:11:07 +01:00
2024-06-02 13:07:51 +02:00
Run Spot-bug:
------------
2024-01-18 23:40:33 +01:00
2024-06-02 13:07:51 +02:00
```bash
mvn spotbugs:check
```
2024-01-18 23:40:33 +01:00
2023-01-05 00:11:07 +01:00
Add Gitea in the dependency for the registry:
=============================================
2022-11-07 00:26:59 +01:00
2022-11-26 00:24:03 +01:00
Read instruction for tocken in ~/.m2/setting.xml
2023-01-05 00:11:07 +01:00
edit file: ```~/.m2/settings.xml```
```xml
< settings >
< servers >
< server >
< id > gitea< / id >
< configuration >
< httpHeaders >
< property >
< name > Authorization< / name >
< value > token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx< / value >
< / property >
< / httpHeaders >
< / configuration >
< / server >
< / servers >
< / settings >
```
2022-11-26 00:24:03 +01:00
release:
2023-01-05 00:11:07 +01:00
========
2022-11-26 00:24:03 +01:00
2024-01-06 21:03:03 +01:00
```bash
2023-11-28 23:54:42 +01:00
export PATH=$(ls -d --color=never /usr/lib/jvm/java-2*-openjdk)/bin:$PATH
2022-11-26 00:24:03 +01:00
mvn install
mvn deploy
2023-01-06 00:25:18 +01:00
```
2022-11-26 00:24:03 +01:00