Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven on Windows Subsystem For Linux

I'm trying to run maven on Windows Subsystem for Linux, and getting "cannot allocate memory" errors. However, free -m shows that I have plenty of memory available, and the same build on Cygwin succeeds.

Anyone have any tips for dealing with this? I'd prefer to change my settings.xml over my pom.xml's, but I'm open to almost anything.

like image 329
Eyal Avatar asked Jul 10 '17 13:07

Eyal


People also ask

Is there a Linux subsystem for Windows?

The Windows Subsystem for Linux (WSL) is a feature of the Windows operating system that enables you to run a Linux file system, along with Linux command-line tools and GUI apps, directly on Windows, alongside your traditional Windows desktop and apps.

Where is Maven Home Path in Linux?

IN short, binaries will be in /usr/bin, or some other location on your path ( try 'echo $PATH' on the command line to see the possible locations ). Configuration is always in a subdirectory of /etc. And the "home" is typically in /usr/lib or /usr/share.

Where does Maven install on Linux?

To install Maven on Linux/Unix: Visit the Apache Maven site, download the Maven binary tar. gz file of the latest version, and ​extract the archive to the folder you want to use Maven in. Open the terminal and run the following commands to set the environment variables; for example, if apache-maven-3.3.


1 Answers

Try to install maven by downloading it, not by doing an apt-get install maven. On my Ubuntu machines I've never been able to get the "apt" version to work right and have always resorted to downloading it directly from the Maven download instead. I tried that on my WSL and was able to build a pretty good sized JEE project with no issues.

like image 66
stdunbar Avatar answered Oct 07 '22 00:10

stdunbar