stages: - build variables: name: "SongodaCore" path: "/builds/$CI_PROJECT_PATH" version: "2.3.9" build: stage: build image: maven:3.5.3-jdk-8 script: - sed -e "s/{REPO_USER}/$REPO_USER/g" -e "s/{REPO_PASS}/$REPO_PASS/g" $path/settings.xml > ~/.m2/settings.xml - find $path/ -type f -name "*.xml" -print0 | xargs -0 sed -i -e s/maven-version-number/$version/g - find $path/ -type f -name "*.yml" -print0 | xargs -0 sed -i -e s/maven-version-number/$version/g - find $path/ -type f -name "*SongodaCore.java" -print0 | xargs -0 sed -i -e s/maven-version-number/$version/g - mvn clean package - find $path/ -depth -path '*original*' -delete - mv $path/Core/target/*.jar $path/ artifacts: name: $name-$version paths: - "$path/*.jar"