无法执行“mvn clean package"GO CD 中的任务
问题描述:
我在 Go CD 中设置了一个Hello World"管道,其中包含一项任务 mvn clean package
.我已经在 Java 和 Maven 中注册了一个代理并运行.
I have setup a "Hello World" pipeline with one task mvn clean package
in Go CD. I have registered an agent with Java and Maven up and running.
当我触发管道时,作业失败:
When I trigger the pipeline, the job fails:
12:05:08.655 [go] Start to execute task: <exec command="mvn" > <arg>clean package</arg> </exec>.
12:05:08.660 Error happened while attempting to execute 'mvn clean package'. Please make sure [mvn] can be executed on this agent.
如果我在代理中执行 mvn clean package
,一切正常.怎么了?有什么地方可以查看更具体的日志吗?
If I execute mvn clean package
in my agent, everything works. What is happening? Is there a place where I can see more specific logs?
答
而不是运行以下:
命令:
mvn clean package
尝试使用
命令:
/bin/bash
参数:
-c
mvn clean package