Fix checkstyle errors when building archetype-generated apps

Checkstyle validation is now enabled by default in onos-dependencies
(archetypes' parent pom). We also add a reference to the archetypes' pom
to disable checkstyle, if needed.

Change-Id: I9b6e6cecf2d704f52ec1f118eae2aafd03cf0b9a
diff --git a/tools/package/archetypes/ui2/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/ui2/src/main/resources/archetype-resources/pom.xml
index 05da40c..6aa5e58 100644
--- a/tools/package/archetypes/ui2/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/ui2/src/main/resources/archetype-resources/pom.xml
@@ -26,7 +26,9 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
@@ -48,4 +50,18 @@
         <module>web/${artifactId}-gui</module>
     </modules>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <!-- Uncomment to disable checkstyle validation
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+                -->
+            </plugin>
+        </plugins>
+    </build>
+
 </project>