2016-03-15 18 views
0

我复制粘贴詹金斯的工作(在Grails的2.4.5工作),但它在新的Grails失败3.1.2项目:的Grails 3.1.2项目詹金斯:“-n”未知的命令行选项

Started by user Michal Szulc 
Building in workspace <http://jenkins.example.com/job/project-server/ws/> 
> /usr/bin/git rev-parse --is-inside-work-tree # timeout=10 
Fetching changes from the remote Git repository 
> /usr/bin/git config remote.project-server_repository.url http://git.example.pl/scm/es/project-server.git # timeout=10 
Fetching upstream changes from http://git.example.pl/scm/es/project-server.git 
> /usr/bin/git --version # timeout=10 
using .gitcredentials to set credentials 
> /usr/bin/git config --local credential.helper store --file=/tmp/git6110612657385406031.credentials # timeout=10 
> /usr/bin/git -c core.askpass=true fetch --tags --progress http://git.example.pl/scm/es/project-server.git +refs/heads/*:refs/remotes/project-server_repository/* 
> /usr/bin/git config --local --remove-section credential # timeout=10 
> /usr/bin/git rev-parse refs/remotes/project-server_repository/master^{commit} # timeout=10 
> /usr/bin/git rev-parse refs/remotes/project-server_repository/project-server_repository/master^{commit} # timeout=10 
Checking out Revision eb5ef3113a02e6dc325d91ba5cc4b9ee7b935c90 (refs/remotes/project-server_repository/master) 
> /usr/bin/git config core.sparsecheckout # timeout=10 
> /usr/bin/git checkout -f eb5ef3113a02e6dc325d91ba5cc4b9ee7b935c90 
> /usr/bin/git rev-list eb5ef3113a02e6dc325d91ba5cc4b9ee7b935c90 # timeout=10 
[project-server] $ /var/lib/jenkins/tools/com.g2one.hudson.grails.GrailsInstallation/3.1.2/bin/grails -Dgrails.work.dir=<http://jenkins.example.com/job/project-server/ws//target> -Dserver.port=40855 clean --non-interactive --plain-output 
Error | 
Command [clean] error: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.11-bin.zip'. 
Problem with provided build arguments: [-non-interactive, --console, plain]. 
Unknown command-line option '-n'. 
Either it is not a valid build option or it is not supported in the target Gradle version. 
Not all of the Gradle command line options are supported build arguments. 
Examples of supported build arguments: '--info', '-u', '-p'. 
Examples of unsupported build options: '--daemon', '-?', '-v'. 
Please find more information in the javadoc for the BuildLauncher class. (Use --stacktrace to see the full trace) 
Build step 'Build With Grails' marked build as failure 

如果我在本地环境中运行./gradlew clean./gradlew war,它可以很好地工作。如何由詹金斯运行它?

回答

0

我仍然不知道为什么这种情况发生,但我通过改变构建解决的问题 - >建立与Grails的 - >目标

clean "war api.project-server.pl.war" 

到:

"war api.project-server.pl.war"