【发布时间】:2018-06-30 15:59:28
【问题描述】:
我正在尝试通过 maven 构建一个 Angular 项目。这是我的步骤
npm install
bower install
grunt build
前两个成功,在第三步中,我得到指南针未找到错误。
我能够在我的本地成功运行,因为 Ruby 已添加到 PATH 中,但在 Jenkins 服务器中它失败了,因为没有设置 PATH。
我正在寻找通过 pom.xml 传递环境变量 -PATH 的选项。有人可以建议我如何做到这一点吗?
<execution>
<id>exec-grunt-build</id>
<phase>generate-sources</phase>
<configuration>
<workingDirectory>${project.resourcesfolder}</workingDirectory>
<executable>${grunt_cmd}</executable>
<arguments>
<argument>build</argument>
</arguments>
<environmentVariables>
<path>${ruby_home}/bin</path>
</environmentVariables>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
Warning: not found: compass
Ant Equavelent [只看下面代码的 maven 版本]
<env key="PATH" path="${ruby_home}/bin"/>
【问题讨论】:
标签: angular maven gruntjs pom.xml