[Deprecated] Tutorial 0 Running Wegas - Heigvd/Wegas GitHub Wiki
Installing Wegas
- Install openJDK >= 1.8.0
- Install Payara (not glassfish!!!) >= full profile: http://www.payara.fish/downloads
- ENABLE HazelCast (payara admin console / server-config / Hazelcast)
- Install PostgreSQL: http://www.postgresql.org/download/
- Create a user with username user and password 1234.
- Create wegas_dev and wegas_test databases with owner user.
- Download JDBC PostgreSQL driver (http://jdbc.postgresql.org/download.html) and place it in GLASSFISHINSTALL*/domains/YOURDOMAIN/lib/
- Install and set up git: [http://help.github.com/win-set-up-git/]
- Clone Wegas repository and modules:
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)
- Open file wegas-app/db/wegas-app-pages.json
- 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¨