Join GitHub today
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.
- Clone repo.
- Edit crex-backend\src\main\resources\META-INF\persistence.xml and wrex-backend\src\test\resources\META-INF\persistence.xml with your database info.
- Edit wrex-backend\pom.xml.
- Scroll down to plugins and edit org.liquibase plugin with your database connection.
- Repeat 4 with sql-maven-plugin.
- 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.
- Do mvn jetty:run on Frontend
- 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. https://marketplace.eclipse.org/content/m2e-apt
#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
- Edit Backend maven-compiler-plugin for 1.7
- Edit Frontend maven-compiler-plugin for 1.7
- Change jetty version to 9.2 in Frontend pom.xml. Both versions already avaliable in the pom, just uncomment desired version.
- Clean, install and run.
If jetty gives Permgen space exception run with: mvn jetty:run -DXX:MaxPermSize=1024m