I'm trying to figure out how after a quick edit of say a .less
file or an .html
file or a .js
file that I can quickly see the changes in the web application running Tomcat being served from IntelliJ.
We've wired Eirslett's frontend-maven-plugin
into our project to run Gulp to generate the CSS from the LESS files and other tasks like JS minifying.
The only thing that I know works is to go to the command line and execute mvn clean install
from the command line and then re-run the IntelliJ Tomcat configuration.
The problem is this takes many minutes with our build. Seems like there must be some trick where I can tell IntelliJ to just re-run Gulp and then redeploy the CSS, JS and HTML changes without re-compiling all the Java and restarting all my services and other gunk.
I know that if I'm just making changes to HTML or JS or CSS in a simple java web application that doesn't use Gulp that I can issue the 'Build, Compile' (CommandShiftF9) command on the affected files in IntelliJ and IntelliJ will re-deploy those selected files. I'm looking for something like that but that also runs Gulp before redeploying.
I've running Gulp from command line and seeing if IntelliJ would pick up the changes, but instead the Tomcat running in IntelliJ crashes with a bunch of these
23-Nov-2015 12:28:53.518 SEVERE [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployDescriptor Error deploying configuration descriptor /Users/jkirby/Library/Caches/IntelliJIdea15/tomcat/app1,_app2,_app3,_app4,_app5,_app6_(1)_cumulus/conf/Catalina/localhost/site.xml
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/site]]