Skip to content

Commit 9cf2bb3

Browse files
committed
Merge branch 'master' into 896-migrate-from-mysql-57-to-mysql-8
# Conflicts: # .github/workflows/main.yml # README.md # pom.xml
2 parents 2ee696a + 45506e0 commit 9cf2bb3

File tree

424 files changed

+3760
-1147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

424 files changed

+3760
-1147
lines changed

.github/dependabot.yml

+4
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ updates:
1111
interval: "weekly"
1212
day: "saturday"
1313

14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"

.github/workflows/main.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
os: [ ubuntu-18.04, ubuntu-20.04 ]
10-
java: [ '11', '15' ]
11-
db: [ 'mysql:8.0', 'mariadb:10.3', 'mariadb:10.5' ]
9+
os: [ ubuntu-20.04, ubuntu-22.04 ]
10+
java: [ '11', '17' ]
11+
db: [ 'mysql:8.0', 'mariadb:10.3', 'mariadb:10.4.30', 'mariadb:10.5.21', 'mariadb:10.6.14' ]
1212
runs-on: ${{ matrix.os }}
1313
services:
1414
mysql:
@@ -21,12 +21,12 @@ jobs:
2121
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
2222

2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525
- name: Set up Java ${{ matrix.Java }}
26-
uses: actions/setup-java@v2
26+
uses: actions/setup-java@v4
2727
with:
2828
java-version: ${{ matrix.java }}
29-
distribution: 'adopt'
29+
distribution: 'temurin'
3030
cache: maven
3131

3232
- name: Set up MySQL
@@ -39,7 +39,7 @@ jobs:
3939
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SUPER ON *.* TO 'steve'@'%';" -v || true
4040
4141
- name: Build with Maven
42-
run: mvn -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml
42+
run: ./mvnw -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml
4343

4444
- name: Start the app and visit signin web page
4545
run: |

.github/workflows/review.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: analyze and review code
2+
on: [ push, pull_request ]
3+
4+
jobs:
5+
license-check:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
12+
- name: Set up Java 11
13+
uses: actions/setup-java@v4
14+
with:
15+
java-version: 11
16+
distribution: 'temurin'
17+
cache: maven
18+
19+
- name: Check with Maven
20+
run: mvn -B -V license:check --file pom.xml
21+
pmd:
22+
runs-on: 'ubuntu-latest'
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-java@v4
26+
with:
27+
distribution: 'temurin'
28+
java-version: '17'
29+
- name: Run PMD
30+
uses: pmd/pmd-github-action@v1
31+
with:
32+
version: 'latest'
33+
sourcePath: './src/main/java'
34+
rulesets: './src/main/resources/maven-pmd-plugin-default.xml'
35+
- name: Fail build if there are violations
36+
if: steps.pmd.outputs.violations != 0
37+
run: exit 1
38+
checkstyle:
39+
runs-on: 'ubuntu-latest'
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-java@v4
43+
with:
44+
distribution: 'temurin'
45+
java-version: '17'
46+
- name: Run Checkstyle
47+
uses: nikitasavinov/checkstyle-action@master
48+
with:
49+
checkstyle_config: './src/main/resources/checkstyle.xml'
50+
workdir: './src/main/java'
51+
reporter: 'github-pr-check'
52+
tool_name: 'checkstyle'

.mvn/wrapper/maven-wrapper.jar

58.5 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

Dockerfile

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
FROM maven:3.6.1-jdk-11
1+
FROM eclipse-temurin:11-jdk
22

33
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
44

55
MAINTAINER Ling Li
66

77
# Download and install dockerize.
88
# Needed so the web container will wait for MariaDB to start.
9-
ENV DOCKERIZE_VERSION v0.6.1
10-
RUN wget --no-verbose https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
11-
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
12-
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
13-
9+
ENV DOCKERIZE_VERSION v0.19.0
10+
RUN curl -sfL https://github.com/powerman/dockerize/releases/download/"$DOCKERIZE_VERSION"/dockerize-`uname -s`-`uname -m` | install /dev/stdin /usr/local/bin/dockerize
1411

1512
EXPOSE 8180
1613
EXPOSE 8443
@@ -24,6 +21,6 @@ COPY . /code
2421
# Wait for the db to startup(via dockerize), then
2522
# Build and run steve, requires a db to be available on port 3306
2623
CMD dockerize -wait tcp://mariadb:3306 -timeout 60s && \
27-
mvn clean package -Pdocker -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" && \
24+
./mvnw clean package -Pdocker -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" && \
2825
java -jar target/steve.jar
2926

LICENSE-HEADER.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
SteVe - SteckdosenVerwaltung - https://github.com/RWTH-i5-IDSG/steve
2-
Copyright (C) ${year}-${currentYear} ${owner}.
1+
${project.name} - ${project.description} - ${project.organization.url}
2+
Copyright (C) ${license.git.copyrightYears} ${owner}
33
All Rights Reserved.
44

55
This program is free software: you can redistribute it and/or modify

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
![SteVe](src/main/resources/webapp/static/images/logo.png)
22

