To run the application after compiling the source code, you will find in the target/out the jar file.
You have to have your source code compiled with your mysql settings set up as said in the "Database Setup" section for the jar to work.
You should then open a terminal, and do a java -jar [filename].jar
You should now see the application as it would be if compiled from your IDE.
If you have any issues please contact eliott.tardieu@etu.univ-tours.fr or guillaume.cazin@etu.univ-tours.fr
To run the source code, you want to add a configuration.
In this configuration, you will run the command "exec:java" via maven. You should also add a maven goal to "run before launch" with argument
"install" so it will compile your source code before running it.
This whole project is using maven. If you need to edit maven configuration, please modify the pom.xml profect file
attached.
Here we have the procedure to follow in order to install the database. All commands are meant to be run in bash.
- You must log in your mysql server using "mysql -u username -p".
- You will then create the database: "CREATE DATABASE drinked;".
- Then you log off from mysql and you go into the directory containing "drinked.sql".
- Once you are in the right directory, you will execute this command: "mysql -u root -p drinked < drinked.sql".
If you want to reset data to the original examples, you can remove all your data and import drinked_data.sql in your database.
- You will find in src/main/resources/fr/drinked/config/ the config.properties.example file.
- You will copy paste it in the same directory and rename it to "config.properties".
- You will then enter your database (mysql) username and password.
- As it is in a conf.properties file which was gitignored, it will never be on git, so you can safely enter your credentials, this is a simple trick to secure the application.