user2707527
user2707527

Reputation: 31

How to upgrade openshift default maven version from 3.0.4 to 3.1.0?

The maven plugin frontend-maven-plugin:0.0.23 requires maven 3.1.0 but openshift has default 3.0.4.

Below is Maven Error on "git push" to openshift:

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]

I tried below steps to fix the build:

  1. I installed latest maven 3.3.1 in $OPENSHIFT_HOMEDIR\app-root\runtime\apache-maven.
  2. Tried adding adding the below exports in both action hooks : pre_build and build, but still not working.

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

I also tried adding the .bash_profile in ~/app-root/data/ with above variable settings, still not working.

Upvotes: 3

Views: 436

Answers (1)

Ovidiu Dolha
Ovidiu Dolha

Reputation: 5413

I had the same issue. Downgrading one version of the plugin solved the issue:

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

Instead of 0.0.23

However, I run then into the next issue, which is npm install not working due to lack of root.

Upvotes: 2

Related Questions