3-
[![build and run tests](https://github.com/RWTH-i5-IDSG/steve/actions/workflows/main.yml/badge.svg)](https://github.com/RWTH-i5-IDSG/steve/actions/workflows/main.yml)
3+
[![build and run tests](https://github.com/steve-community/steve/actions/workflows/main.yml/badge.svg)](https://github.com/steve-community/steve/actions/workflows/main.yml)
44

55

66
# Introduction
77

8-
SteVe started its life at the RWTH Aachen University in 2013.
8+
SteVe started its life at the RWTH Aachen University [in 2013](https://github.com/steve-community/steve/issues/827).
99
The name is derived from _Steckdosenverwaltung_ in German (in English: socket administration).
1010
The aim of SteVe is to support the deployment and popularity of electric mobility, so it is easy to install and to use.
1111
It provides basic functions for the administration of charge points, user data, and RFID cards for user authentication and was tested successfully in operation.
@@ -26,14 +26,14 @@ Electric charge points using the following OCPP versions are supported:
2626
* OCPP1.6J
2727

2828
For Charging Station compatibility please check:
29-
https://github.com/RWTH-i5-IDSG/steve/wiki/Charging-Station-Compatibility
29+
https://github.com/steve-community/steve/wiki/Charging-Station-Compatibility
3030

3131
### System Requirements
3232

3333
SteVe requires
34-
* JDK 11 (both Oracle JDK and OpenJDK are supported)
34+
* JDK 11 (both Oracle JDK and Adoptium are supported)
3535
* Maven
36-
* MariaDB 10.3 or later. MySQL 8.0.x works as well.
36+
* MySQL or MariaDB. You should use [one of these](.github/workflows/main.yml#L11) supported versions.
3737

3838
to build and run.
3939

@@ -63,7 +63,7 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
6363
6464
You can download and extract the SteVe releases using the following commands (replace X.X.X with the desired version number):
6565
```
66-
wget https://github.com/RWTH-i5-IDSG/steve/archive/steve-X.X.X.tar.gz
66+
wget https://github.com/steve-community/steve/archive/steve-X.X.X.tar.gz
6767
tar xzvf steve-X.X.X.tar.gz
6868
cd steve-X.X.X
6969
```
@@ -76,14 +76,14 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
7676
- You _must_ change [web interface credentials](src/main/resources/config/prod/main.properties#L17-L18)
7777
- You _can_ access the application via HTTPS, by [enabling it and setting the keystore properties](src/main/resources/config/prod/main.properties#L32-L35)
7878
79-
For advanced configuration please see the [Configuration wiki](https://github.com/RWTH-i5-IDSG/steve/wiki/Configuration)
79+
For advanced configuration please see the [Configuration wiki](https://github.com/steve-community/steve/wiki/Configuration)
8080
8181
4. Build SteVe:
8282
8383
To compile SteVe simply use Maven. A runnable `jar` file containing the application and configuration will be created in the subdirectory `steve/target`.
8484
8585
```
86-
# mvn package
86+
# ./mvnw package
8787
```
8888
8989
5. Run SteVe:
@@ -122,11 +122,11 @@ To access this publicaly, you'll also have to setup an ingress using something l
122122
123123
# Ubuntu
124124
125-
You'll find a tutorial how to prepare Ubuntu for SteVe here: https://github.com/RWTH-i5-IDSG/steve/wiki/Prepare-Ubuntu-VM-for-SteVe
125+
You'll find a tutorial how to prepare Ubuntu for SteVe here: https://github.com/steve-community/steve/wiki/Prepare-Ubuntu-VM-for-SteVe
126126
127127
# AWS
128128
129-
You'll find a tutorial how to setup SteVe in AWS using Lightsail here: https://github.com/RWTH-i5-IDSG/steve/wiki/Create-SteVe-Instance-in-AWS-Lightsail
129+
You'll find a tutorial how to setup SteVe in AWS using Lightsail here: https://github.com/steve-community/steve/wiki/Create-SteVe-Instance-in-AWS-Lightsail
130130
131131
# First Steps
132132
@@ -168,7 +168,7 @@ If you are in the EU and offer vehicle charging to other people using SteVe, kee
168168
169169
Are you having issues?
170170
-----
171-
See the [FAQ](https://github.com/RWTH-i5-IDSG/steve/wiki/FAQ)
171+
See the [FAQ](https://github.com/steve-community/steve/wiki/FAQ)
172172
173173
Acknowledgments
174174
-----

docker-compose.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ volumes:
77
services:
88

99
db:
10-
image: mariadb:10.4
10+
# Pinning MariaDB to point release 10.4.30 works around the issues with the
11+
# database migrations seen with 10.4.31 in issue #1212.
12+
#
13+
# TODO: Get database migrations to work with the latest point releases of
14+
# MariaDB 10.4.
15+
image: mariadb:10.4.30
1116
ports:
1217
- 3306:3306
1318
environment:

k8s/docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM maven:3.6.1-jdk-11
1+
FROM eclipse-temurin:11-jdk
22
MAINTAINER daynnnnn
33

44
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
@@ -21,7 +21,7 @@ RUN sed -i 's|${db.user}|${env.DB_USERNAME}|g' pom.xml
2121
RUN sed -i 's|${db.password}|${env.DB_PASSWORD}|g' pom.xml
2222
RUN sed -i 's|${db.schema}|${env.DB_DATABASE}|g' pom.xml
2323

24-
RUN mvn clean package -Pkubernetes -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
24+
RUN ./mvnw clean package -Pkubernetes -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
2525

2626
CMD java -jar target/steve.jar
2727

k8s/yaml/Deployment.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ spec:
3131
- name: ADMIN_USERNAME
3232
value: ""
3333
- name: ADMIN_PASSWORD
34-
value: ""
34+
value: ""
35+
- name: WEBAPI_KEY
36+
value: "STEVE-API-KEY"
37+
- name: WEBAPI_VALUE
38+
value: ""

0 commit comments

Comments
 (0)