[Deprecated] Tutorial 0 Running Wegas - Heigvd/Wegas GitHub Wiki

Installing Wegas

git clone git://github.com/Heigvd/Wegas.git Wegas
cd Wegas
git submodule init
git submodule update
  • In Netbeans, right-click on wegas-project and click build skip-test in the custom menu
  • In Netbeans, right-click on wegas-app and click run

Advanced configuration

  • Post editor pages (to see user preferences page)
    1. Open file wegas-app/db/wegas-app-pages.json
    2. Sending json to http://localhost:8080/Wegas/rest/GameModel/0/Page using POST method and application/json for the Content-type header parameter.
  • Create PostgreSQL Connection pool (not required if launching from Netbeans, since it will automatically use glassfish-resources.xml)
asadmin create-jdbc-connection-pool --datasourceclassname org.postgresql.ds.PGSimpleDataSource \
    --restype javax.sql.DataSource \
    --property portNumber=5432:password=1234:user=user:serverName=localhost:databaseName=wegas_dev jdbc/wegas_dev_pool
asadmin ping-connection-pool jdbc/wegas_dev_pool
asadmin create-jdbc-resource --connectionpoolid jdbc/wegas_dev_pool jdbc/wegas_dev  
  • Setting up properties Put a wegas-override.properties file in the classpath (GLASSFISHINSTALL/domains/YOURDOMAIN/lib/classes). This file will override wegas.properties. Typically contains system dependant and private properties.

Netbeans configuration

In the NetBeans installation directory (e.g. C:\Program Files\NetBeans 7.x), edit the etc\netbeans.conf startup configuration. (On both Windows 7 and Linux, you will need to edit the permissions on this file to grant your user the rights to modify it.)

  • optional To increase the heap memory available to the IDE, replace the -J-Xms32m JVM parameter with the following: -J-Xms384m
  • optional Add the following parameters to improve garbage collection performance: -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled
  • optional If you ever connect through a VPN, the following JVM setting will prevent connection refusals when accessing network resources (e.g. SVN and Maven repositories) through the IDE: -J-Djava.net.preferIPv4Stack=true¨