There is also a breaking change, that’s been inherited from JSLint. The meaning of several options has been inverted. Now, the default is to behave strictly, with options turned off. For example, if you want to turn off JSLint’s checking of whitespace, you now have to specify
--white. Previously, this would enable checking of whitespace. See the release notes for details, and please take care when updating.
The maven plugin should behave much like any other maven plugin: you add it to your
<build><plugins> section. Here’s an example:
<plugin> <groupId>com.googlecode.jslint4java</groupId> <artifactId>jslint4java-maven-plugin</artifactId> <version>2.0.0</version> <executions> <execution> <id>lint</id> <phase>process-resources</phase> <goals> <goal>lint</goal> </goals> <configuration> <failOnError>true</failOnError> <options> <undef>true</undef> </options> </configuration> </execution> </executions> </plugin>
I’d love feedback on how well this works.