Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exporting a war in Release mode using Spring Tool Suite STS?

I´m using Spring Tool Suite for a Spring MVC project. I can´t find the option of exporting my war in release mode. Does Eclipse do this by default when exporting the war?

Maybe Eclipse use a Debug mode by default, but it changes the mode automatically when you export the war.

I know that release version is optimized, that´s why I would like to find out how to export my war in that version.

like image 911
Luis Teijon Avatar asked Nov 28 '15 14:11

Luis Teijon


People also ask

How do I export a war project in STS?

Procedure. Right-click on a web project folder and select Export > WAR file . Optional: Specify WAR export options, such as whether to include Java™ source files in the WAR, and whether to overwrite any existing resources during the export process.

What is STS Spring Tool Suite?

Spring Tool Suite (STS) is a java IDE tailored for developing Spring-based enterprise applications. It is easier, faster, and more convenient. And most importantly it is based on Eclipse IDE. STS is free, open-source, and powered by VMware.


1 Answers

There are no Debug/Release modes in eclipse when exporting jars/wars. There are Java compiler settings but they remain unchanged no matter how you export your jars.

If you want to control your build settings depending on the build profile selected, it is better to use some build engine such as Apache Maven or Gradle, where you can define multiple build profiles and then change them during the build.

like image 62
ike3 Avatar answered Sep 20 '22 15:09

ike3