Skip to content
Rodrigo Prestes Machado edited this page Mar 12, 2018 · 9 revisions

Cooperative Editor Environment

  • The Cooperative Editor 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. In your Wildfly control panel, configure your a MySQL Datasource (Non-XA) to access the database through the following JNI name java:/CooperativeEditorDS.

Compilation, packaging and installation with Maven

  • The easiest way to use Cooperative Editor project is to install Maven on your machine. In Ubuntu, execute the following command:

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

  • After install Maven, you will need to create the settings.xml file in .m2/ directory. Thus, add this .m2/settings.xml in your home or, alternatively, add the settings.xml file in Maven installation ${maven.home}/conf/settings.xml (for more information, please check Maven Web Site). The settings.xml file will contain information to replace some configurations and deploy Cooperative Editor in Wildfly. 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</id>
             <properties>
                 <wildfly.username>the admin username in wildfly</wildfly.username>
                 <wildfly.password>the admin password in wildfly</wildfly.password>
             </properties>
         </profile>
         <profile>
             <id>CooperativeEditor</id>
             <properties>
                 <replace.url>the url of your wildly server</replace.url>
                 <replace.port>the port of your wildfly server</replace.port>
                 <replace.communication>the e-mail account</replace.communication> 
                 <replace.secret>the password of an e-mail account</replace.secret>
             </properties>
         </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>Wildfly</activeProfile>
        <activeProfile>CooperativeEditor</activeProfile>
    </activeProfiles>
</settings>
  • Download the Cooperative Editor project:

git clone https://github.com/rodrigoprestesmachado/cooperative-editor

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

mvn replacer:replace 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/cooperative-editor
cd cooperative-editor
mvn replacer:replace compiler:compile resources:resources war:war wildfly:deploy
cd ..
rm -Rf cooperative-editor
Clone this wiki locally