We use Gradle as our build system. All commands listed here follow the pattern gradle <task>'
.
If Gradle is not installed on your system you can use sh gradlew <task>
instead.
gradlew tasks
- list all tasksgradlew eclipse
- setup eclipse filesgradlew run
- start server for UI developmentgradlew bootRun
- start server for development (refreshes static resources)gradlew test
- execute unit tests (open report with open build/reports/tests/index.html
-Dtest.single=ExampleMainTest
-Pmysql
gradlew clean
- clean the projectSetup with the Gradle Integration for Eclipse plugin.
Setup by using the gradle eclipse plugin
Select "Import..." -> "Gradle Project" then build the model and import the plugins you need.
Additional stuff:
Make sure you have the following classes included for static import:
(In Eclipse under Preferences/Java/Editor/Content Assist/Favorites)
drop database weplantaforest; create database weplantaforest;
drop database weplantaforest_test; create database weplantaforest_test;
-Pmysql
, e.g. gradle test -Pmysql
@IntegrationTest({ "spring.profiles.active=test" })
into @IntegrationTest({ "spring.profiles.active=test,mysql-test" })
application-test.properties
src/main/resources/db/migration/V*.sql
scriptsrc/main/resources/db/migration/V1_2__descriptionOfMyChange.sql
./gradlew user:bootRun
./gradlew article-manager:bootRun
ui/node_modules/.bin/http-server --cors ui/client-react/
cd ui; webpack -w
Now you can open a browser window with:
open http://localhost:8080
P: I get an error while starting a gradle task.
Could not open terminal for stdout: could not get termcap entry
A: Paste following command in current before executing gradle
export GRADLE_OPTS=-Dorg.gradle.native=false