Skip to content
Guilherme Ogliari edited this page Oct 26, 2016 · 9 revisions

Sound Chat environment

  • The Sound Chat is a JEE application running in Wildfly (10.1.0.Final) with MySQL (5.5) database over an Ubuntu Server (14.04 - trusty)

MySQL configuration in Wildfly

  • (1) Deploy an MySQL JDBC driver in the Wildfly (2) configure in your Wildfly control panel a MySQL Datasource (Non-XA) to access the database and use java:/SoundChatDS as JNDI Name.

Compilation, packaging and installation with Maven

  • To use the Sound Chat project, it`s necessary that you install Maven on your machine. In Ubuntu, and run the following command:

sudo apt-get install maven (note: use maven latest)

  • After install Maven, create the settings.xml in .m2 / directory file in your home or add ${maven.home}/conf/settings.xml (for more information, please, check, Maven Web Site). This file will contain deploy settings, so, modify the below sample of settings.xml file according your server configuration:
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <profiles>
         <profile>
             <id>wildfly-context</id>
             <properties>
                 <wildfly.username> your username </wildfly.username>
                 <wildfly.password> your password </wildfly.password>
             </properties>
         </profile>
         <profile>
             <id>replace-context</id>
             <properties>
                 <replace.url> your hostname </replace.url>
                 <replace.port> your port </replace.port>
             </properties>
         </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>wildfly-context</activeProfile>
        <activeProfile>replace-context</activeProfile>
    </activeProfiles>
</settings>
  • Download the Sound Chat project:

git clone https://github.com/rodrigoprestesmachado/soundchat

  • Enter in pom.xml directory and run an Maven commad:

mvn compiler:compile resources:resources war:war wildfly:deploy

  • If you want to reinstall the application, use wildfly:redeploy

  • If you want, you can create a shell script in your Ubuntu server, for example:

#!/bin/sh
#
clear
git clone https://github.com/rodrigoprestesmachado/soundchat
cd soundchat
mvn compiler:compile resources:resources replacer:replace war:war wildfly:redeploy
cd ..
rm -Rf soundchat
Clone this wiki locally