Java.Lang.Noclassdeffounderror: Org/Codehaus/Plexus/Classworlds/Launcher/
Launcher When Running Bash File to Build The Project

java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher when running bash file to build the project

Couple of possibilities...

  • One, as posted here, you have both M2_REPO and M3_REPO variables defined.
  • Or you are facing this issue related to maven3 and M2_HOME
  • The other is that somehow the JRE is getting used instead of JDK when run from the batch file!

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

Please remove M2_HOME as environment variable, it is already set by
the mvn script. The only things you need to do is: add
apache-maven-3.x.x/bin to your path, set JAVA_HOME as environment
variable. So no need to add %JAVA_HOME%/bin to your path

Try to run mvn -v from /Library/Maven-3.3.3/bin/ folder first to
confirm the installation is correct. Try to run mvn with xtrace info
(tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html) and verify
the commandline built up by Maven. I assume you get an unexpected
classpath argument value.

NoClassDefFoundError ForkedBooter

I had to add -DforkMode=never.

maven not found on Yosemite

export PATH="$PATH:/usr/local/apache-maven-3.2.5/bin"

mvn executable is not in /usr/local/apache-maven-3.2.5/ but rather in /usr/local/apache-maven-3.2.5/bin subfolder.

  1. check that /usr/local/apache-maven-3.2.5/bin/mvn actually exists
  2. check (e.g. with ls -l) that its permissions contain executable (x) flag. Use chmod 0755 /usr/local/apache-maven-3.2.5/bin/mvn it they don't.
  3. In any case /usr/local/apache-maven-3.2.5/bin/mvn is a shell script, so you may try to run it with shell directly: sh /usr/local/apache-maven-3.2.5/bin/mvn and see if it runs indeed. If it still can't be run, use sh -x /usr/local/apache-maven-3.2.5/bin/mvn to see exactly the line where it fails.

Maven crashes when trying to compile a project Error executing Maven.

Looks like that version of maven doesn't work on Java 9, but it does on Java 8.

Ensure that you have the relevant packages installed, e.g...

sudo apt install openjdk-8-jre openjdk-8-jdk

And then make sure that maven uses the correct version. The simplest way to do this is to add the following line to the end of ~/.mavenrc (Creating it if needed):

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/

(You might need to look around in /usr/lib/jvm/ for the exact name you need as it might be different for your system)

How to fix Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:java error running a Dataflow template from a VM instance in GCP?

To clone, compile and run a Dataflow Template is necessary enable all the necessary APIs in your GCP project:

  • Dataflow
  • Compute Engine
  • Stackdriver Logging
  • Cloud Storage
  • Cloud Storage JSON
  • BigQuery
  • PubSub

In order to do that you can click in this helper link:

https://console.cloud.google.com/flows/enableapi?apiid=dataflow,compute_component,logging,storage_component,storage_api,bigquery,pubsub



Related Topics



Leave a reply



Submit