How to automatically restart application on resource update
<p>I have a Dynamic Web Project that has dependencies on 4 other Web Fragment Projects, running on Liberty.</p>
<p>If I modify a Java resource that is in one of the dependent Web Fragment projects while the Liberty server is running with the app from the Dynamic Web Project started, the app will be removed from Liberty, stopped, re-added to Liberty, and started up again.</p>
<p>Just to be clear, here is the console output from my Liberty server when I change a Java resource:</p>
<pre><code>[AUDIT   ] CWWKT0017I: Web application removed (default_host): http://localhost:9080/ui/
[AUDIT   ] CWWKZ0009I: The application WEB_UI has stopped successfully.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/ui/
[AUDIT   ] CWWKZ0003I: The application WEB_UI updated in 0.184 seconds.
</code></pre>
<p>However, if I modify any resources (JS, CSS, HTML, etc.) in the WebContent directory of the Dynamic Web Project (or any of the Web Fragment Projects), the app is not restarted, <strong>but it is republished</strong>.</p>
<p><strong>Is there a way to get the same behavior (restart the application and remove/add from Liberty) when a resource inside WebContent is modified, similar to when a Java resource is modified?</strong></p>
<h3>Liberty Settings</h3>
<ul>
<li><p>Run applications directly from the workspace is <strong>unchecked</strong></p>
<ul>
<li>Even if I do run directly from the workspace, this behavior is not achieved.</li>
</ul>
</li>
<li><p>Publishing: Automatically publish when resources change.</p>
<ul>
<li>I am not interested in simply having the app republish, as the app caches WebContent on first fetch, so I need the app to restart every time anything in WebContent is changed.</li>
</ul>
</li>
</ul>
<h3>Version Information</h3>
<p>Platform: RHEL 7.2</p>
<p>Eclipse Java EE IDE version Neon.1 Release (4.6.1) Build 20160913-0900</p>
<p>WebSphere Application Server 8.5.5.9/wlp-1.0.12.cl50920160227-1523</p>