Build WikiSpeech:

WikiSpeech is a Java Web-Application intended to run on an Apache Tomcat server ( http://tomcat.apache.org/ ).
The application will store data in a PostgreSQL database (https://www.postgresql.org/) and on a filesystem.
WikiSpeech is build using the build system Apache Maven (https://maven.apache.org). Maven and at least Java JDK 11 must be installed on your build system. 

The build needs to know where your WikiSpeech configuration files are stored. Therefore you have to create a Maven directory .m2 and a Maven settings file .m2/settings.xml in your home folder.
(If you are already have a .m2/settings.xml file, add the XML profile element from the XML content below to your existing file.)

Content of the .m2/settings.xml file:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
 <profile>
   <id>wikispeech</id>
   <activation>
     <activeByDefault>true</activeByDefault>
   </activation>
   <properties>
     <settings.wikiSpeechConfigDir>[path_to_config_folder]</settings.wikiSpeechConfigDir>
   </properties>
  </profile>
</profiles>
</settings>

Replace [path_to_config_folder] with the file path to a directory of your choice. It should be a safe location.


Create a configuration file "[config_filename].properties" file in your [path_to_config_folder] folder.

To just build WikiSpeech you need at least the configuration file 'wikispeech_test_local_tomcat.properties' for the default profile "Test-local-Tomcat-build".
In the doc/build/ folder you can find a sample template file 'wikispeech_test_local_tomcat.properties_sample' for this configuration file.

The command

mvn package 

should already compile WikiSpeech with this configuration.  


The content of the configuration file depends on your local Apache Tomcat and PostgreSQL database installation.
A sample configuration file wikispeech.properties_sample file can be found in this directory.


Build the Web-Application-Archive (WAR) file with this Maven command:

mvn -P [configuration_profile_name] package

For example for the profile "WikiSpeech-Productive":

mvn -P WikiSpeech-Productive package

On success the wikispeech[-version].war file should be available in the target/ folder. 


Predefined configuration profiles are:

"WikiSpeech-Productive":
Production configuration including JAAS (LDAP) integration
Configuration filename: 'wikispeech.properties'

"WikiSpeech-Standalone":
Production configuration. User realm only from PostgreSQL database (via JDBC).
Configuration filename: 'wikispeech_standalone.properties'

"Test-Tomcat-Build":
Development test configuration with JAAS (LDAP) and PostgreSQL database.
Configuration filename: 'wikispeech_test.properties'

"Test-local-Tomcat-build":
Development test using a local (on your development machine) Tomcat. User realm only from PostgreSQL database (via JDBC).
Configuration filename: 'wikispeech_test_local_tomcat.properties'

