Skip to content

Simple example of an Undertow server using Google Stylesheets, Closure compiler, and Closure library with ADVANCED compilation and built with Bazel

License

Notifications You must be signed in to change notification settings

robfig/undertow-bazel-closure-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple demo application that demonstrates the following stack working together:

  • Built with Bazel (0.2.2)
  • Served with Undertow (Java web server)
  • Javascript compiled with Closure Compiler in ADVANCED mode built using the Closure rules
  • Dependencies specified using ES6-style modules (goog.require, goog.module, goog.defineClass)
  • Closure templates, on the server (Java) and the client (compiled to Javascript)
  • CSS built with Closure Stylesheets, minified and using class renaming

Setting up a new project

These were a couple steps I had to take to get everything working.

Bootstrap the BUILD / WORKSPACE

Like most Java libraries, Undertow supplies Maven artifacts. I converted that to Bazel using the generate_workspace command:

bazel run //src/tools/generate_workspace -- \
     -a io.undertow:undertow-core:1.2.11.Final \
     -a io.undertow:undertow-servlet:1.2.11.Final \
     -a io.undertow:undertow-websockets-jsr:1.2.11.Final

Copy the resulting WORKSPACE and BUILD files into your project.

About

Simple example of an Undertow server using Google Stylesheets, Closure compiler, and Closure library with ADVANCED compilation and built with Bazel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published