Commit 256d3a97 authored by Haydar Qarawlus's avatar Haydar Qarawlus Committed by Johannes Pieperbeck
Browse files

initial commit



example project for the integration process of the IDS wrapper toolbox

Co-authored-by: Steffen Biehs's avatarSteffen Biehs <steffen.biehs@isst.fraunhofer.de>
Co-authored-by: Malte Hellmeier's avatarMalte Hellmeier <malte.hellmeier@isst.fraunhofer.de>
Co-authored-by: Johannes Pieperbeck's avatarJohannes Pieperbeck <johannes.pieperbeck@isst.fraunhofer.de>
Co-authored-by: Ronja Quensel's avatarRonja Quensel <ronja.quensel@isst.fraunhofer.de>
Co-authored-by: Florian Zimmer's avatarFlorian Zimmer <florian.zimmer@isst.fraunhofer.de>
parents
# Created by https://www.toptal.com/developers/gitignore/api/java,maven,python,angular,eclipse,intellij+all,visualstudiocode,jupyternotebooks,node,sonar,sonarqube
# Edit at https://www.toptal.com/developers/gitignore?templates=java,maven,python,angular,eclipse,intellij+all,visualstudiocode,jupyternotebooks,node,sonar,sonarqube
mvn*
.mvn
### Angular ###
## Angular ##
# compiled output
dist/
tmp/
app/**/*.js
app/**/*.js.map
# dependencies
node_modules/
bower_components/
# IDEs and editors
.idea/
# misc
.sass-cache/
connect.lock/
coverage/
libpeerconnection.log/
npm-debug.log
testem.log
typings/
# e2e
e2e/*.js
e2e/*.map
# System Files
.DS_Store/
### Eclipse ###
.metadata
bin/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
.classpath
.project
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
.apt_generated_test/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project
### Eclipse Patch ###
# Spring Boot Tooling
.sts4-cache/
### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
*.iml
modules.xml
.idea/misc.xml
*.ipr
# Sonarlint plugin
.idea/sonarlint
### Java ###
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### JupyterNotebooks ###
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/
.ipynb_checkpoints
*/.ipynb_checkpoints/*
# IPython
profile_default/
ipython_config.py
# Remove previous ipynb_checkpoints
# git rm -r .ipynb_checkpoints/
### Maven ###
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
### Node ###
# Logs
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
jspm_packages/
# TypeScript v1 declaration files
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
pytestdebug.log
# Translations
*.mo
*.pot
# Django stuff:
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
doc/_build/
# PyBuilder
# Jupyter Notebook
# IPython
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
### Sonar ###
#Sonar generated dir
/.sonar/
### SonarQube ###
# SonarQube ignore files.
#
# https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
# Sonar Scanner working directories
.sonar/
.scannerwork/
# http://www.sonarlint.org/commandline/
# SonarLint working directories, configuration files (including credentials)
.sonarlint/
### VisualStudioCode ###
.vscode/*
*.code-workspace
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
# End of https://www.toptal.com/developers/gitignore/api/java,maven,python,angular,eclipse,intellij+all,visualstudiocode,jupyternotebooks,node,sonar,sonarqube
# This file is a template, and might need editing before it works on your project.
# Build JAVA applications using Apache Maven (http://maven.apache.org)
# For docker image tags see https://hub.docker.com/_/maven/
#
# For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
# This template will build and test your projects
# * Caches downloaded dependencies and plugins between invocation.
# * Verify but don't deploy merge requests.
# * Deploy built artifacts from master branch only.
# Extend the default stages with the archive stage intended to push artifacts to the nexus
# Bear in mind that the K8s cluster may pick up docker images from the registry by itself if
# a particular imagestream is configured as such
stages:
- build
- test
- archive
- deploy
variables:
# This will suppress any download for dependencies and plugins or upload messages which would clutter the console log.
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true"
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
# when running from the command line.
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
# Use the same image that is used to build from docker
image: maven:3.6-jdk-11
# Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
cache:
paths:
- .m2/repository
# For merge requests do not `deploy` but only run `verify` and static code analysis.
# See https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
sonarqube-check:
stage: test
variables:
GIT_DEPTH: 0
before_script:
- git fetch --unshallow || true
script:
# Use the following format for projectKey and projectName:
# project-name.component-name[.sub-component-name]
- 'mvn $MAVEN_CLI_OPTS -f pom.xml verify sonar:sonar -Dsonar.projectKey=ids.toolbox-integration-example -Dsonar.projectName=ids.toolbox-integration-example -Dsonar.qualitygate.wait=true'
allow_failure: true
# Check code style based on developer guidelines with checkstyle plugin
checkstyle-check:
stage: test
script:
- 'mvn $MAVEN_CLI_OPTS -f pom.xml checkstyle:check'
allow_failure: false
# Check the license header
license-check:
stage: test
script:
- 'mvn $MAVEN_CLI_OPTS -f pom.xml com.mycila:license-maven-plugin:4.1:check'
allow_failure: false
# Just run the tests for everything else
# See https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
run-tests:
stage: test
script:
- 'mvn $MAVEN_CLI_OPTS -Dcheckstyle.skip -Dlicense.skip -f pom.xml verify'
allow_failure: false
third-party-license-check:
stage: test
variables:
REFERENCE_LICENSES_FILE: $CI_PROJECT_DIR/third-party-licenses/THIRD-PARTY.txt
GENERATED_LICENSES_FILE: $CI_PROJECT_DIR/target/generated-sources/license/THIRD-PARTY.txt
script:
- 'mvn $MAVEN_CLI_OPTS -f pom.xml org.codehaus.mojo:license-maven-plugin:2.0.0:add-third-party'
- 'cmp --silent $REFERENCE_LICENSES_FILE $GENERATED_LICENSES_FILE || export LICENSES_CHANGED=true'
- 'if [ ! -z ${LICENSES_CHANGED} ]; then
echo Some licenses used by the third-party dependencies have changed.;
echo Please refer to the README and generate/update them accordingly.;
git diff --no-index --unified=0 $REFERENCE_LICENSES_FILE $GENERATED_LICENSES_FILE;
fi'
rules:
# License check must succeed in master and MRs
- if: ($CI_COMMIT_BRANCH == "master") || $CI_MERGE_REQUEST_IID
allow_failure: false
# "Default clause" meaning: in all other cases
- when: on_success
allow_failure: true
\ No newline at end of file
FROM maven:3.6-jdk-11-slim as build
RUN mkdir /app
WORKDIR /app
COPY pom.xml .
RUN mvn -f pom.xml dependency:go-offline
COPY src/ /app/src/
RUN mvn clean package -DskipTests
FROM openjdk:11-jdk-slim
RUN mkdir /app && chmod ugo+rwx /app
COPY --from=build /app/target/toolboxexample-*.jar /app/toolboxexample.jar
EXPOSE 8080
WORKDIR /app
ENTRYPOINT ["java", "-jar", "/app/toolboxexample.jar"]
\ No newline at end of file
Open Logistics License
Version 1.0, March 2022
https://www.openlogisticsfoundation.org/licenses/
TERMS AND CONDITIONS FOR THE USE, REPRODUCTION AND DISTRIBUTION
§1 Definitions
(1) "Subject Matter of the License" means the copyrighted works of the software
components in source code or object code as well as the other components
protected under copyright, design and/or patent law which are made available
under this license in accordance with a copyright notice inserted into or
attached to the work as well as the application and user documentation.
(2) "License" means the terms and conditions for the use, reproduction and
distribution of the Subject Matter of the License in accordance with the
provisions of this document.
(3) "Licensor(s)" means the copyright holder(s) or the entity authorised by law
or contract by the copyright holder(s) to grant the license.
(4) "You" (or "Your") means a natural or legal person exercising the
permissions granted by this License.
(5) "Source Code" means the version of the code of the software components of
the Subject Matter of the License in the programming language.
(6) "Object Code" means the interim product after compilation or interpretation
of the Source Code.
(7) "Derivative Works" shall mean any work, whether in Source or Object Code or
any other form, that is based on (or derived from) the Subject Matter of the
License and for which the editorial revisions, annotations, elaborations, or
other modifications represent, as a whole, an original work of authorship. For
the purposes of this License, Derivative Works shall not include works that
remain separable from, or merely link (or bind by name) to the interfaces of,
the Subject Matter of the License and Derivative Works thereof.
(8) "Contribution" means any proprietary work, including the original version
of the Subject Matter of the License and any changes or additions to such work,
or Derivative Works of such work, that the copyright holder, or a natural or