Newer
Older
## Overview
The Service Specification Uploader is a Java-based application designed to upload service and resource specifications to a specified server. It supports both physical and logical resource specifications and handles various relationships and attachments.
## Prerequisites
- Java 17
- Maven
- Docker (optional, for containerized deployment)
### Clone the Repository
```sh
git clone https://github.com/your-repo/service-specification-uploader.git
cd service-specification-uploader
### Build the Project
```sh
mvn clean install
```
### Configuration
Ensure you have a `config.properties` file in the root directory with the necessary configurations.
### Running the Application
```sh
java -jar target/servicespecificationuploader.jar --configfile config.properties --servicespecfolderpath /path/to/your/data-folder
```
### Build Docker Image
```sh
docker build -t service-specification-uploader .
```
### Run Docker Container
```sh
docker run -v /local/path/to/config.properties:/app/config.properties -v /local/path/to/your-data-folder:/app/data-folder service-specification-uploader /app/data-folder additional-value
docker run -v C:\openslice\servicespecificationuploader\src\main\resources\config.properties:/app/config.properties -v C:\openslice\servicespecificationuploader:/app/data-folder servicespecificationuploader "c:\openslice\servicespecificationfetcher\f51cb185-6663-49e8-b195-83deeae32eed
```
## Logging
The application uses SLF4J with Logback for logging. Logs are written to both the console and a file named `app.log`.
### Logback Configuration
The `logback.xml` file is located in `src/main/resources` and can be customized as needed.
### `postPhysicalResourceSpec`
Uploads a physical resource specification.
### `postLogicalResourceSpec`
Uploads a logical resource specification.
### `replaceStrings`
Replaces strings in a JSON node based on a provided mapping.
1. Fork the repository.
2. Create a new branch (`git checkout -b feature-branch`).
3. Commit your changes (`git commit -am 'Add new feature'`).
4. Push to the branch (`git push origin feature-branch`).
5. Create a new Pull Request.
This project is licensed under the Apache Version 2.0 License.
```