Before I start, just to clarify some things (not trying to sound rude) I have looked around online and I understand that there are some solutions to the problem I am about to explain, however I have tried atleast 5 or 6 and they don't seem to be doing the trick unfortunately :( Some of the solutions that don't work for me include this and this.
Essentially, I am creating a Spigot plugin that is lightweight (i.e. Only a few classes, nothing out of the norm or anything that would be intensive. In fact, the compiled .jar is only 44MB at this point in time)
However, my IDE of choice is IntelliJ. When I compile the plugin to output the .jar file, the method I use (which I believe is the best way to do so) is to go to Build > Build Artifacts > Build This is where the problem entails. In the messages tab of IntelliJ, it reports Error:Artifact 'name:jar': java.lang.OutOfMemoryError
Please note that I have replaced my plugin name for "name:jar" for this question as you can see above.
My Build process heap size is set to "1500mb"
My VM options for Importer is set to "-Xmx512m"
My PC has 8192mb of RAM (it uses nowhere near that amount at any time)
Any help is greatly appreciated!