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 pathTry 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.
- check that
/usr/local/apache-maven-3.2.5/bin/mvn
actually exists - check (e.g. with
ls -l
) that its permissions contain executable (x
) flag. Usechmod 0755 /usr/local/apache-maven-3.2.5/bin/mvn
it they don't. - 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, usesh -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
What Is The Downside of Updating Arm Ttbr(Translate Table Base Register)
How to Make Libusb Library Visible to Another Program
How to Invoke Any Kernel Function
Using Curl with Commands in Go
Linux Support 802.1Ag and Y1731
How to Distribute C++11 Shared Library on Centos6
Shared Libraries (Dlopen) and Thread-Safety of Library Static Pointers
Why Isn't Git Bash Transforming The Path to *Nix Notation for My Python Installation
Ansible: Copying One Unique File to Each Server in a Group
Finding and Listing Duplicate Words in a Plain Text File
How to Install and Run Tacotron2 on Ubuntu Wsl
Re-Stream a Mpeg2 Ts Pal Stream with Crtmpserver
Is It Secure to Rely on "X-Forwarded-For" to Restrict Access by Ip in Apache While Using Cloudflare
Xfs - How to Not Modify Mtime When Writing to File
Unexpected Periodic Behaviour of an Ultra Low Latency Hard Real Time Multi-Threaded X86 Code