I have a Dynamic Web Project that has dependencies on 4 other Web Fragment Projects, running on Liberty.
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.
Just to be clear, here is the console output from my Liberty server when I change a Java resource:
[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.
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, but it is republished.
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?
Liberty Settings
Run applications directly from the workspace is unchecked - Even if I do run directly from the workspace, this behavior is not achieved.
Publishing: Automatically publish when resources change. - 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.
Version Information
Platform: RHEL 7.2
Eclipse Java EE IDE version Neon.1 Release (4.6.1) Build 20160913-0900
WebSphere Application Server 8.5.5.9/wlp-1.0.12.cl50920160227-1523
Can you explain why you would want this? Usually, static resource updates do not require an app restart. --joe
The app in question caches the static resources when they're first requested. By restarting the app, it allows for the newest version of the static resources to be served. To provide some context, this app is used to serve Web UI code (HTML/JS/CSS, etc.). We need the app to restart every time any of these static resources update to ease the development process (not having to manually restart the app every time)
SRVE0777E when launching application though liberty profile in eclipse 2 Answers
Where to find Liberty features like couchdb-1.0 etc., and how to add those into my Eclipse 2 Answers
Eclipse validation of every server.xml file it sees 0 Answers
Eclipse validation of server.xml not supporting library-folder combo 1 Answer
Remote deploy to Eclipse Liberty Profile server with Eclipse plugin 3 Answers