report mojo: add user property for parameter dataFile (#322)

diff --git a/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml b/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml
index 5f3b653..afef34f 100644
--- a/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml
@@ -35,6 +35,8 @@
     <jacoco.port>9999</jacoco.port>
     <jacoco.classDumpDir>${project.build.directory}/classdumps</jacoco.classDumpDir>
     <jacoco.jmx>true</jacoco.jmx>
+
+    <jacoco.dataFile>${jacoco.destFile}</jacoco.dataFile>
   </properties>
 
   <build>
@@ -46,6 +48,7 @@
           <execution>
             <goals>
               <goal>prepare-agent</goal>
+              <goal>report</goal>
             </goals>
             <configuration>
               <includes>
diff --git a/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java
new file mode 100644
index 0000000..833ff9a
--- /dev/null
+++ b/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java
@@ -0,0 +1,18 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2016 Mountainminds GmbH & Co. KG and Contributors
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+public class Example {
+
+  public void sayHello() {
+    System.out.println("Hello world");
+  }
+
+}
diff --git a/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java
new file mode 100644
index 0000000..b225c79
--- /dev/null
+++ b/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2016 Mountainminds GmbH & Co. KG and Contributors
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+import org.junit.Test;
+
+public class ExampleTest {
+
+  @Test
+  public void test() {
+    new Example().sayHello();
+  }
+
+}
diff --git a/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh b/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh
index 7dc56e5..b04d400 100644
--- a/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh
@@ -39,3 +39,9 @@
 {
     throw new FileNotFoundException( "Could not find generated dump: " + file );
 }
+
+File reportDir = new File( basedir, "target/site/jacoco" );
+if ( !reportDir.isDirectory() )
+{
+    throw new RuntimeException( "Could not find generated report" );
+}
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java
index 92599a4..4bf99fc 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java
@@ -42,7 +42,7 @@
 	/**
 	 * File with execution data.
 	 */
-	@Parameter(defaultValue = "${project.build.directory}/jacoco.exec")
+	@Parameter(property = "jacoco.dataFile", defaultValue = "${project.build.directory}/jacoco.exec")
 	private File dataFile;
 
 	@Override
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index c36b564..61bbf98 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -20,6 +20,13 @@
 
 <h2>Snapshot Build @qualified.bundle.version@ (@build.date@)</h2>
 
+<h3>New Features</h3>
+<ul>
+  <li>User property <code>jacoco.dataFile</code> for parameter <code>dataFile</code>
+      of Maven <code>report</code> goal
+      (GitHub <a href="https://github.com/jacoco/jacoco/issues/322">#322</a>).</li>
+</ul>
+
 <h2>Release 0.7.7 (2016/06/06)</h2>
 
 <h3>New Features</h3>