Fix compile on newer mvn

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/commons/trunk@1873897 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 838e2df..1fe7e9e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,8 +88,6 @@
           <configuration>
             <source>${java.version}</source>
             <target>${java.version}</target>
-            <executable>${jdk.path}/bin/javac</executable>
-            <fork>true</fork>
           </configuration>
         </plugin>
         <plugin>
@@ -174,6 +172,33 @@
       </testResource>
     </testResources>
   </build>
+  
+  <profiles>
+    <profile>
+      <id>custom-javac</id>
+      <activation>
+        <property>
+          <name>jdk.path</name>
+        </property>
+      </activation>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.apache.maven.plugins</groupId>
+              <artifactId>maven-compiler-plugin</artifactId>
+              <configuration>
+                <source>${java.version}</source>
+                <target>${java.version}</target>
+                <executable>${jdk.path}/bin/javac</executable>
+                <fork>true</fork>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+  </profiles>  
 
   <reporting>
     <plugins>