This repository contains parent POMs for FIT CTU’s projects. All faculty projects should use one of these parents.
This is the root parent with basic plugins and profiles. It automatically checks classpath for duplicate classes with duplicate-finder, checks Java code with checkstyle (rules are defined in checkstyle.xml), runs integration tests, collects metrics for code coverage analysis (when ci profile enabled), deploys sources and JavaDocs in deploy phase etc.
It’s preconfigured to deploy artifacts to the faculty repository (more info), but it also provides profile bintray-deploy for deploying artifacts to Bintray / jCenter (a pain-free gateway to Maven Central) and sonatype-deploy for deploying artifacts to Sonatype OSS (a painful gateway to Maven Central).
- java.version
-
Version of JDK to compile sources for (default is 1.7).
- slf4j.version
-
Version of slf4j-api to use.
- ci
-
General profile for CI to analyze code coverage (uses JaCoCo). It should be activated automatically on CI environments.
- travis-ci
-
Profile for Travis CI to submit code coverage to Coveralls. This profile is for public projects only. It’s activated automatically on Travis.
- bintray-deploy
-
Profile for deploying artifacts to Bintray.
- sonatype-deploy
-
Profile for deploying artifacts to Sonatype OSS.
Add this to the top of your POM:
<parent>
<groupId>cz.cvut.fit.maven</groupId>
<artifactId>root-parent</artifactId>
<version>2.3.1</version>
</parent>
If you want to use Travis with Coveralls, put .travis.yml
to the root of your repository:
language: java
sudo: false
jdk:
- openjdk7
- oraclejdk8
script:
- 'mvn verify -B'
after_success:
- 'mvn jacoco:report coveralls:jacoco'
inherits from root-parent
Parent for projects that uses Groovy.
- groovy.version
-
Version of groovy to use.
- groovy-compiler.version
-
Version of groovy-eclipse-compiler to use.
- groovy-batch.version
-
Version of groovy-eclipse-batch to use.
Add this to the top of your POM:
<parent>
<groupId>cz.cvut.fit.maven</groupId>
<artifactId>groovy-parent</artifactId>
<version>2.3.1</version>
</parent>
If you want to use Groovy just in tests, not a production code, then redefine the groovy’s dependency scope:
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
This project is licensed under MIT license.