Skip to content

Commit c8e49c1

Browse files
committed
Merge branch 'master' into 367-chargingprofilepurpose-missing-parameter-for-txprofile
# Conflicts: # src/main/java/de/rwth/idsg/steve/ocpp/task/ClearChargingProfileTask.java # src/main/java/de/rwth/idsg/steve/ocpp/task/SetChargingProfileTask.java # src/main/java/de/rwth/idsg/steve/service/ChargePointService16_Client.java
2 parents 64eb956 + 9fe8946 commit c8e49c1

File tree

454 files changed

+8363
-3827
lines changed

Some content is hidden

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

454 files changed

+8363
-3827
lines changed

.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-22.04, ubuntu-24.04 ]
10+
java: [ '17', '21' ]
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 17
13+
uses: actions/setup-java@v5
14+
with:
15+
java-version: 17
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:17-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/steve-community/steve
2-
Copyright (C) 2013-2019 RWTH Aachen University - Information Systems - Intelligent Distributed Systems Group (IDSG).
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: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ SteVe is considered as an open platform to implement, test and evaluate novel id
1414
The project is distributed under [GPL](LICENSE.txt) and is free to use.
1515
If you are going to deploy it we are happy to see the [logo](website/logo/managed-by-steve.pdf) on a charge point.
1616

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/).
20+
1721
### Charge Point Support
1822

1923
Electric charge points using the following OCPP versions are supported:
@@ -25,15 +29,18 @@ Electric charge points using the following OCPP versions are supported:
2529
* OCPP1.6S
2630
* OCPP1.6J
2731

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+
2835
For Charging Station compatibility please check:
2936
https://github.com/steve-community/steve/wiki/Charging-Station-Compatibility
3037

3138
### System Requirements
3239

3340
SteVe requires
34-
* JDK 11 (both Oracle JDK and OpenJDK are supported)
41+
* JDK 17 or newer
3542
* Maven
36-
* 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.
3744

3845
to build and run.
3946

@@ -47,26 +54,12 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
4754

4855
Make sure MySQL is reachable via TCP (e.g., remove `skip-networking` from `my.cnf`).
4956
The following MySQL statements can be used as database initialization (adjust database name and credentials according to your setup).
50-
51-
* For MariaDB (all versions) and MySQL 5.7:
52-
```
53-
CREATE DATABASE stevedb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
54-
CREATE USER 'steve'@'localhost' IDENTIFIED BY 'changeme';
55-
GRANT ALL PRIVILEGES ON stevedb.* TO 'steve'@'localhost';
56-
GRANT SELECT ON mysql.proc TO 'steve'@'localhost';
57-
```
58-
59-
* For MySQL 8:
60-
```
61-
CREATE DATABASE stevedb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
62-
CREATE USER 'steve'@'localhost' IDENTIFIED BY 'changeme';
63-
GRANT ALL PRIVILEGES ON stevedb.* TO 'steve'@'localhost';
64-
GRANT SUPER ON *.* TO 'steve'@'localhost';
65-
```
66-
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
67-
```
68-
REVOKE SUPER ON *.* FROM 'steve'@'localhost';
69-
```
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+
```
7063
7164
2. Download and extract tarball:
7265
@@ -92,7 +85,7 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
9285
To compile SteVe simply use Maven. A runnable `jar` file containing the application and configuration will be created in the subdirectory `steve/target`.
9386
9487
```
95-
# mvn package
88+
# ./mvnw package
9689
```
9790
9891
5. Run SteVe:
@@ -105,13 +98,13 @@ SteVe is designed to run standalone, a java servlet container / web server (e.g.
10598
10699
# Docker
107100
108-
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`
109102
110-
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.
111104
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.
112-
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.
113106
114-
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`
115108
116109
# Kubernetes
117110
@@ -143,7 +136,6 @@ After SteVe has successfully started, you can access the web interface using the
143136
144137
http://<your-server-ip>:<port>/steve/manager
145138
146-
The default port number is 8080.
147139
148140
### Add a charge point
149141

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"/> -->

docker-compose.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ 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
16+
restart: unless-stopped
1117
ports:
1218
- 3306:3306
1319
environment:
1420
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
1521
MYSQL_DATABASE: stevedb
1622
MYSQL_USER: steve
1723
MYSQL_PASSWORD: changeme
18-
1924
app:
25+
restart: unless-stopped
2026
build: .
2127
links:
2228
- "db:mariadb"
@@ -27,3 +33,4 @@ services:
2733
- "8443:8443"
2834
depends_on:
2935
- db
36+

0 commit comments

Comments
 (0)