Reputation: 121
My teacher needs me to use a continuous integration build server so i used Travis CI and my java project is hosted on github.
It is working quite fine on Travis: https://travis-ci.org/fabiophillip/calculadoralib
But he asked me to check code metrics(lines of code, number of classes, methods etc) after the automatic build is complete... Anyone has any idea how to do that?
I have tried to use PMD, but i have contacted Travis CI to help me and they said Travis is not integrated to PMD at all.
My .travis.yml is like this:
language: java jdk: - openjdk7
script: - mvn install -DskipTests=false - mvn pmd:pmd
I am using the command pmd:pmd to create the report, but the Travis terminal gives me nothing about it... How do i get the report?
My github project is this: https://github.com/fabiophillip/calculadoralib
You can check my pom.xml there too
Upvotes: 1
Views: 332
Reputation: 509
I am using maven and I did a configuration several reports plugins (pmd, cobertura, etc) in the pom.xml file. So, I use mvn site to generate the site with all reports.
My pom.xml file is here: https://github.com/tacianosilva/designtests
The Travis is only for build tests and they use Maven. My .travis.yml:
language: java
jdk:
- oraclejdk8
before_script:
- mysql -e 'create database designtests_db;'
services:
- mysql
cache:
directories:
- '$HOME/.m2/repository'
Upvotes: 0