diff --git a/.gitignore b/.gitignore index 811cd61..678f988 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ .cache .settings/ target/ + +### for IntelliJ ### +.idea/ +**/*.iml diff --git a/jacoco-scala-maven-plugin-acceptance-tests/pom.xml b/jacoco-scala-maven-plugin-acceptance-tests/pom.xml index 892162f..2204360 100644 --- a/jacoco-scala-maven-plugin-acceptance-tests/pom.xml +++ b/jacoco-scala-maven-plugin-acceptance-tests/pom.xml @@ -3,7 +3,7 @@ 4.0.0 timezra.maven jacoco-scala-maven-plugin-acceptance-tests - 0.6.3.2-SNAPSHOT + 0.7.0-SNAPSHOT JaCoCo Scala Maven Plugin Acceptance Tests https://github.com/timezra/jacoco-scala-maven-plugin diff --git a/jacoco-scala-maven-plugin/pom.xml b/jacoco-scala-maven-plugin/pom.xml index 09257a6..048f957 100644 --- a/jacoco-scala-maven-plugin/pom.xml +++ b/jacoco-scala-maven-plugin/pom.xml @@ -4,7 +4,7 @@ timezra.maven jacoco-scala-maven-plugin maven-plugin - 0.6.3.2-SNAPSHOT + 0.7.0-SNAPSHOT JaCoCo Scala Maven Plugin https://github.com/timezra/jacoco-scala-maven-plugin @@ -118,7 +118,7 @@ org.jacoco jacoco-maven-plugin - 0.6.3.201306030806 + 0.7.0.201403182114 junit diff --git a/jacoco-scala-maven-plugin/src/main/java/timezra/maven/jacoco/scala/ReportMojo.java b/jacoco-scala-maven-plugin/src/main/java/timezra/maven/jacoco/scala/ReportMojo.java index 2622229..fea44e1 100644 --- a/jacoco-scala-maven-plugin/src/main/java/timezra/maven/jacoco/scala/ReportMojo.java +++ b/jacoco-scala-maven-plugin/src/main/java/timezra/maven/jacoco/scala/ReportMojo.java @@ -34,7 +34,6 @@ import org.jacoco.core.analysis.ICoverageNode; import org.jacoco.core.analysis.ICoverageVisitor; import org.jacoco.core.analysis.IMethodCoverage; -import org.jacoco.core.data.ExecFileLoader; import org.jacoco.core.data.ExecutionData; import org.jacoco.core.data.ExecutionDataStore; import org.jacoco.core.data.SessionInfoStore; @@ -46,6 +45,7 @@ import org.jacoco.core.internal.flow.ClassProbesVisitor; import org.jacoco.core.internal.flow.MethodProbesVisitor; import org.jacoco.core.internal.instr.InstrSupport; +import org.jacoco.core.tools.ExecFileLoader; import org.jacoco.maven.FileFilter; import org.jacoco.report.FileMultiReportOutput; import org.jacoco.report.IReportGroupVisitor; @@ -59,6 +59,8 @@ import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.Opcodes; +import static org.objectweb.asm.ClassReader.EXPAND_FRAMES; + /** * Creates a code coverage report for a single project in multiple formats (HTML, XML, and CSV). * @@ -405,7 +407,7 @@ public SanitizingAnalyzer(final ExecutionDataStore executionData, final ICoverag @Override public void analyzeClass(final ClassReader reader) { final ClassVisitor visitor = createSanitizingVisitor(CRC64.checksum(reader.b)); - reader.accept(visitor, 0); + reader.accept(visitor, EXPAND_FRAMES); } private ClassVisitor createSanitizingVisitor(final long classid) { @@ -414,7 +416,7 @@ private ClassVisitor createSanitizingVisitor(final long classid) { final StringPool stringPool = new StringPool(); final ClassProbesVisitor analyzer = new SanitizingClassAnalyzer(classid, probes, stringPool, coverageVisitor, filter); - return new ClassProbesAdapter(analyzer); + return new ClassProbesAdapter(analyzer, true); } } @@ -488,7 +490,7 @@ private static final class SanitizingClassAnalyzer extends ClassAnalyzer { private SanitizingClassAnalyzer(final long classid, final boolean[] probes, final StringPool stringPool, final ICoverageVisitor coverageVisitor, final MethodCoverageFilter filter) { - super(classid, probes, stringPool); + super(classid, true, probes, stringPool); this.stringPool = stringPool; this.probes = probes; this.coverageVisitor = coverageVisitor; diff --git a/jacoco-scalatest-maven-plugin-example/pom.xml b/jacoco-scalatest-maven-plugin-example/pom.xml index 2209952..7423969 100644 --- a/jacoco-scalatest-maven-plugin-example/pom.xml +++ b/jacoco-scalatest-maven-plugin-example/pom.xml @@ -3,7 +3,7 @@ 4.0.0 timezra.maven jacoco-scalatest-maven-plugin-example - 0.6.3.2-SNAPSHOT + 0.7.0-SNAPSHOT Example of JaCoCo and ScalaTest Code Coverage via Maven https://github.com/timezra/jacoco-scala-maven-plugin @@ -83,7 +83,7 @@ org.jacoco jacoco-maven-plugin - 0.6.3.201306030806 + 0.7.0.201403182114 pre-test @@ -96,7 +96,7 @@ timezra.maven jacoco-scala-maven-plugin - 0.6.3.1 + ${project.version} post-integration-test @@ -124,7 +124,7 @@ org.scalatest scalatest-maven-plugin - 1.0-RC1 + 1.0 ${project.build.directory}/surefire-reports . diff --git a/pom.xml b/pom.xml index 2106329..b1961ce 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ timezra.maven jacoco-scala-maven-plugin-aggregator pom - 0.6.3.2-SNAPSHOT + 0.7.0-SNAPSHOT JaCoCo Scala Maven Plugin Aggregator https://github.com/timezra/jacoco-scala-maven-plugin