README: use gradlew instead of gradle wrapper

add instructions for starting the postgresql docker container if the
container has been built already
This commit is contained in:
Timotheus Pokorra 2023-07-19 09:43:06 +02:00
parent 5986ca26fe
commit 796d1a0991

View File

@ -56,32 +56,22 @@ To be able to build and run the Java Spring Boot application, you need the follo
(JDK 17.x will be automatically installed by Gradle toolchain support) (JDK 17.x will be automatically installed by Gradle toolchain support)
- Gradle in some not too outdated version (7.4 will be installed via wrapper) - Gradle in some not too outdated version (7.4 will be installed via wrapper)
For Ubuntu 22.02:
sudo apt install -y openjdk-17-jdk
# see https://gradle.org/releases/ for direct link to current release 7.2.6
export VERSION=7.2.6
wget https://services.gradle.org/distributions/gradle-7.2.6-bin.zip?-.... -O gradle-${VERSION}-bin.zip
sudo unzip -d /opt/gradle gradle-${VERSION}-bin.zip
cd /opt/gradle && sudo ln -s gradle-${VERSION} latest && cd -
sudo nano /etc/profile.d/gradle.sh
export GRADLE_HOME=/opt/gradle/latest
export PATH=${GRADLE_HOME}/bin:${PATH}
sudo chmod +x /etc/profile.d/gradle.sh
source /etc/profile.d/gradle.sh
You also might need an IDE (e.g. *IntelliJ IDEA* or *Eclipse* or *VS Code* with *[STS](https://spring.io/tools)* and a GUI Frontend for *PostgreSQL* like *Postbird*. You also might need an IDE (e.g. *IntelliJ IDEA* or *Eclipse* or *VS Code* with *[STS](https://spring.io/tools)* and a GUI Frontend for *PostgreSQL* like *Postbird*.
If you have at least Docker, the Java JDK and Gradle installed in appropriate versions and in your `PATH`, then you can start like this: If you have at least Docker, the Java JDK and Gradle installed in appropriate versions and in your `PATH`, then you can start like this:
cd your-hsadmin-ng-directory cd your-hsadmin-ng-directory
gradle wrapper # downloads the configured Gradle version into the project ./gradlew # downloads the configured Gradle version into the project
source .aliases # creates some comforable bash aliases, e.g. 'gw'='./gradlew' source .aliases # creates some comforable bash aliases, e.g. 'gw'='./gradlew'
gw test # compiles and runs unit- and integration-tests gw test # compiles and runs unit- and integration-tests
# if the container has not been built yet, run this:
pg-sql-run # downloads + runs PostgreSQL in a Docker container on localhost:5432 pg-sql-run # downloads + runs PostgreSQL in a Docker container on localhost:5432
# if the container has been built already, run this:
docker start hsadmin-ng-postgres
gw bootRun # compiles and runs the application on localhost:8080 gw bootRun # compiles and runs the application on localhost:8080
# the following command should reply with "pong": # the following command should reply with "pong":