1. Codecov.io Exceptions (codecov.yml)

ignore:
  - "**/*View.java"               # Views
  - "**/*Skin.java"               # Skins
  - "**/WorkbenchModule.java"     # Abstract class cannot be tested: Module
  - "**/View.java"                # Interface: View
  - "**/Presenter.java"           # Abstract class: Presenter
  - "**/Dialog*Content.java"      # Dialog View Controls
  - "**/PrettyScrollPane.java"    # Purely View Control

2. Maven pom.xml: workbenchfx-core

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.dlsc.workbenchfx</groupId>
    <artifactId>workbenchfx-core</artifactId>
    <version>2.1.0</version>
    <packaging>jar</packaging>

    <distributionManagement>
        <repository>
            <id>bintray-dlsc-oss-repository</id>
            <name>dlsc-oss-repository</name>
            <url>
                https://api.bintray.com/maven/dlsc-oss/repository/WorkbenchFX/;publish=1
            </url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>bintray-jerady-maven</id>
            <name>bintray</name>
            <url>https://dl.bintray.com/jerady/maven</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>bintray-jerady-maven</id>
            <name>bintray-plugins</name>
            <url>https://dl.bintray.com/jerady/maven</url>
        </pluginRepository>
    </pluginRepositories>

    <properties>
        <checkstyle.path>../config/checkstyle/checkstyle.xml</checkstyle.path>

        <!-- Java 8 only -->
        <java.version>1.8</java.version>
        <!-- Java 9 only
        <java.version>9</java.version>
        -->

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- JUnit -->
        <junit.version>4.12</junit.version>
        <junit.jupiter.version>5.2.0</junit.jupiter.version>
        <junit.vintage.version>5.2.0</junit.vintage.version>
        <junit.platform.version>1.2.0</junit.platform.version>
    </properties>

    <build>
        <plugins>
            <!-- Java Compiler -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <compilerId>javac-with-errorprone</compilerId>
                    <forceJavacCompilerUse>true</forceJavacCompilerUse>
                    <!-- maven-compiler-plugin defaults to targeting Java 5, but our
                         javac only supports >=6 -->
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <showWarnings>true</showWarnings>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-compiler-javac-errorprone</artifactId>
                        <version>2.8.3</version>
                    </dependency>
                    <!-- override plexus-compiler-javac-errorprone's dependency on
                         Error Prone with the latest version -->
                    <dependency>
                        <groupId>com.google.errorprone</groupId>
                        <artifactId>error_prone_core</artifactId>
                        <version>2.3.1</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- Packaging -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <force>true</force>
                    <windowtitle>WorkbenchFX API</windowtitle>
                    <additionalJOptions>
                        <additionalJOption>-J-Djavafx.javadoc=true</additionalJOption>
                        <!-- Java 9 only
                        <additionalJOption>-html5</additionalJOption>
                        -->
                    </additionalJOptions>
                    <docfilessubdirs>true</docfilessubdirs>
                    <tags>
                        <tag>
                            <name>defaultValue</name>
                            <placement>a</placement>
                            <head>Default Value:</head>
                        </tag>
                        <tag>
                            <name>apiNote</name>
                            <placement>a</placement>
                            <head>API Note:</head>
                        </tag>
                        <tag>
                            <name>implSpec</name>
                            <placement>a</placement>
                            <head>Implementation Requirements:</head>
                        </tag>
                        <tag>
                            <name>implNote</name>
                            <placement>a</placement>
                            <head>Implementation Note:</head>
                        </tag>
                    </tags>
                </configuration>
                <executions>
                    <execution>
                        <id>make-docs

                        </id> <!-- this is used for inheritance merges -->
                        <phase>package
                        </phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Checkstyle -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.0.0</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>8.11</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <configLocation>${checkstyle.path}</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <includeTestSourceDirectory>false</includeTestSourceDirectory>
                    <failOnViolation>true</failOnViolation>
                    <violationSeverity>warning</violationSeverity>
                </configuration>
                <executions>
                    <execution>
                        <id>verify-style</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Generates CodeCoverage Report -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Execute Tests (JUnit / Spock) -->
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
                <configuration>
                    <excludedGroups>slow</excludedGroups>
                    <includes>
                        <include>**/*Spec.java</include>
                        <include>**/*Test.java</include>
                    </includes>
                </configuration>
            </plugin>

            <!-- Groovy Compiler for Spock Tests -->
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>1.6.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compileTests</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Add Groovy tests folder as test source -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>add-test-source</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/test/groovy</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <dependencies>
        <!-- *** Compile *** -->
        <!-- Libraries -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>26.0-jre</version>
        </dependency>

        <dependency>
            <groupId>de.jensd</groupId>
            <artifactId>fontawesomefx-commons</artifactId>
            <version>8.15</version>
        </dependency>
        <dependency>
            <groupId>de.jensd</groupId>
            <artifactId>fontawesomefx-fontawesome</artifactId>
            <version>4.7.0-5</version>
        </dependency>
        <dependency>
            <groupId>de.jensd</groupId>
            <artifactId>fontawesomefx-materialdesignfont</artifactId>
            <version>1.7.22-4</version>
        </dependency>

        <!-- Java 9 only
        <dependency>
            <groupId>de.jensd</groupId>
            <artifactId>fontawesomefx-commons</artifactId>
            <version>9.1.2</version>
        </dependency>
        <dependency>
            <groupId>de.jensd</groupId>
            <artifactId>fontawesomefx-fontawesome</artifactId>
            <version>4.7.0-9.1.2</version>
        </dependency>
        <dependency>
            <groupId>de.jensd</groupId>
            <artifactId>fontawesomefx-materialdesignfont</artifactId>
            <version>2.0.26-9.1.2</version>
        </dependency>
        -->

        <!-- Logging -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.11.1</version>
        </dependency>

        <!-- *** Test *** -->
        <!-- JUnit 5 Testing Framework -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- JUnit 4 Engine for JUnit 5, is needed for Spock to work -->
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>${junit.vintage.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- Spock Testing Framework -->
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>1.1-groovy-2.4</version>
            <scope>test</scope>
        </dependency>
        <dependency> <!-- enables mocking of classes (in addition to interfaces) -->
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>1.8.16</version>
            <scope>test</scope>
        </dependency>
        <dependency> <!-- enables mocking of classes without default constructor (together with CGLIB) -->
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>2.6</version>
            <scope>test</scope>
        </dependency>
        <!-- TestFX for JavaFX Testing -->
        <dependency>
            <groupId>org.testfx</groupId>
            <artifactId>testfx-core</artifactId>
            <version>4.0.13-alpha</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testfx</groupId>
            <artifactId>testfx-junit5</artifactId>
            <version>4.0.13-alpha</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testfx</groupId>
            <artifactId>testfx-spock</artifactId>
            <version>4.0.13-alpha</version>
            <scope>test</scope>
        </dependency>
        <!-- Testing Utilities -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.21.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.10.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>3.1.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>

3. Travis Configuration File (.travis.yml)

language: java

sudo: false   # Linux OS: run in container

# Java 8 only
jdk: oraclejdk8
# Java 9 only
#jdk: oraclejdk9

addons:
  apt:
    packages:
    - p7zip-full
#    - oracle-java9-installer
# Java 9 only

env:
  global:
    - CODECOV_TOKEN=127975b3-f83a-48d5-8594-69981bfbab1a

before_install:
  - if [[ "${TRAVIS_OS_NAME}" == linux ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi

install: true

before_script:
#  - if [[ "${TRAVIS_OS_NAME}" == osx ]]; then brew update; brew cask reinstall caskroom/versions/java9; fi
# Java 9 only

cache:
  directories:
  - $HOME/.m2

script: mvn test -B

after_success:
  - bash <(curl -s https://codecov.io/bash)

before_deploy:
  - ./before_deploy.sh
deploy:
  provider: releases
  api_key:
    secure: VNCxklOYn6kDXNNaBOh/mPKo7X9RQ0FSWDeyAcTVZLhry8Q9srGkf8tqmuYRDJIdBlDGmjNEU93Rin+RwL10IIQoduIozTMmpB+Di1YfkTLNe4LZo/2WHLgViwDRauHJ+dECSSG3zFEZndzsndyqINkw9zLfD4I136L5Vue27foTLNiRSp0J2qWw5Frnyq5dKzX9Y/JEVdVa5s7SHAFvukjeHE5gW0HUtF+gfghw7fnawUyAKJJkpc/Nr11ij8vD9/ifZuzEJkKiQ2nSvKT082btD+tIHhh6jRKed8kCEOR+uJxFc93ZXFLH2GsUvKMgUrKdeGXfGbMET2+7K6KmOvjP73a79Z911QwBEDsek34ldO7vVIG9NUD7L58W15nB/gJhH5COGfP3C/iO5M4+fvaddvJ+tYz/JtNDkHFiUqlrjnptFloWEgJqaVfnLnL1v05JYvKYutbBWL9uTRC8UAMlMJkK4tu0Yc1HyQWp2I69klgWYMHbrQhONDTlgE0clkLhA5kIjFXnbxul6M6IaWogPbAXkFZA+CH9Y1kj3znJo9U6txiBvnAznm/Sk0I9g/+zq3Xa/yEO3SN+b8iKX21iXrOsBe7bsJQoVvAnlJ8NEvPwRwgo+TzDzAWiCNx310WonbNnIw0MFqw3A8X4OwVbFvzRfkmjnlgztvx41HY=
  file_glob: true
  file:
    - javadoc.zip
    - workbenchfx-core/target/*core*
    - workbenchfx-demo/target/*demo*
    - documentation.zip
  skip_cleanup: true
  on:
    repo: FHNW-IP5-IP6/WorkbenchFX
    tags: true
    branch: master