Skip to content

Commit a978a49

Browse files
hennes-maertinsHenrik Adamski
authored and
Henrik Adamski
committed
LIBS-566 - Update to Spring 5.2.1 and Java 11 (#1)
1 parent 627a292 commit a978a49

File tree

19 files changed

+576
-339
lines changed

19 files changed

+576
-339
lines changed

.github/workflows/nightly.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: nightly
2+
3+
on:
4+
schedule:
5+
- cron: 0 0 * * *
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: setup-java
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 11
16+
17+
- uses: actions/checkout@v1
18+
19+
- name: caching
20+
uses: actions/cache@v1
21+
with:
22+
path: ~/.m2/repository
23+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24+
restore-keys: ${{ runner.os }}-maven-
25+
26+
- name: compile
27+
run: mvn clean compile test-compile
28+
29+
- name: unit-tests
30+
run: mvn surefire:test
31+
32+
- name: integration-tests
33+
run: mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe:verify
34+
35+
- name: sonar-analyse
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
run: |
39+
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
40+
mvn sonar:sonar \
41+
-Dsonar.host.url=https://sonarcloud.io/ \
42+
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
43+
-Dsonar.organization=${SONAR_ORGANIZATION} \
44+
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
45+
-Dsonar.java.binaries=./target/classes

.github/workflows/release.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
env:
11+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: setup-java
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 11
19+
20+
- name: setup-gpg
21+
env:
22+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
23+
run: echo ${GPG_PRIVATE_KEY} | base64 --decode | gpg --batch --import
24+
25+
- name: setup-maven-settings
26+
uses: s4u/maven-settings-action@v1
27+
with:
28+
servers: '[{"id": "ossrh", "username": "${OSSRH_USERNAME}", "password": "${OSSRH_PASSWORD}"}, {"id": "github", "username": "x-access-token", "password": "${GITHUB_TOKEN}"}]'
29+
properties: '[{"gpg.executable": "gpg"}, {"gpg.passphrase": "${GPG_PASSPHRASE}"}]'
30+
sonatypeSnapshots: true
31+
32+
- name: checkout
33+
uses: actions/checkout@v1
34+
35+
- name: caching
36+
uses: actions/cache@v1
37+
with:
38+
path: ~/.m2/repository
39+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
40+
restore-keys: ${{ runner.os }}-maven-
41+
42+
- name: sonar-analyse
43+
run: |
44+
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
45+
mvn clean verify sonar:sonar \
46+
-Dsonar.host.url=https://sonarcloud.io/ \
47+
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
48+
-Dsonar.organization=${SONAR_ORGANIZATION} \
49+
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
50+
-Dsonar.java.binaries=./target/classes
51+
52+
- name: deploy
53+
env:
54+
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
55+
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
56+
run: mvn deploy

.github/workflows/review.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: review
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: setup-java
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 11
16+
17+
- name: checkout
18+
uses: actions/checkout@v1
19+
20+
- name: caching
21+
uses: actions/cache@v1
22+
with:
23+
path: ~/.m2/repository
24+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25+
restore-keys: ${{ runner.os }}-maven-
26+
27+
- name: compile
28+
run: mvn clean compile test-compile
29+
30+
- name: unit-tests
31+
run: mvn surefire:test
32+
33+
- name: integration-tests
34+
run: mvn jacoco:restore-instrumented-classes failsafe:integration-test failsafe:verify
35+
36+
- name: sonar-analyse
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
run: |
40+
export GITHUB_PULL_REQUEST=$(cut -d / -f 3 <(echo ${GITHUB_REF}))
41+
export SONAR_ORGANIZATION=$(echo ${GITHUB_REPOSITORY} | cut -d / -f 1)
42+
mvn sonar:sonar \
43+
-Dsonar.host.url=https://sonarcloud.io/ \
44+
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
45+
-Dsonar.organization=${SONAR_ORGANIZATION} \
46+
-Dsonar.projectKey=${GITHUB_REPOSITORY//\//_} \
47+
-Dsonar.pullrequest.key=${GITHUB_PULL_REQUEST} \
48+
-Dsonar.java.binaries=./target/classes
49+
50+
- name: pom-analyse
51+
run: mvn enforcer:enforce

.travis.yml

-10
This file was deleted.

Jenkinsfile

-63
This file was deleted.

README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
spring-enricher
2-
============
1+
# spring-enricher
32

43
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.avides.spring/spring-enricher/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.avides.spring/spring-enricher)
5-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/214f252432944f9ea163be71e9a775c2)](https://www.codacy.com/app/avides-builds/spring-enricher?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=avides/spring-enricher&amp;utm_campaign=Badge_Grade)
6-
[![Coverage Status](https://coveralls.io/repos/github/avides/spring-enricher/badge.svg?branch=master)](https://coveralls.io/github/avides/spring-enricher?branch=master)
7-
[![Build Status](https://travis-ci.org/avides/spring-enricher.svg?branch=master)](https://travis-ci.org/avides/spring-enricher)
4+
[![Build](https://github.com/avides/spring-enricher/workflows/release/badge.svg)](https://github.com/avides/spring-enricher/actions)
5+
[![Nightly build](https://github.com/avides/spring-enricher/workflows/nightly/badge.svg)](https://github.com/avides/spring-enricher/actions)
6+
[![Coverage report](https://sonarcloud.io/api/project_badges/measure?project=avides_spring-enricher&metric=coverage)](https://sonarcloud.io/dashboard?id=avides_spring-enricher)
7+
[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=avides_spring-enricher&metric=alert_status)](https://sonarcloud.io/dashboard?id=avides_spring-enricher)
8+
[![Technical dept](https://sonarcloud.io/api/project_badges/measure?project=avides_spring-enricher&metric=sqale_index)](https://sonarcloud.io/dashboard?id=avides_spring-enricher)
89

910
#### Maven
1011
```xml
1112
<dependency>
1213
<groupId>com.avides.spring</groupId>
1314
<artifactId>spring-enricher</artifactId>
14-
<version>1.0.2.RELEASE</version>
15+
<version>2.0.0</version>
1516
</dependency>
1617
```
1718
#### Example
@@ -33,7 +34,7 @@ public class CustomerService
3334
{
3435
return customerRepository.getCustomer(id);
3536
}
36-
37+
3738
@Enriched
3839
public List<Customer> getCustomers()
3940
{
@@ -51,7 +52,7 @@ public class CustomerEnricher extends AbstractEnricher<Customer>
5152
{
5253
super(Customer.class);
5354
}
54-
55+
5556
@Override
5657
public void doEnrich(Customer customer)
5758
{
@@ -64,15 +65,15 @@ public class CustomerOutput
6465
{
6566
@Autowired
6667
private CustomerService customerService;
67-
68+
6869
public void outputCustomers()
6970
{
7071
for (Customer customer : customerService.getCustomers())
7172
{
7273
System.out.println(customer);
7374
}
7475
}
75-
76+
7677
public void outputCustomer(long id)
7778
{
7879
System.out.println(customerService.getCustomer(id));

0 commit comments

Comments
 (0)