Copyright © 2011, Zeleos Project Team
In compiling JavaScript, you need to bind the zwt-tools:js-compile
mojo to the compile phase.
By convention, the compiler compiles (ie. validates and minifies) all the JavaScript files in src/main/js
in the build output directory (target/classes
).
<project> [...] <build> <plugins> <plugin> <groupId>org.zeleos.zwt</groupId> <artifactId>zwt-tools</artifactId> <version>0.3.1</version> <executions> <execution> <id>compile-js</id> <phase>compile</phase> <goals> <goal>js-compile</goal> </goals> <configuration> </configuration> </execution> </executions> </plugin> </plugins> </build> [...] </project>
You can also call the mojo from the command line provided that the plugin is deployed in your local repository:
jkuhn@inspiron-640m:~/devel/working/workspace-manual/zwtTutorial$ mvn org.zeleos.zwt:zwt-tools:0.3.1:js-compile