[ONOS-3739] Substitute copyright year during archetype gen

With this commit, we can substitute the copyright year during
archetype generation phase, so that we do not need to manually
input the copyright year.

Change-Id: I3c0e4cdc69a3fad7a90335332d5489604107b892
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 9286927..3088353 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
@@ -1,6 +1,11 @@
+#set( $dummy = "" )
+#set( $date = $dummy.getClass().forName("java.util.Date").newInstance() )
+#set( $format = $dummy.getClass().forName("java.text.SimpleDateFormat").newInstance() )
+#set( $pattern = $format.applyPattern("yyyy") )
+#set( $year = $format.format($date) )
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-  ~ Copyright 2016 Open Networking Laboratory
+  ~ Copyright ${year} Open Networking Laboratory
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
diff --git a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/AppComponent.java b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/AppComponent.java
index 1d6e121..a7764cc 100644
--- a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/AppComponent.java
+++ b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/main/java/AppComponent.java
@@ -2,7 +2,7 @@
 #set( $symbol_dollar = '$' )
 #set( $symbol_escape = '\' )
 /*
- * Copyright 2016 Open Networking Laboratory
+ * Copyright ${year} Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/test/java/AppComponentTest.java b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/test/java/AppComponentTest.java
index c608229..72bacd8 100644
--- a/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/test/java/AppComponentTest.java
+++ b/tools/package/archetypes/bundle/src/main/resources/archetype-resources/src/test/java/AppComponentTest.java
@@ -2,7 +2,7 @@
 #set( $symbol_dollar = '$' )
 #set( $symbol_escape = '\' )
 /*
- * Copyright 2016 Open Networking Laboratory
+ * Copyright ${year} Open Networking Laboratory
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.