Maven is extensively used for creating and building EasyWeb4J projects. While it is possible to develop web applications using EasyWeb4J without Maven, having it makes your life a lot easier. Hence it is highly recommended that you have Maven installed and configured in your development environment.
After extracting the EasyWeb4J binary archive, add <easyweb4j_dir>/bin to your system's PATH environment variable. This will make the scripts used to generate your applications available on your command-line.
Once EasyWeb4J is installed as above, issue the below commands to create a new EasyWeb4J web application project.
These will invoke Maven with appropriate archetype details to create a new EasyWeb4J project. Enter the groupId, artifactId, version and package details for your project when prompted.
In the pom.xml file of your project, add appropriate dependency for your JDBC driver.
Then specify the JDBC connection information for Hibernate projects in,
and for JPA projects in
EasyWeb4J projects are normal Maven projects. They can be imported into eclipse like any other Maven project in two steps.
First, add your local Maven repository to your eclipse workspace. This needs to be done once for each eclipse workspace you have, irrespective of the number of projects in the workspaces.
mvn -Declipse.workspace=<workspace-directory> eclipse:add-maven-repo
Now change to the directory which contains your EasyWeb4J project and issue the following command to convert it into an eclipse project. This needs to be performed everytime the pom.xml file of your project is edited.
mvn eclipse:eclipse -Dwtpversion=2.0
Note: Please change the wtpversion value appropriately to match with the version of WTP installed on your system.
You can also use the m2eclipse plugin for simplifying the import and management of EasyWeb4J projects in Eclipse.