Guillermo Gefaell edited this page May 23, 2018 · 9 revisions

Welcome to the wrex wiki!

What do you need?

  • JDK 8. If you want to use 1.7 you have to change the jetty version in de Frontend pom.
  • Maven 3
  • A local database. Wrex uses a MySQL database by default, but you can use any other one.
  • Default schema is wrex. We recommend creat this schema and try out the system first before using your own schema and your own entities.
  • And IDE of your liking.

Quick start

  1. Clone repo.
  2. Edit crex-backend\src\main\resources\META-INF\persistence.xml and wrex-backend\src\test\resources\META-INF\persistence.xml with your database info.
  3. Edit wrex-backend\pom.xml.
  4. Scroll down to plugins and edit org.liquibase plugin with your database connection.
  5. Repeat 4 with sql-maven-plugin.
  6. Do mvn clean install on Backend.

Step 6 will create two tables User and Post using the file wrex-backend\src\main\resources\db_clean.sql and generate a third table using liquibase wrex-backend\src\main\resources\dbChanges\dc-changelog.xml.

  1. Do mvn jetty:run on Frontend
  2. Access the app at http//localhost:8080

Thats it. You have a MVC app with user login and register, access to the db and more goodies.

#Eclipse For using Wrex on eclipse just import as a Maven Project on the root of wrex. It should create 4 projects: api, backend, frontend and parent.

Be sure to have M2E (eclipse maven plugin) updated and with m2e-apt installed.

#Develop on Tomcat You can use Tomcat in eclipse to deploy Wrex. Just keep in mind that the url will be http//localhost:8080/wrex

#Debuing Jetty Set this enviroment variable MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n

#Chanege Jetty Port Add this to MAVEN_OPTS -Djetty.port=8090

Using JDK 1.7

  1. Edit Backend maven-compiler-plugin for 1.7
  2. Edit Frontend maven-compiler-plugin for 1.7
  3. Change jetty version to 9.2 in Frontend pom.xml. Both versions already avaliable in the pom, just uncomment desired version.
  4. Clean, install and run.

If jetty gives Permgen space exception run with: mvn jetty:run -DXX:MaxPermSize=1024m

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.