The Closure Maven Plugin makes it easy to write web applications in Maven by integrating Closure CSS, JavaScript, Template, and Protocol Buffers compilation.
closure:generate-sources compiles .css, .js, .proto, and .soy files generating .class and .js files and resources that are bundled into the output JAR.
<plugin> <groupId>com.google.closure</groupId> <artifactId>closure-maven-plugin</artifactId> <version>1.2.0</version> <executions> <execution> <goals> <goal>generate-closure-sources</goal> </goals> </execution> </executions> <configuration> <!-- See Configuration --> </configuration> </plugin>
processes web sources. Specifically, it
By default, non-java outputs are collected in the target/classes/closure directory, so they are available as resources. The Soy Juice module works with this layout to enable Soy rendering from Java code, and the generated WebFiles Java class contains constants for each output.
See Configuration for an exhaustive list of configuration options.