, ben, Maven yerel depo yolunu değiştirip ./.m2/repository/
dizine koydu başardı biz olacak olan maven yerel depo yolu sadece her kaçak ayarlanabilir this StackOverflow answer göre, maalesef
cache:
paths:
- ./.m2/repository
# keep cache across branch
key: "$CI_BUILD_REF_NAME"
: o zaman CI config bu küresel blok ekleyerek koşular arasında devam -Dmaven.repo.local
veyadüzenleyerek, bir gitlab-ci yapılandırma komut dosyasında yapmak için can sıkıcı bir görevdir. Bir seçenek varsayılan Maven seçenekleri ile bir değişken ayarlamak ve her koşuya geçmek olabilir. Ayrıca, Yerel Maven deposunun mevcut dizinin bir çocuğu olması da çok önemlidir. Bazı nedenlerden dolayı, GitLab’ın birisinin iddia etmesine rağmen, /cache
veya /builds
’a koyma benim için çalışmadı. Maven + Java için bir çalışma gitlab-ci.yml
yapılandırma dosyasının
Örnek:
image: maven:3-jdk-8
variables:
MAVEN_OPTS: "-Djava.awt.headless=true -Dmaven.repo.local=./.m2/repository"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
cache:
paths:
- ./.m2/repository
# keep cache across branch
key: "$CI_BUILD_REF_NAME"
stages:
- build
- test
- deploy
build-job:
stage: build
script:
- "mvn clean compile $MAVEN_CLI_OPTS"
artifacts:
paths:
- target/
unittest-job:
stage: test
dependencies:
- build-job
script:
- "mvn package $MAVEN_CLI_OPTS"
artifacts:
paths:
- target/
integrationtest-job:
stage: test
dependencies:
- build-job
script:
- "mvn verify $MAVEN_CLI_OPTS"
artifacts:
paths:
- target/
deploy-job:
stage: deploy
artifacts:
paths:
- "target/*.jar"
/depo 'veya mvn -Dmaven.local.repo = Yol 'üzerinden yapılandırılabilir? – khmarbaise