[WHISKER-13] Error during site generation with Java8
- Move the version of Findbugs Maven Plugin to a property, and conditionally change the version to a newer one if running under Java 1.8+

git-svn-id: https://svn.apache.org/repos/asf/creadur/whisker/trunk@1623073 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 5778d4d..9264cf6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -115,6 +115,8 @@
     <whisker.site.name>Whisker Website</whisker.site.name>
     <whisker.site.id>org.apache.creadur.whisker.site</whisker.site.id>
     <mavenPluginPluginVersion>3.3</mavenPluginPluginVersion>
+    <!-- Cannot upgrade to 3.0.0 because it requires Java 7 -->
+    <findbugsPluginVersion>2.5.5</findbugsPluginVersion>
   </properties>
   <!-- ================================ Build information -->
   <build>
@@ -236,8 +238,7 @@
               <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
-                <!-- Cannot upgrade to 3.0.0 because it requires Java 7 -->
-                <version>2.5.5</version>
+                <version>${findbugsPluginVersion}</version>
               </plugin>
               <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -353,6 +354,18 @@
       </extension>
     </extensions>
   </build>
+  <profiles>
+    <profile>
+      <id>java8</id>
+      <activation>
+        <jdk>[1.8,)</jdk>
+      </activation>
+      <properties>
+        <!-- Findbugs Maven Plugin 2.5.x does not work with Java 8 - use a different version for Java 1.8+ -->
+        <findbugsPluginVersion>3.0.0</findbugsPluginVersion>
+      </properties>
+    </profile>
+  </profiles>
   <!-- ================================ Project information -->
   <name>Apache Whisker</name>
   <description>Apache Whisker wrangles legal documentation for composed applications.</description>