0

I am running the following maven command from my jenkins box -

+ /temp/app/tools/apache-maven-3.0.4/bin/mvn --update-snapshots clean deploy

But this is throwing the following error -

Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

Any clue why I am getting this error? The maven installation seems OK (as I have triggered mvn command directly from the Linux server).

Saikat
  • 14,222
  • 20
  • 104
  • 125
  • check https://stackoverflow.com/questions/11118237/maven-error-could-not-find-or-load-main-class-org-codehaus-plexus-classworlds-l ? – Ori Marko Jul 13 '17 at 13:02

2 Answers2

0

Check your maven installation. The version must match and set your Maven_Home or M3_HOME variable

Stimpson Cat
  • 1,444
  • 19
  • 44
0

I edited the .bashrc file to set the Maven home, sourced it and then restarted the Jenkins server. That seemed to solve my issue.

Saikat
  • 14,222
  • 20
  • 104
  • 125