简体   繁体   中英

create system metrics with maven java project and Travis CI and github hosted project

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

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'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM