Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit 84f43a5

Browse files
committed
add travis and unit test
1 parent b05cd89 commit 84f43a5

File tree

2 files changed

+54
-11
lines changed

2 files changed

+54
-11
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
language: java
22

3-
install:
4-
mvn test
3+
after_success:
4+
- mvn jacoco:report coveralls:report

pom.xml

+52-9
Original file line numberDiff line numberDiff line change
@@ -249,18 +249,60 @@
249249
<finalName>${project.artifactId}</finalName>
250250
<outputDirectory>target/classes</outputDirectory>
251251
<plugins>
252+
<plugin>
253+
<groupId>org.apache.maven.plugins</groupId>
254+
<artifactId>maven-surefire-plugin</artifactId>
255+
<version>2.14.1</version>
256+
<configuration>
257+
<argLine>${argLine} -Dfile.encoding=UTF-8</argLine>
258+
<includes>
259+
<include>**/*Test.java</include>
260+
</includes>
261+
<excludes>
262+
<exclude>**/*MainTest.java</exclude>
263+
</excludes>
264+
</configuration>
265+
</plugin>
266+
267+
<plugin>
268+
<groupId>org.jacoco</groupId>
269+
<artifactId>jacoco-maven-plugin</artifactId>
270+
<version>0.7.2.201409121644</version>
271+
<configuration>
272+
<excludes>
273+
<exclude>**/*Demo.class</exclude>
274+
</excludes>
275+
</configuration>
276+
<executions>
277+
<execution>
278+
<id>prepare-agent</id>
279+
<goals>
280+
<goal>prepare-agent</goal>
281+
</goals>
282+
</execution>
283+
</executions>
284+
</plugin>
285+
286+
<plugin>
287+
<groupId>org.eluder.coveralls</groupId>
288+
<artifactId>coveralls-maven-plugin</artifactId>
289+
<version>3.1.0</version>
290+
</plugin>
291+
252292
<plugin>
253293
<groupId>org.apache.maven.plugins</groupId>
254294
<artifactId>maven-clean-plugin</artifactId>
255295
<version>2.5</version>
256296
<inherited>true</inherited>
257297
</plugin>
298+
258299
<plugin>
259300
<groupId>org.apache.maven.plugins</groupId>
260301
<artifactId>maven-dependency-plugin</artifactId>
261302
<version>2.8</version>
262303
<inherited>true</inherited>
263304
</plugin>
305+
264306
<plugin>
265307
<groupId>org.apache.maven.plugins</groupId>
266308
<artifactId>maven-compiler-plugin</artifactId>
@@ -276,6 +318,7 @@
276318
<showWarnings>true</showWarnings>
277319
</configuration>
278320
</plugin>
321+
279322
<plugin>
280323
<groupId>org.apache.maven.plugins</groupId>
281324
<artifactId>maven-jar-plugin</artifactId>
@@ -288,6 +331,7 @@
288331
</includes>
289332
</configuration>
290333
</plugin>
334+
291335
<plugin>
292336
<groupId>org.apache.maven.plugins</groupId>
293337
<artifactId>maven-source-plugin</artifactId>
@@ -302,21 +346,14 @@
302346
</execution>
303347
</executions>
304348
</plugin>
305-
<plugin>
306-
<groupId>org.apache.maven.plugins</groupId>
307-
<artifactId>maven-surefire-plugin</artifactId>
308-
<version>2.17</version>
309-
<inherited>true</inherited>
310-
<configuration>
311-
<skip>true</skip>
312-
</configuration>
313-
</plugin>
349+
314350
<plugin>
315351
<groupId>org.apache.maven.plugins</groupId>
316352
<artifactId>maven-install-plugin</artifactId>
317353
<version>2.5.1</version>
318354
<inherited>true</inherited>
319355
</plugin>
356+
320357
<plugin>
321358
<groupId>org.apache.maven.plugins</groupId>
322359
<artifactId>maven-deploy-plugin</artifactId>
@@ -326,6 +363,12 @@
326363
<updateReleaseInfo>true</updateReleaseInfo>
327364
</configuration>
328365
</plugin>
366+
367+
<plugin>
368+
<groupId>org.apache.maven.plugins</groupId>
369+
<artifactId>maven-release-plugin</artifactId>
370+
<version>2.5</version>
371+
</plugin>
329372
</plugins>
330373
</build>
331374

0 commit comments

Comments
 (0)