mvn fails to start properly on default installation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
maven (Ubuntu) |
Confirmed
|
High
|
Unassigned |
Bug Description
Description: Ubuntu 22.04.3 LTS
Release: 22.04
I just installed maven from the default repository to build a java project.
Running mvn command I get the following error:
```
$ mvn
Error: Could not find or load main class org.codehaus.
Caused by: java.lang.
```
I executed the maven launch script with the appropriate `JAVA_HOME` and `MAVEN_HOME`:
```
$ env JAVA_HOME=
• exec /usr/lib/
Error: Could not find or load main class org.codehaus.
Caused by: java.lang.
```
The program should identify the correct MAVEN_HOME instead of trying to use my current working directory.
I can run maven manually using this command, but I would not expect having to diagnose this issue with a package from the official repositories.
```
$ /usr/lib/
-classpath /usr/share/
-Dmaven.
-Dclassworlds
-Dlibrary.
-Dmaven.
org.codehaus.
```
---
External link: https:/
Changed in maven (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → High |
description: | updated |
It seems like the program assumes it will be called using the absolute path to the command, the folowing command runs:
JAVA_HOME= /usr/lib/ jvm/java- 1.8.0-openjdk- amd64 /usr/share/ maven/bin/ mvn