The following User Guide is based on Mac Operating System.
Follow the steps in here.
- Download Eclipse and WebSphere Developer Tools for Eclipse
- WAS Liberty runtime can be downloaded in here.
- Alternatively you can install WAS Liberty runtime within Eclipse. In Eclipse select
File
->new
->other
; search for "server", selectserver
and go tonext
; selectIBM
->WebSphere Application Server Liberty Profile
as server type and go tonext
; selectChoose an exisiting installation
if you have already downloaded WAS Liberty runtime seperately, otherwise selectinstall from an archive or a repository
, then select theFull Platform
version of WAS Liberty runtime. After selectingManually define a new server
, it is important that the server name is left asdefaultServer
as this will be assumed to be the case in the future. - A reference can be found in here.
- Make sure Eclipse, and WebSphere Developer Tools for Eclipse, and WAS Liberty runtime are all properly installed.
##Clone projects from Gitlab: If you have set up ssh for gitlab:
$ git clone git@mrlgit.au.ibm.com:information-interaction/SMART-config.git
$ git clone https://mrlgit.au.ibm.com/information-interaction/SMART-ui.git
$ git clone https://mrlgit.au.ibm.com/information-interaction/SMART-config.git
Otherwise:
$ git clone https://mrlgit.au.ibm.com/information-interaction/SMART-engine.git
$ git clone https://mrlgit.au.ibm.com/information-interaction/SMART-ui.git
$ git clone https://mrlgit.au.ibm.com/information-interaction/SMART-config.git
- Modify environment variables
ENGINE_DIR
,UI_DIR
,CONFIG_DIR
, andWAS_DIR
in the script according to your setup.
#!/bin/bash
# change according to your setup
#######################################################
ENGINE_DIR="/Users/ruichen/Documents/IBM/SMART-engine/"
UI_DIR="/Users/ruichen/Documents/IBM/SMART-ui/"
CONFIG_DIR="/Users/ruichen/Documents/IBM/SMART-config/"
WAS_DIR="/Users/ruichen/Documents/IBM/WebSphereLiberty/"
#######################################################
DIR="$(pwd)"
cd $ENGINE_DIR
mvn clean package
cd $UI_DIR
mvn clean package
cp $CONFIG_DIR/cav.properties $WAS_DIR/usr/servers/defaultServer/cav.properties
cp $UI_DIR/target/project-smart-ui.war $WAS_DIR/usr/servers/defaultServer/dropins/project-smart-ui.war
cp $ENGINE_DIR/target/cav-1.0-SNAPSHOT.war $WAS_DIR/usr/servers/defaultServer/dropins/cav.war
cd $WAS_DIR/usr/servers/defaultServer/dropins/
rm -rf war
mkdir war
mv cav.war war/cav.war
cd war
mkdir cav
mv cav.war cav/cav.war
cd cav
unzip cav.war
rm cav.war
cd $DIR
- Open file
cav.properties
under*WebSphereLiberty/usr/servers/defaultServer/
. - Replace the value of
CONSUMER_KEY
andCONSUMER_SECRET
with your own ones. - Make sure that you have a valid Twitter account. You can get those values by creating an app at https://apps.twitter.com/
- Append the values of
list_of_users
and optionallylist_of_admins
with twitter handle and a comma "," in the end . - Note that because of the code implementation, comma seperated entires in
cav.properties
all MUST END with a comma ",".
- There is no need to build
SMART-ui
more than once as the sameproject-smart-ui.war
will be used throughout (in the current stage of development). cav.properties
inSMART-config
does not need to be copied again.- The script that you run every time you make some change in the code and want to see the change should be:
#!/bin/bash
DIR="$(pwd)"
cd $ENGINE_DIR
mvn clean package
cp $ENGINE_DIR/target/cav-1.0-SNAPSHOT.war $WAS_DIR/usr/servers/defaultServer/dropins/cav.war
cd $WAS_DIR/usr/servers/defaultServer/dropins/
rm -rf war
mkdir war
mv cav.war war/cav.war
cd war
mkdir cav
mv cav.war cav/cav.war
cd cav
unzip cav.war
rm cav.war
cd $DIR
- Note that you might need to restart the WebSphere Application Server for your change to take effect.
- Try running in an incognito-mode browser
- Authentication issues are known to occur. Try removing the files
engineConfig.json
and${twitter_handle}.oauth.properties
under$WAS_DIR/usr/servers/defaultServer/
. They are generated by successful previous authentication. - Make sure entries
is_file
,is_gnip
andis_csv
all exist incav.properties
. - Make sure you use a set of consumer key and secret only for one app.