如何将openshift默认maven版本从3.0.4升级到3.1.0?

时间:2015-04-02 20:50:55

标签: maven openshift

maven插件frontend-maven-plugin:0.0.23需要maven 3.1.0但openshift默认3.0.4。

下面是Maven错误" git push" openhift:

remote: [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:install-node
-and-npm (install node and npm) on project taxtab-controllers: The plugin com.github.eirslett:fronte
nd-maven-plugin:0.0.23 **requires Maven version 3.1.0** -> [Help 1]

我尝试了以下步骤来修复构建:

  1. 我在$OPENSHIFT_HOMEDIR\app-root\runtime\apache-maven安装了最新的maven 3.3.1。
  2. 试图在两个动作挂钩中添加以下导出:pre_build和build,但仍无效。
  3. export M2_HOME=/var/lib/openshift/5497cdff4382ec255f00002c/app-root/runtime/apache-maven/apache-maven-3.3.1 export M2=$M2_HOME/bin export PATH=$M2:$PATH

    我还尝试在.bash_profile中使用以上变量设置添加~/app-root/data/,但仍无效。

1 个答案:

答案 0 :(得分:2)

我有同样的问题。降级插件的一个版本解决了这个问题:

<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>0.0.22</version>

而不是0.0.23

然而,我运行到下一期,由于缺少root,npm install无法正常工作。