Skip to content

Commit f55ab7a

Browse files
committed
get back code coverage report
1 parent 84b69b1 commit f55ab7a

File tree

4 files changed

+76
-25
lines changed

4 files changed

+76
-25
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ dependency-reduced-pom.xml
2020

2121
*.versionsBackup
2222
pom.xml.versionsBackup
23+
24+
jacoco.exec

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ language: java
33
jdk:
44
- oraclejdk8
55
script:
6-
- mvn clean install
6+
- mvn clean package coveralls:report -P coverage
77
after_success:
8-
- mvn cobertura:cobertura coveralls:cobertura
8+
- bash <(curl -s https://codecov.io/bash)

handlebars/pom.xml

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
<plugin>
126126
<groupId>org.apache.felix</groupId>
127127
<artifactId>maven-bundle-plugin</artifactId>
128-
<version>2.5.4</version>
128+
<version>3.5.0</version>
129129
<executions>
130130
<execution>
131131
<id>bundle-manifest</id>
@@ -181,6 +181,14 @@
181181
<scope>test</scope>
182182
</dependency>
183183

184+
<dependency>
185+
<groupId>org.jacoco</groupId>
186+
<artifactId>org.jacoco.agent</artifactId>
187+
<version>${jacoco.version}</version>
188+
<classifier>runtime</classifier>
189+
<scope>test</scope>
190+
</dependency>
191+
184192
<dependency>
185193
<groupId>junit</groupId>
186194
<artifactId>junit</artifactId>
@@ -223,4 +231,65 @@
223231
<properties>
224232
<antlr-version>4.7.1</antlr-version>
225233
</properties>
234+
235+
<profiles>
236+
<profile>
237+
<id>coverage</id>
238+
<build>
239+
<plugins>
240+
<!-- sure-fire -->
241+
<plugin>
242+
<groupId>org.apache.maven.plugins</groupId>
243+
<artifactId>maven-surefire-plugin</artifactId>
244+
<configuration>
245+
<includes>
246+
<include>**/*Test.java</include>
247+
<include>**/*Hbs.java</include>
248+
<include>**/*Issue*.java</include>
249+
</includes>
250+
<argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
251+
<systemPropertyVariables>
252+
<!-- JaCoCo runtime must know where to dump coverage: -->
253+
<jacoco-agent.destfile>target${file.separator}jacoco.exec</jacoco-agent.destfile>
254+
</systemPropertyVariables>
255+
</configuration>
256+
</plugin>
257+
258+
<plugin>
259+
<groupId>org.jacoco</groupId>
260+
<artifactId>jacoco-maven-plugin</artifactId>
261+
<version>${jacoco.version}</version>
262+
<configuration>
263+
<excludes>
264+
<exclude>**/Hbs*</exclude>
265+
</excludes>
266+
</configuration>
267+
<executions>
268+
<execution>
269+
<id>instrument</id>
270+
<phase>process-classes</phase>
271+
<goals>
272+
<goal>instrument</goal>
273+
</goals>
274+
</execution>
275+
<execution>
276+
<id>restore</id>
277+
<phase>prepare-package</phase>
278+
<goals>
279+
<goal>restore-instrumented-classes</goal>
280+
<goal>report</goal>
281+
</goals>
282+
</execution>
283+
</executions>
284+
</plugin>
285+
<!-- coveralls -->
286+
<plugin>
287+
<groupId>org.eluder.coveralls</groupId>
288+
<artifactId>coveralls-maven-plugin</artifactId>
289+
<version>4.3.0</version>
290+
</plugin>
291+
</plugins>
292+
</build>
293+
</profile>
294+
</profiles>
226295
</project>

pom.xml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184

185185
<build>
186186
<plugins>
187-
<!-- We're on 1.7 -->
187+
<!-- We're on 1.8 -->
188188
<plugin>
189189
<artifactId>maven-compiler-plugin</artifactId>
190190
<version>3.7.0</version>
@@ -250,27 +250,6 @@
250250
</executions>
251251
</plugin>
252252

253-
<!-- Coveralls -->
254-
<plugin>
255-
<groupId>org.codehaus.mojo</groupId>
256-
<artifactId>cobertura-maven-plugin</artifactId>
257-
<version>2.7</version>
258-
<configuration>
259-
<format>xml</format>
260-
<maxmem>256m</maxmem>
261-
<aggregate>true</aggregate>
262-
<instrumentation>
263-
<ignores>
264-
<ignore>com.github.jknack.handlebars.server.*</ignore>
265-
</ignores>
266-
<excludes>
267-
<exclude>com/github/jknack/handlebars/internal/Hbs*.class</exclude>
268-
<exclude>com/github/jknack/handlebars/server/Hbs*.class</exclude>
269-
</excludes>
270-
</instrumentation>
271-
</configuration>
272-
</plugin>
273-
274253
<plugin>
275254
<groupId>org.eluder.coveralls</groupId>
276255
<artifactId>coveralls-maven-plugin</artifactId>
@@ -439,6 +418,7 @@
439418
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
440419
<jackson2-version>2.1.4</jackson2-version>
441420
<jackson-version>1.9.12</jackson-version>
421+
<jacoco.version>0.8.1</jacoco.version>
442422
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssa</maven.build.timestamp.format>
443423
<timestamp>${maven.build.timestamp}</timestamp>
444424
</properties>

0 commit comments

Comments
 (0)