Skip to content

Commit dc5507f

Browse files
authored
Merge branch 'master' into webendpointinfo
2 parents 9c7de15 + ccd34c6 commit dc5507f

File tree

461 files changed

+10103
-5042
lines changed

Some content is hidden

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

461 files changed

+10103
-5042
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [goekay]

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
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

Lines changed: 7 additions & 9 deletions
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:5.7.35', 'mysql:8.0', 'mariadb:10.3', 'mariadb:10.5' ]
9+
os: [ ubuntu-latest ]
10+
java: [ '21', '23' ]
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@v5
2525
- name: Set up Java ${{ matrix.Java }}
26-
uses: actions/setup-java@v2
26+
uses: actions/setup-java@v5
2727
with:
2828
java-version: ${{ matrix.java }}
29-
distribution: 'adopt'
29+
distribution: 'temurin'
3030
cache: maven
3131

3232
- name: Set up MySQL
@@ -35,11 +35,9 @@ jobs:
3535
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "CREATE DATABASE stevedb_test_2aa6a783d47d;" -v
3636
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "CREATE USER 'steve'@'%' IDENTIFIED BY 'changeme';" -v
3737
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT ALL PRIVILEGES ON stevedb_test_2aa6a783d47d.* TO 'steve'@'%';" -v
38-
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SELECT ON mysql.proc TO 'steve'@'%';" -v || true
39-
mysql -h 127.0.0.1 -P 3306 -uroot -proot -e "GRANT SUPER ON *.* TO 'steve'@'%';" -v || true
4038
4139
- name: Build with Maven
42-
run: mvn -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml
40+
run: ./mvnw -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml
4341

4442
- name: Start the app and visit signin web page
4543
run: |

.github/workflows/review.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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@v5
9+
with:
10+
fetch-depth: 0
11+
12+
- name: Set up Java
13+
uses: actions/setup-java@v5
14+
with:
15+
java-version: 21
16+
distribution: 'temurin'
17+
cache: maven
18+
19+
- name: Check with Maven
20+
run: mvn -B -V license:check --file pom.xml
21+
checkstyle:
22+
runs-on: 'ubuntu-latest'
23+
steps:
24+
- uses: actions/checkout@v5
25+
- uses: actions/setup-java@v5
26+
with:
27+
distribution: 'temurin'
28+
java-version: '17'
29+
- name: Run Checkstyle
30+
uses: nikitasavinov/checkstyle-action@master
31+
with:
32+
checkstyle_config: './checkstyle.xml'
33+
workdir: './src/main/java'
34+
reporter: 'github-pr-check'
35+
tool_name: 'checkstyle'

.mvn/wrapper/maven-wrapper.jar

58.5 KB
Binary file not shown.
Lines changed: 18 additions & 0 deletions
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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
FROM maven:3.6.1-jdk-11
1+
FROM eclipse-temurin:21-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" && \
28-
java -jar target/steve.jar
24+
./mvnw clean package -Pdocker -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" && \
25+
java -XX:MaxRAMPercentage=85 -jar target/steve.jar
2926

LICENSE-HEADER.txt

