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/bundle/pom.xml b/tools/package/archetypes/bundle/pom.xml
index 12e8577..79ee076 100644
--- a/tools/package/archetypes/bundle/pom.xml
+++ b/tools/package/archetypes/bundle/pom.xml
@@ -14,18 +14,20 @@
~ 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">
- <modelVersion>4.0.0</modelVersion>
+<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>
- <groupId>org.onosproject</groupId>
- <artifactId>onos-archetypes</artifactId>
- <version>2.4.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.onosproject</groupId>
+ <artifactId>onos-archetypes</artifactId>
+ <version>2.4.0-SNAPSHOT</version>
+ </parent>
- <artifactId>onos-bundle-archetype</artifactId>
- <packaging>maven-archetype</packaging>
+ <artifactId>onos-bundle-archetype</artifactId>
+ <packaging>maven-archetype</packaging>
- <description>ONOS OSGi bundle archetype</description>
+ <description>ONOS OSGi bundle archetype</description>
</project>
diff --git a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
index 08f248b..c996608 100644
--- a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
+++ b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/pom.xml
@@ -84,6 +84,16 @@
<groupId>org.onosproject</groupId>
<artifactId>onos-maven-plugin</artifactId>
</plugin>
+
+ <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>
diff --git a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/package-info.java b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/package-info.java
index e9d8ea0..4a304bb 100644
--- a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/package-info.java
+++ b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/package-info.java
@@ -1,5 +1,8 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
/*
- * Copyright 2014-present Open Networking Foundation
+ * Copyright ${year}-present Open Networking Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.