Installation server - t0tec/racing-2D GitHub Wiki
- Java 7 or higher
- Maven (version 2 or higher)
- Perl
- MySQL/MariaDB 5.6.x or higher
- Netbeans Java EE or Eclipse Java EE
- Tomcat Server 7.0.x (not included in Eclipse, included in Netbean Java EE)
You'll need to adjust the datasource.properties file located in racingConfig
so the application can connect to your database.
Example: for local use:
development.url=jdbc:mysql://localhost:<port MySQL>/<Database-name>
development.user=<MySQL-login>
development.password=<MySQL-password>
You can also easily configure to connect to which datasource you want:
Spring's ApllicationContext to define the datasources and DaoFactory.java to which datasource you want to connect
For now I have used Perl script to execute an SQL script to reset and recreate my database.
You 'll need to have Perl installed and the Perl modules perl-dbi
,perl-dbd-mysql
and SQL::SplitStatments
.
To run the script you'll need to do change the configuration in the script.
Example:
$config{host} = "localhost";
$config{port} = 3306;
$config{user} = "root"; # MySQL login
$config{password} = "root"; # MySQL password
Just simply run in commandline: perl resetdb.pl
to execute the script.
I'll try to make a Java solution later on without the need of Perl.
To carry out the database unit test, navigate in command line to the webapp/racing/racingDomain
directory and run mvn clean compile test
.
If you experience a problem with maven (Failed to collect dependencies) than try out this command: mvn clean install
followed by mvn test
- Open Netbeans or Eclipse and start your Tomcat server
- First run the
racingAPI
module on your tomcat server, than run theracingWeb
module on your server - Navigate to
http://localhost:8080/racingWeb/
to start the web client
NOTE: If you experience a problem with the API than you probably need to change the context path in Eclipse to api
. See this link.
Also set the context path of racingWeb client at /
(root) of your Tomcat Server.