Errai: The browser as a platform

Wednesday, November 6, 2013

New Development Mode Setup in Errai 3.0 Milestone 2

One of the new features in our latest 3.0 release is a new development mode setup using JBoss 7 (or Wildfly 8). Until this point, our demos have either:
  1. used an embedded Jetty server, or
  2. have required you to manually run your own JBoss AS instance.
But both of these setups have drawbacks. Having an embedded server makes the development process much more convenient, but it is often necessary to develop with an enterprise capable application server.

The newest development mode setup brings us one step closer to having our cake and eating it too. Using the JBoss CLI interface, we now control an external JBoss or Wildfly instance with the GWT-Maven plugin.

The Setup

All it takes to get started is two new Errai dependencies and some minor changes to the gwt-maven-plugin configurations.

The Workflow

Want to run your app in development mode? Just run mvn gwt:run .

Need to update the server-side code? Run mvn compile and then press "Restart Server".

How Can I Get In On This?

You can check out this feature on errai-tutorial. In our new tutorial guide you can get a thorough introduction on how to setup your environment to run and develop with Errai. (But you can skip to here to get straight to the development mode instructions).

But What If I'm Still On Errai 2.4.x?

Don't worry, you're invited too! The two new dependencies (errai-cdi-jboss and errai-client-local-class-hider) have no other Errai dependencies themselves. That means you can add these artifacts to your maven project without any conflicts. Just add the following to your pom:
And make sure that your gwt-maven-plugin configuration is consistent with the following (specifically the extraJvmArgs, noServer, server properties):
Hope you enjoy it.


  1. Is Super Dev Mode also supported?

    1. Is support for that coming soon or not for quite some time yet? Last time I tried using Errai I had two main issues:

      - Error reporting is not user-friendly and downright misleading to anyone except an Errai core developer.
      - Compile times were very long. I'm aware of configuration tweaks to reduce this but I was really hoping Super Dev Mode would provide another boost making it more practical.

    2. I know for certain that a goal for Errai 3.0 is to introduce more incremental compilation to reduce the compile time.

      I'm not sure of any plans regarding Super Dev Mode, but as others have also brought this up I will be sure to bring it up with the rest of the team.

  2. This comment has been removed by the author.