Building a slimmer WAR file
The generated WAR file, task-time-tracker-1.0.war
, is very large in size at the moment; in fact, it is approximately 32 MB! The default behavior of the maven-war-plugin
is to add all of the directories in the webapp
folder to the WAR file. For production deployments we do not need a large number of these files, and it is best practice to trim down the WAR file by excluding the content that is not required. We will exclude the entire Ext JS 4 SDK and all of the Sencha Cmd-generated folders under the webapp
directory. We will also exclude all the resources that are not applicable for production use, including the index*.html
files used during development. The only file served by GlassFish will be the yet-to-be-created index.jsp
:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>TTT</title>
<link rel="stylesheet" href="resources/ext-theme-classic-all.css">
<link...