I'm currently working on an ubuntu pc.I created maven project in eclipse and Build it by giving the goals "clean install". it created war files.
But when I search maven home environment variable using commands printenv
it shows nothing like M2_HOME in the output list.
when I give the command echo $M2_HOME
it shows blank line.
when I give the command mvn --version
it gives me the flowing output
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-109-generic", arch: "amd64", family: "unix"
my question is, can maven work without environment variable?