Merge pull request #38 from acoburn/TAMAYA-379b

TAMAYA-379: Enforce checkstyle rules on the example projects
diff --git a/examples/01-minimal/pom.xml b/examples/01-minimal/pom.xml
index 0f0f8ba..f0e4db3 100644
--- a/examples/01-minimal/pom.xml
+++ b/examples/01-minimal/pom.xml
@@ -54,5 +54,13 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-    
+
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/examples/02-custom-property-source/pom.xml b/examples/02-custom-property-source/pom.xml
index 53b0f81..3e21a14 100644
--- a/examples/02-custom-property-source/pom.xml
+++ b/examples/02-custom-property-source/pom.xml
@@ -51,5 +51,13 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-    
+
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySource.java b/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySource.java
index 7510090..80820dc 100644
--- a/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySource.java
+++ b/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySource.java
@@ -29,6 +29,9 @@
 import java.util.Map;
 import java.util.Properties;
 
+/**
+ * A simple PropertySource class.
+ */
 public class SimplePropertySource extends BasePropertySource {
 
     public static final String CONFIG_PROPERTIES_LOCATION = "META-INF/MyOtherConfigProperties.properties";
@@ -38,7 +41,7 @@
         URL url = ClassLoader.getSystemClassLoader().getResource(CONFIG_PROPERTIES_LOCATION);
         Properties properties = new Properties();
 
-        try(InputStream is = url.openStream()){
+        try(InputStream is = url.openStream()) {
             properties.load(is);
 
             for(Map.Entry en: properties.entrySet()){
@@ -46,8 +49,7 @@
                         PropertyValue.createValue(en.getKey().toString(), en.getValue().toString())
                         .setMeta("source", getName()));
             }
-        }
-        finally{
+        } finally {
             props = Collections.unmodifiableMap(props);
         }
     }
@@ -61,4 +63,4 @@
     public Map<String, PropertyValue> getProperties() {
         return props;
     }
-}
\ No newline at end of file
+}
diff --git a/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySourceProvider.java b/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySourceProvider.java
index 0573fbd..6c61976 100644
--- a/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySourceProvider.java
+++ b/examples/02-custom-property-source/src/main/java/org/apache/tamaya/examples/custompropertysource/SimplePropertySourceProvider.java
@@ -28,6 +28,9 @@
 import java.util.Collections;
 import java.util.List;
 
+/**
+ * A simple PropertySource provider class.
+ */
 public class SimplePropertySourceProvider implements PropertySourceProvider {
     private static final String[] RESOURCES = {
         "cfgOther/a.properties", "cfgOther/b.properties", "cfgOther/c.properties"
diff --git a/examples/11-distributed/pom.xml b/examples/11-distributed/pom.xml
index b253b2c..8ed7412 100644
--- a/examples/11-distributed/pom.xml
+++ b/examples/11-distributed/pom.xml
@@ -104,6 +104,11 @@
                     <showDeprecation>${maven.compile.deprecation}</showDeprecation>
                 </configuration>
             </plugin>
+
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-checkstyle-plugin</artifactId>
+            </plugin>
         </plugins>
     </build>