Is JRebel Compatible with Jangaroo?

24 views
Skip to first unread message

Bryn Kelly

unread,
May 29, 2015, 4:14:33 PM5/29/15
to jangaro...@googlegroups.com
Hello all,
I am attempting to run cargo to spin up a local tomcat server, but running into workflow issues.

Every time I make a code change, I have to:
- Shut down the server
- Run a maven install to recompile
- Spin up the server again

Has anyone been able to use JRebel or some other kind of maven listener plugin to avoid this kind of problem?
Open to thoughts or suggestions.

Thanks!

Frank

unread,
May 29, 2015, 4:29:45 PM5/29/15
to jangaro...@googlegroups.com, brynj...@gmail.com
Hi Bryn,

Assuming you use Jangaroo 2.0.x, JavaScript resources are packaged into JARs as Servlet 3 resources (under META-INF/resources), but this is rather intended for modular deployment than for development.
For a fast development round-trip, you probably do not need JRebel, rather you have two simpler options:
  • Either configure Tomcat Maven plugin to serve files from each target/classes/META-INF/resources directory of every modules, or
  • if you have many modules and maintaining the list of all modules is too cumbersome, use Jangaroo's webjars-maven-plugin to unpack all resources contained in all JARs to the webapp's target directory.

The first option has the advantage that you only have to rebuild the module in which you changed code, reload the page in the browser and - voilá!

The second option requires less POM code and set-up overhead, but you have to rebuild the changed module and re-run webjars-maven-plugin's unpack goal in the webapp module.

If you need further help for these set-ups, just come back here!

Actually there is a third option, namely to use Jetty instead of Tomcat, at least for development. In contrast to Tomcat, Jetty (at least in older versions) does not cache resources from JARs, so update the JAR and Jetty serves your updated code. You can find a concrete example Maven set-up using Jetty in the public git repo jangaroo-ext-as-examples on branch "jangaroo-2": https://github.com/CoreMedia/jangaroo-ext-as-examples/tree/jangaroo-2

Greetings
-Frank-

Frank

unread,
May 30, 2015, 3:34:20 AM5/30/15
to jangaro...@googlegroups.com, frank.w...@coremedia.com, brynj...@gmail.com
One more thing: the best development round-trip you can get is using our IntelliJ IDEA Plugin "Jangaroo 0.9" (the number "0.9" stands for the first supported Jangaroo version).
When building the project in IDEA (Ctrl-F9), the plugin takes care of compiling all changed sources (incremental build!) and copies them to the webapp's target folder. So your turn-around is hit Ctrl-F9 (which after some round-trips only takes a second), switch to the browser, hit F5. In Chrome Developer Tools, you should set the option to disable the browser cache (while DevTools are open).
For troubleshooting, see https://github.com/CoreMedia/jangaroo-idea/wiki/Troubleshooting-the-Jangaroo-IDEA-Plugin

Bryn Kelly

unread,
Jun 1, 2015, 1:56:16 PM6/1/15
to jangaro...@googlegroups.com, brynj...@gmail.com
Frank,
Thanks so much for the response. Working with my team to see what might be the best setup for us.
I will let you know if I have any questions.
Reply all
Reply to author
Forward
0 new messages