WW-4522 Support latest stable AngularJS version in maven angularjs archetype
- Add maven plugin for automatic jshint execution on build Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/4969750f Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/4969750f Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/4969750f Branch: refs/heads/master Commit: 4969750f37aaae5b6adf82999066dbc58ca43811 Parents: 9ef3aba Author: Johannes Geppert <[email protected]> Authored: Sat Jul 11 10:45:31 2015 +0200 Committer: Johannes Geppert <[email protected]> Committed: Sat Jul 11 10:45:31 2015 +0200 ---------------------------------------------------------------------- .../META-INF/maven/archetype-metadata.xml | 2 +- .../main/resources/archetype-resources/pom.xml | 23 ++++++++++++++++++++ .../src/main/resources/jshint.conf.js | 13 +++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/4969750f/archetypes/struts2-archetype-angularjs/src/main/resources/META-INF/maven/archetype-metadata.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/META-INF/maven/archetype-metadata.xml b/archetypes/struts2-archetype-angularjs/src/main/resources/META-INF/maven/archetype-metadata.xml index 5253d83..6d58737 100644 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/archetypes/struts2-archetype-angularjs/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -26,7 +26,7 @@ <fileSet filtered="false" packaged="false"> <directory>src/main/resources</directory> <includes> - <include>log4j.properties</include> + <include>jshint.conf.js</include> </includes> </fileSet> http://git-wip-us.apache.org/repos/asf/struts/blob/4969750f/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml index 358209c..274c591 100644 --- a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/pom.xml @@ -91,6 +91,29 @@ </configuration> </plugin> <plugin> + <groupId>com.cj.jshintmojo</groupId> + <artifactId>jshint-maven-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>lint</goal> + </goals> + </execution> + </executions> + <configuration> + <configFile>src/main/resources/jshint.conf.js</configFile> + <directories> + <directory>src/main/webapp/js/</directory> + </directories> + <excludes> + <exclude>src/main/webapp/js/lib</exclude> + </excludes> + <reporter>jslint</reporter> + <reportFile>target/jshint.xml</reportFile> + <failOnError>true</failOnError> + </configuration> + </plugin> + <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>8.1.16.v20140903</version> http://git-wip-us.apache.org/repos/asf/struts/blob/4969750f/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/jshint.conf.js ---------------------------------------------------------------------- diff --git a/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/jshint.conf.js b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/jshint.conf.js new file mode 100644 index 0000000..91d3bb3 --- /dev/null +++ b/archetypes/struts2-archetype-angularjs/src/main/resources/archetype-resources/src/main/resources/jshint.conf.js @@ -0,0 +1,13 @@ +{ + "maxparams": 3, + "indent": true, + "camelcase": true, + "eqeqeq": true, + "forin": true, + "immed": true, + "latedef": false, + "noarg": true, + "noempty": true, + "nonew": true, + "globals": {} +} \ No newline at end of file
