Search code examples
mavenjenkinsexecution

Jenkins maven error while building job


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).


Solution

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