diff --git a/pom.xml b/pom.xml
index 1eb9852..12d05a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
5
- org.sonatype.maven.plugin
+ org.sonatype.maven.plugin
emma-maven-plugin
1.3-SNAPSHOT
2007
@@ -129,6 +129,9 @@
src/it
+
+ ${project.build.directory}/it
+
site
verify
@@ -150,9 +153,9 @@
**/it03/b/pom.xml
-
- **/it05/pom.xml
-
+
+ **/it05/pom.xml
+
verify.bsh
@@ -163,6 +166,7 @@
integration-test
integration-test
+ install
run
diff --git a/src/it/it01/pom.xml b/src/it/it01/pom.xml
index bfe7ad7..73d6bb6 100644
--- a/src/it/it01/pom.xml
+++ b/src/it/it01/pom.xml
@@ -15,12 +15,52 @@
test
-
-
-
- org.sonatype.maven.plugin
- emma-maven-plugin
-
-
-
+
+
+ maven-2
+
+
+
+ ${basedir}
+
+
+
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+
+
+
+
+ maven-3
+
+
+
+ ${basedir}
+
+
+
+
+
+
+ maven-site-plugin
+ 3.0-beta-3
+
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+
+
+
+
+
+
+
+
diff --git a/src/it/it02/pom.xml b/src/it/it02/pom.xml
index 687da31..da96ca9 100644
--- a/src/it/it02/pom.xml
+++ b/src/it/it02/pom.xml
@@ -55,26 +55,80 @@
-
-
-
- org.sonatype.maven.plugin
- emma-maven-plugin
-
-
- ${project.build.outputDirectory}
- ${project.build.directory}/dependency
-
-
- +org.apache.commons.lang.StringUtils
- +hello.*
-
-
- src/main/java
- ${project.build.directory}/dependency-sources
-
-
-
-
-
+
+
+ maven-2
+
+
+
+ ${basedir}
+
+
+
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+
+ ${project.build.outputDirectory}
+ ${project.build.directory}/dependency
+
+
+ +org.apache.commons.lang.StringUtils
+ +hello.*
+
+
+ src/main/java
+ ${project.build.directory}/dependency-sources
+
+
+
+
+
+
+
+ maven-3
+
+
+
+ ${basedir}
+
+
+
+
+
+
+ maven-site-plugin
+ 3.0-beta-3
+
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+
+ ${project.build.outputDirectory}
+ ${project.build.directory}/dependency
+
+
+ +org.apache.commons.lang.StringUtils
+ +hello.*
+
+
+ src/main/java
+ ${project.build.directory}/dependency-sources
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/it/it03/a/.project b/src/it/it03/a/.project
deleted file mode 100644
index 79b16b0..0000000
--- a/src/it/it03/a/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- it03-a
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
-
-
diff --git a/src/it/it03/b/.project b/src/it/it03/b/.project
deleted file mode 100644
index 859757b..0000000
--- a/src/it/it03/b/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- it03-b
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
-
-
diff --git a/src/it/it03/pom.xml b/src/it/it03/pom.xml
index 205fdff..7bb49fe 100644
--- a/src/it/it03/pom.xml
+++ b/src/it/it03/pom.xml
@@ -26,20 +26,66 @@
test
-
-
-
- org.sonatype.maven.plugin
- emma-maven-plugin
-
-
- +hello.*
- +byebye.*
-
-
-
-
-
+
+
+ maven-2
+
+
+
+ ${basedir}
+
+
+
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+
+ +hello.*
+ +byebye.*
+
+
+
+
+
+
+
+ maven-3
+
+
+
+ ${basedir}
+
+
+
+
+
+
+ maven-site-plugin
+ 3.0-beta-3
+
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+
+ +hello.*
+ +byebye.*
+
+
+
+
+
+
+
+
+
+
+
a
b
diff --git a/src/it/it04/pom.xml b/src/it/it04/pom.xml
index e3af676..32f4335 100644
--- a/src/it/it04/pom.xml
+++ b/src/it/it04/pom.xml
@@ -16,24 +16,25 @@
-
-
- org.sonatype.maven.plugin
- emma-maven-plugin
-
-
- 90
-
-
-
-
-
- clean
- check
-
-
-
-
-
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+
+ 90
+
+
+
+
+
+ clean
+ check
+
+
+
+
+
diff --git a/src/it/it05/pom.xml b/src/it/it05/pom.xml
index 8ddd2da..806dbd3 100644
--- a/src/it/it05/pom.xml
+++ b/src/it/it05/pom.xml
@@ -16,30 +16,31 @@
-
-
- org.sonatype.maven.plugin
- emma-maven-plugin
-
-
- 80
-
-
- hello.Hello.*
- 100
-
-
-
-
-
-
-
- clean
- check
-
-
-
-
-
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+
+ 80
+
+
+ hello.Hello.*
+ 100
+
+
+
+
+
+
+
+ clean
+ check
+
+
+
+
+
diff --git a/src/it/it06/pom.xml b/src/it/it06/pom.xml
new file mode 100644
index 0000000..2f0ef42
--- /dev/null
+++ b/src/it/it06/pom.xml
@@ -0,0 +1,72 @@
+
+
+ 4.0.0
+ emma.test
+ it06
+ 1.0
+ EMMA plugin :: Integration test 06
+
+
+ junit
+ junit
+ 3.8.2
+ test
+
+
+
+
+ maven-2
+
+
+
+ ${basedir}
+
+
+
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+ html,xml,txt
+
+
+
+
+
+
+ maven-3
+
+
+
+ ${basedir}
+
+
+
+
+
+
+ maven-site-plugin
+ 3.0-beta-3
+
+
+
+ org.sonatype.maven.plugin
+ emma-maven-plugin
+ @project.version@
+
+ html,xml,txt
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/it/it06/src/main/java/hello/Hello.java b/src/it/it06/src/main/java/hello/Hello.java
new file mode 100644
index 0000000..18ef7c6
--- /dev/null
+++ b/src/it/it06/src/main/java/hello/Hello.java
@@ -0,0 +1,10 @@
+package hello;
+
+public class Hello
+{
+ public String hello( String name )
+ {
+ final String myName = name == null ? "world" : name;
+ return "Hello " + myName + "!";
+ }
+}
diff --git a/src/it/it06/src/test/java/hello/HelloTest.java b/src/it/it06/src/test/java/hello/HelloTest.java
new file mode 100644
index 0000000..8b80b5a
--- /dev/null
+++ b/src/it/it06/src/test/java/hello/HelloTest.java
@@ -0,0 +1,13 @@
+package hello;
+
+import junit.framework.TestCase;
+
+public class HelloTest extends TestCase
+{
+ public void testHello()
+ {
+ final Hello hello = new Hello();
+ assertEquals( "Hello world!", hello.hello( null ) );
+ assertEquals( "Hello EMMA!", hello.hello( "EMMA" ) );
+ }
+}
diff --git a/src/it/it06/verify.bsh b/src/it/it06/verify.bsh
new file mode 100644
index 0000000..028ded8
--- /dev/null
+++ b/src/it/it06/verify.bsh
@@ -0,0 +1,19 @@
+File emmaIndex = new File(basedir, "target/site/emma/index.html");
+if(!emmaIndex.exists() || emmaIndex.length() == 0) {
+ System.out.println("Missing 'index.html'");
+ return false;
+}
+
+File emmaXmlReport = new File(basedir, "target/site/emma/coverage.xml");
+if(!emmaXmlReport.exists() || emmaXmlReport.length() == 0) {
+ System.out.println("Missing 'coverage.xml'");
+ return false;
+}
+
+File emmaTxtReport = new File(basedir, "target/site/emma/coverage.txt");
+if(!emmaTxtReport.exists() || emmaTxtReport.length() == 0) {
+ System.out.println("Missing 'coverage.txt'");
+ return false;
+}
+
+return true;
diff --git a/src/main/java/org/sonatype/maven/plugin/emma/EmmaCheckMojo.java b/src/main/java/org/sonatype/maven/plugin/emma/EmmaCheckMojo.java
index a97d818..25b98c9 100644
--- a/src/main/java/org/sonatype/maven/plugin/emma/EmmaCheckMojo.java
+++ b/src/main/java/org/sonatype/maven/plugin/emma/EmmaCheckMojo.java
@@ -424,6 +424,7 @@ private File generateReport() throws MojoExecutionException
properties.setProperty( "report.xml.out.file", new File( outputDirectory, "coverage.xml" ).getAbsolutePath() );
properties.setProperty( "report.txt.out.file", new File( outputDirectory, "coverage.txt" ).getAbsolutePath() );
reporter.setPropertyOverrides( properties );
+ reporter.run();
return new File( outputDirectory, "coverage.xml" );
}
diff --git a/src/main/java/org/sonatype/maven/plugin/emma/EmmaReportMojo.java b/src/main/java/org/sonatype/maven/plugin/emma/EmmaReportMojo.java
index edd3726..c5861fa 100644
--- a/src/main/java/org/sonatype/maven/plugin/emma/EmmaReportMojo.java
+++ b/src/main/java/org/sonatype/maven/plugin/emma/EmmaReportMojo.java
@@ -152,9 +152,9 @@ public class EmmaReportMojo
protected List pluginClasspath;
/**
- * Reports format to generated (coma separated list)
+ * Reports format to generated (comma separated list)
*
- * @parameter expression="${emma.repports}" default-value="html"
+ * @parameter expression="${emma.report.formats}" default-value="html"
*/
protected String formats;