### ---- Using Maven ---- ### ### davidmartinho@ist.utl.pt ### ### sergio.silva@ist.utl.pt ### 1.) Setup environment Copy configuration.properties (old build.properties) to src/main/resources/configuration.properties export MAVEN_OPTS="-Xms256m -X" A) compile and assemble a war file - mvn clean package creates target/fenix-1.0-SNAPSHOT.war and target/fenix-1.0-SNAPSHOT/ B) create jar for fenix scripts (without access control) - mvn clean test -Pjar creates deploy/fenix-1.0-SNAPSHOT.jar C) compile and run with jetty - mvn clean package jetty:start jetty runs on http://localhost:8080/fenix/ The port can be changed using - mvn -Djetty.port=XXXX jetty:start D) run SQLUpdateGenerator - mvn clean test -PSQLUpdateGenerator creates or updates etc/database_operations/updates.sql E) running jetty with debugger - export MAVEN_OPTS="$MAVEN_OPTS -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n" - run C) change suspend to y if debugging startup process is needed. change address to prefered debug port 8000. F) For fenix bootstrap and initialization with a empty database please follow the instructions here: - https://fenix-ashes.ist.utl.pt/fenixWiki/FenixSetup # Troubleshooting 1) Too many open files error when running jetty - Please change limit of open files to a higher level (man ulimit) - RedHat based : http://pro.benjaminste.in/post/318453669/increase-the-number-of-file-descriptors-on-centos-and - Ubuntu : http://posidev.com/blog/2009/06/04/set-ulimit-parameters-on-ubuntu/ 2) When compiling, maven hangs while compiling jasper reports - Please try to decrease the number of threads worst case is : mvn -Djasper.threads=1 clean package