我使用命令“ #jhipster ci-cd”生成文件.gitlab-ci.yml,以推送到Gitlab并部署到Heroku。
但是Maven编译由于“ ./mvnw:权限被拒绝”而失败。
Checking out a5400e45 as master...
Skipping Git submodules setup
Checking cache for master...
FATAL: file does not exist
Failed to extract cache
$ export MAVEN_USER_HOME=`pwd`/.maven
$ ./mvnw com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v10.13.0 -DnpmVersion=6.4.1 -Dmaven.repo.local=$MAVEN_USER_HOME
/bin/bash: line 73: ./mvnw: Permission denied
ERROR: Job failed: exit code 1
我不知道为什么拒绝许可。我使用Windows 10创建Jhipster项目。
在您的.gitlab-ci.yml文件中,输入:
image: openjdk:8
[ ... ]
before_script:
- chmod +x mvnw
- export MAVEN_USER_HOME=`pwd`/.maven
- ./mvnw com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v10.13.0 -DnpmVersion=6.4.1 -Dmaven.repo.local=$MAVEN_USER_HOME
- ./mvnw com.github.eirslett:frontend-maven-plugin:npm -Dmaven.repo.local=$MAVEN_USER_HOME
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句