Lines changed: 2 additions & 2 deletions
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

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
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 was developed at the RWTH Aachen University and means Steckdosenverwaltung, namely socket administration in German. The aim of SteVe is to support the deployment and popularity of electric mobility, so it is easy to install and to use. SteVe provides basic functions for the administration of charge points, user data, and RFID cards for user authentication and was tested successfully in operation.
8+
SteVe started its life at the RWTH Aachen University [in 2013](https://github.com/steve-community/steve/issues/827).
9+
The name is derived from _Steckdosenverwaltung_ in German (in English: socket administration).
10+
The aim of SteVe is to support the deployment and popularity of electric mobility, so it is easy to install and to use.
11+
It provides basic functions for the administration of charge points, user data, and RFID cards for user authentication and was tested successfully in operation.
912

10-
SteVe is considered as an open platform to implement, test and evaluate novel ideas for electric mobility, like authentication protocols, reservation mechanisms for charge points, and business models for electric mobility. SteVe is distributed under [GPL](LICENSE.txt) and is free to use. If you are going to deploy SteVe we are happy to see the [logo](website/logo/managed-by-steve.pdf) on a charge point.
13+
SteVe is considered as an open platform to implement, test and evaluate novel ideas for electric mobility, like authentication protocols, reservation mechanisms for charge points, and business models for electric mobility.
14+
The project is distributed under [GPL](LICENSE.txt) and is free to use.
15+
If you are going to deploy it we are happy to see the [logo](website/logo/managed-by-steve.pdf) on a charge point.
16+
17+
## Relation to Powerfill
18+
19+
[Powerfill](https://powerfill.co/) is a SaaS company to expand beyond the basics of SteVe: While SteVe covers the basics of OCPP functionality in a DIY sense, Powerfill offers more and enterprise features with ease of use. [See the announcement](https://github.com/steve-community/steve/issues/1643) and [sign up for early access](https://powerfill.co/early-access/).
1120

1221
### Charge Point Support
1322

@@ -20,15 +29,18 @@ Electric charge points using the following OCPP versions are supported:
2029
* OCPP1.6S
2130
* OCPP1.6J
2231

32+
⚠️ Currently, Steve doesn't support [the OCPP-1.6 security whitepaper](https://openchargealliance.org/wp-content/uploads/2023/11/OCPP-1.6-security-whitepaper-edition-3-2.zip) yet (see [#100](https://github.com/steve-community/steve/issues/100)) and anyone can send events to a public steve instance once the chargebox id is known.
33+
Please, don't expose a Steve instance without knowing that risk.
34+
2335
For Charging Station compatibility please check:
24-
https://github.com/RWTH-i5-IDSG/steve/wiki/Charging-Station-Compatibility
36+
https://github.com/steve-community/steve/wiki/Charging-Station-Compatibility
2537

2638
### System Requirements
2739

2840
SteVe requires
29-
* JDK 11 (both Oracle JDK and OpenJDK are supported)
41+
* JDK 21 or newer
3042
* Maven
31-
* MariaDB 10.2.1 or later. MySQL 5.7.7 or later works as well, but especially MySQL 8 introduces more hassle. We suggest MariaDB 10.3.
43+
* MySQL or MariaDB. You should use [one of these](.github/workflows/main.yml#L11) supported versions.
3244

3345
to build and run.
3446

@@ -42,32 +54,18 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
4254

4355
Make sure MySQL is reachable via TCP (e.g., remove `skip-networking` from `my.cnf`).
4456
The following MySQL statements can be used as database initialization (adjust database name and credentials according to your setup).
45-
46-
* For MariaDB (all versions) and MySQL 5.7:
47-
```
48-
CREATE DATABASE stevedb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
49-
CREATE USER 'steve'@'localhost' IDENTIFIED BY 'changeme';
50-
GRANT ALL PRIVILEGES ON stevedb.* TO 'steve'@'localhost';
51-
GRANT SELECT ON mysql.proc TO 'steve'@'localhost';
52-
```
53-
54-
* For MySQL 8:
55-
```
56-
CREATE DATABASE stevedb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
57-
CREATE USER 'steve'@'localhost' IDENTIFIED BY 'changeme';
58-
GRANT ALL PRIVILEGES ON stevedb.* TO 'steve'@'localhost';
59-
GRANT SUPER ON *.* TO 'steve'@'localhost';
60-
```
61-
Note: The statement `GRANT SUPER [...]` is only necessary to execute some of the previous migration files and is only needed for the initial database setup. Afterwards, you can remove this privilege by executing
62-
```
63-
REVOKE SUPER ON *.* FROM 'steve'@'localhost';
64-
```
57+
58+
```
59+
CREATE DATABASE stevedb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
60+
CREATE USER 'steve'@'localhost' IDENTIFIED BY 'changeme';
61+
GRANT ALL PRIVILEGES ON stevedb.* TO 'steve'@'localhost';
62+
```
6563
6664
2. Download and extract tarball:
6765
6866
You can download and extract the SteVe releases using the following commands (replace X.X.X with the desired version number):
6967
```
70-
wget https://github.com/RWTH-i5-IDSG/steve/archive/steve-X.X.X.tar.gz
68+
wget https://github.com/steve-community/steve/archive/steve-X.X.X.tar.gz
7169
tar xzvf steve-X.X.X.tar.gz
7270
cd steve-X.X.X
7371
```
@@ -80,14 +78,14 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
8078
- You _must_ change [web interface credentials](src/main/resources/config/prod/main.properties#L17-L18)
8179
- You _can_ access the application via HTTPS, by [enabling it and setting the keystore properties](src/main/resources/config/prod/main.properties#L32-L35)
8280
83-
For advanced configuration please see the [Configuration wiki](https://github.com/RWTH-i5-IDSG/steve/wiki/Configuration)
81+
For advanced configuration please see the [Configuration wiki](https://github.com/steve-community/steve/wiki/Configuration)
8482
8583
4. Build SteVe:
8684
8785
To compile SteVe simply use Maven. A runnable `jar` file containing the application and configuration will be created in the subdirectory `steve/target`.
8886
8987
```
90-
# mvn package
88+
# ./mvnw package
9189
```
9290
9391
5. Run SteVe:
@@ -100,13 +98,13 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
10098
10199
# Docker
102100
103-
If you prefer to build and start this project via docker (you can skip the steps 1, 4 and 5 from above), this can be done as follows: `docker-compose up -d`
101+
If you prefer to build and start this project via docker (you can skip the steps 1, 4 and 5 from above), this can be done as follows: `docker compose up -d`
104102
105-
Because the docker-compose file is written to build the project for you, you still have to change the project configuration settings from step 3.
103+
Because the docker compose file is written to build the project for you, you still have to change the project configuration settings from step 3.
106104
Instead of changing the [main.properties in the prod directory](src/main/resources/config/prod/main.properties), you have to change the [main.properties in the docker directory](src/main/resources/config/docker/main.properties). There you have to change all configurations which are described in step 3.
107-
The database password for the user "steve" has to be the same as you have configured it in the docker-compose file.
105+
The database password for the user "steve" has to be the same as you have configured it in the docker compose file.
108106
109-
With the default docker-compose configuration, the web interface will be accessible at: `http://localhost:8180`
107+
With the default docker compose configuration, the web interface will be accessible at: `http://localhost:8180`
110108
111109
# Kubernetes
112110
@@ -126,19 +124,18 @@ To access this publicaly, you'll also have to setup an ingress using something l
126124
127125
# Ubuntu
128126
129-
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
127+
You'll find a tutorial how to prepare Ubuntu for SteVe here: https://github.com/steve-community/steve/wiki/Prepare-Ubuntu-VM-for-SteVe
130128
131129
# AWS
132130
133-
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
131+
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
134132
135133
# First Steps
136134
137135
After SteVe has successfully started, you can access the web interface using the configured credentials under:
138136
139137
http://<your-server-ip>:<port>/steve/manager
140138
141-
The default port number is 8080.
142139
143140
### Add a charge point
144141
@@ -172,7 +169,7 @@ If you are in the EU and offer vehicle charging to other people using SteVe, kee
172169
173170
Are you having issues?
174171
-----
175-
See the [FAQ](https://github.com/RWTH-i5-IDSG/steve/wiki/FAQ)
172+
See the [FAQ](https://github.com/steve-community/steve/wiki/FAQ)
176173
177174
Acknowledgments
178175
-----

src/main/resources/checkstyle.xml renamed to checkstyle.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
<property name="message" value="Line has trailing spaces."/>
3535
</module>
3636

37+
<!-- Checks for Size Violations. -->
38+
<!-- See http://checkstyle.sf.net/config_sizes.html -->
39+
<module name="LineLength">
40+
<property name="max" value="120"/>
41+
</module>
42+
3743
<module name="TreeWalker">
3844

3945
<!-- <property name="cacheFile" value="${checkstyle.cache.file}"/> -->
@@ -88,9 +94,6 @@
8894

8995
<!-- Checks for Size Violations. -->
9096
<!-- See http://checkstyle.sf.net/config_sizes.html -->
91-
<module name="LineLength">
92-
<property name="max" value="120"/>
93-
</module>
9497
<module name="MethodLength"/>
9598
<module name="ParameterNumber"/>
9699

@@ -125,7 +128,7 @@
125128

126129
<!-- Checks for common coding problems -->
127130
<!-- See http://checkstyle.sf.net/config_coding.html -->
128-
<module name="AvoidInlineConditionals"/>
131+
<!-- <module name="AvoidInlineConditionals"/> -->
129132
<module name="EmptyStatement"/>
130133
<module name="EqualsHashCode"/>
131134
<!-- <module name="HiddenField"/> -->

0 commit comments

Comments
 (0)