Skip to content

Commit

Permalink
Dependency updates & build improved
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-eggers authored Jan 2, 2018
1 parent 09cb198 commit 4be665e
Show file tree
Hide file tree
Showing 4 changed files with 202 additions and 58 deletions.
16 changes: 14 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
language: java

jdk:
- oraclejdk8
install: mvn install -Dgpg.skip=true

cache:
directories:
- $HOME/.m2

install: mvn package -Dgpg.skip=true

before_install:
- sudo apt-get install jq
- wget -O ~/codacy-coverage-reporter-assembly-latest.jar $(curl https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r .assets[0].browser_download_url)

after_success:
- mvn clean test cobertura:cobertura coveralls:report
- mvn coveralls:report
- java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r target/site/jacoco/jacoco.xml
55 changes: 55 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
pipeline
{
agent any

triggers
{
cron('H H(0-5) * * *')
pollSCM('@hourly')
}

options
{
buildDiscarder(logRotator(numToKeepStr:'10'))
disableConcurrentBuilds()
skipStagesAfterUnstable()
timeout(time: 1, unit: 'HOURS')
}

stages
{
stage('Compile')
{
steps
{
sh 'mvn clean compile test-compile'
}
}

stage('Unit-Tests')
{
steps
{
sh 'mvn surefire:test'
}
}

stage('Integration-Tests')
{
steps
{
sh 'mvn failsafe:integration-test'
}
}

stage('Release')
{
when { branch "master" }

steps
{
sh 'mvn clean deploy -Dmaven.test.skip=true'
}
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SpringBoot RabbitMQ Actuator (Queue Metrics & Health-Checks)
<dependency>
<groupId>com.itelg.spring</groupId>
<artifactId>spring-rabbitmq-actuator</artifactId>
<version>0.4.0-RELEASE</version>
<version>0.5.0-RELEASE</version>
</dependency>
```

Expand Down
187 changes: 132 additions & 55 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,80 @@
<name>spring-rabbitmq-actuator</name>
<description>SpringBoot RabbitMQ actuator (Queue Metrics &amp; Health-Checks)</description>
<url>https://github.com/julian-eggers/spring-rabbitmq-actuator</url>
<version>0.4.0-RELEASE</version>
<version>0.5.0-RELEASE</version>

<properties>
<!-- System -->
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>dd.MM.yyyy HH:mm</maven.build.timestamp.format>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<!-- Testing -->
<jacoco.version>0.7.9</jacoco.version>
<powermock.version>1.7.3</powermock.version>
<easymock.version>3.5.1</easymock.version>
<!-- Build -->
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>2.10.4</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
<maven-failsafe-plugin.version>2.20.1</maven-failsafe-plugin.version>
<coveralls.version>4.3.0</coveralls.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-scm-provider-gitexe.version>1.9.5</maven-scm-provider-gitexe.version>
<github-release-plugin.version>1.2.0</github-release-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
</properties>

<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>1.5.9.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<version>1.7.5.RELEASE</version>
</dependency>

<!-- Other -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>

<!-- Testing -->
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>${easymock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
<classifier>runtime</classifier>
<version>${jacoco.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<scm>
<url>https://github.com/julian-eggers/spring-rabbitmq-actuator</url>
<connection>scm:git:https://github.com/julian-eggers/spring-rabbitmq-actuator.git</connection>
Expand All @@ -37,7 +104,7 @@
<!-- BUILD AND FILES -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
Expand All @@ -47,7 +114,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -60,7 +127,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<version>${maven-javadoc-plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -73,7 +140,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>${maven-gpg-plugin.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -86,22 +153,73 @@
</plugin>
<!-- TEST AND COVERAGE -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.7</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<format>xml</format>
<argLine>-Duser.timezone=Europe/Berlin</argLine>
<systemPropertyVariables>
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
<configuration>
<reportsDirectory>target/surefire-reports</reportsDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>default-instrument</id>
<goals>
<goal>instrument</goal>
</goals>
</execution>
<execution>
<id>default-restore-instrumented-classes</id>
<goals>
<goal>restore-instrumented-classes</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
<version>${coveralls.version}</version>
</plugin>
<!-- DEPLOYMENT -->
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>${maven-release-plugin.version}</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
Expand All @@ -112,14 +230,14 @@
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.9.4</version>
<version>${maven-scm-provider-gitexe.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>de.jutzig</groupId>
<artifactId>github-release-plugin</artifactId>
<version>1.1.1</version>
<version>${github-release-plugin.version}</version>
<executions>
<execution>
<id>github-upload</id>
Expand All @@ -138,7 +256,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<version>${nexus-staging-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
Expand All @@ -148,45 +266,4 @@
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
<version>1.4.3.RELEASE</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<version>1.6.6.RELEASE</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.22</version>
<optional>true</optional>
</dependency>

<!-- Testing -->
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>1.6.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-easymock</artifactId>
<version>1.6.6</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 4be665e

Please sign in to comment.