Apache TomEE Maven Plugin and web developement, easier reload


When developping a web application one boring task can be to redeploy an application for a css update.

There were some solution in tomee maven plugin (mainly synchronization based on timers) but this is not as smooth as it should be.

That’s why the plugin was enhanced for the coming 1.7.0.

Basically it allows you to define docBases (web resource paths) and externalRepositories (binaries).

For binaries no miracle since the container wired a lot of things at startup you still need to reload the webapp (recompile binaries and type ‘reload’ in the console, no need to restart the whole server, just redeploy the app).

For resources (js/html/css/…) it is nicer since docBases will be used directly 🙂 – understand you can just hit F5 to see changes.

But this configuration is still a bit annoying so we added the tag ‘webappDefaultConfig’ you just need to set to true to get a nice default configuration for a war (src/main/webapp for resources and target/classes for binaries).

Basically a nice configuration of the plugin looks like:

<plugin>
  <groupId>org.apache.openejb.maven</groupId>
  <artifactId>tomee-maven-plugin</artifactId>
  <version>${tomee.version}</version>
  <configuration>
    <tomeeClassifier>jaxrs</tomeeClassifier>
    <simpleLog>true</simpleLog>
    <context>ROOT</context>
    <webappDefaultConfig>true</webappDefaultConfig>
  </configuration>
</plugin>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s