- You will need an Git Bash for this.
git clone https://github.com/atiw-sportfest/tools.git
or downloadsportfest-setup.sh
directly.- Review the
sportfest-setup.sh
(it's ininstall
in the repo) - Execute it. This will install TomEE and MariaDB into
C:\sportfest
. (C:\sportfest\tomee
resp.C:\sportfest\mariadb
.) - Unfortunately you will still need to configure TomEE manually, so continue below.
You will need to add an user to TomEE's conf/tomcat-users.xml
. To do this, add the following in between <tomcat-users></tomcat-users>
:
<user username="tomcat" password="s3cret" roles="manager-gui,manager-script" />
The file should look like this afterwards: (comments ommitted)
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<user username="tomcat" password="s3cret" roles="manager-gui,manager-script" />
</tomcat-users>
Do not start TomEE yet, wait for database configuration.
You will need to configure the JDBC connection to MariaDB.
Make your TomEE's conf/tomee.xml
look like the following (replace USER
, PASSWORD
, HOST
and DATABASE
with the corresponding credentials the setup gave you):
<?xml version="1.0" encoding="UTF-8"?>
<tomee>
<Resource id="jpaDS" type="javax.sql.DataSource">
jdbcDriver = com.mysql.jdbc.Driver
jdbcUrl = jdbc:mysql://HOST:3306/DATABASE
userName = USER
password = PASSWORD
</Resource>
<Resource id="jpaDS_unmanaged" type="javax.sql.DataSource">
jdbcDriver = com.mysql.jdbc.Driver
jdbcUrl = jdbc:mysql://HOST:3306/DATABASE
userName = USER
password = PASSWORD
jtaManaged = false
</Resource>
</tomee>
Afterwards, add the follwing properties to TomEE's conf/system.properties
.
javax.persistence.jtaDataSource = jpaDS
javax.persistence.nonJtaDataSource = jpaDS_unmanaged
# Generate schemas. Not production-ready.
openjpa.jdbc.SynchronizeMappings=buildSchema(foreignKeys=true)
You now can start TomEE and MariaDB by launching C:\sportfest\sportfest_run.bat
. (Open via Windows Explorer.)