When I am running mvn clean install
for my build on linux RHEL 6. I\'m getting the following error: java.lang.outOfMemoryError heap space
.
When I am running mvn clean install for my build on linux RHEL 6 it is showing java.lang.outOfMemoryError heap space.
You need to set the MAVEN_OPTS environment variable.
I have read all the articles on internet
That is false. At best you have read a TINY FRACTION of the relevant articles.
... and in my machine I don't have mvn.sh, I have mvn.bat
If you have used "yum" to install Maven, then there will be a "mvn" command on your command path. On my system, it is a shell script. If you were going to "hack" a script, that would what you would edit.
But you shouldn't need to.
and where to set export MAVEN_OPTS COMMAND.
This is a very basic "How to use a Linux command shell" question.
The answer is either you type is at the command prompt before you run the "mvn" command, or you add it to your shell initialization file and restart the shell as appropriate.
My advice would be to invest some time in reading a tutorial about how to use the Linux command shell. It will save you a lot of time in the long term.