Follow these steps to set up the project:
-
Remove existing JDK and Maven installations:
- Uninstall all JDK installations and delete all JDK files from your computer.
- Remove the JDK path from your environment variables.
- Uninstall Maven and remove its path from your environment variables.
-
Install JDK and Maven:
- Download JDK 1.8.0_202 from Oracle's website.
- Download Maven from the official Maven website.
- Install JDK and Maven on your computer.
- Set the paths of JDK and Maven in your environment variables.
-
Verify the installations:
- Open the command line and run
mvn -version. If the installed Maven version is displayed, the installation was successful. - Run
java -version. If the installed Java version is displayed, the installation was successful. - Ensure that Maven is using JDK 1.8.0_202.
- Open the command line and run
-
Clone the project:
- Run
git clone https://github.com/ayoub-ait-si-ahmad/orderCraftSolution.git. - Navigate to the project directory with
cd orderCraftSolution.
- Run
-
Configure the database:
- Change the database name, user, and password in the
/WEB-INF/dispatcher-servlet.xmlfile. The configuration should look like this:<!-- DataSource configuration --> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.cj.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost:3306/yourDatabaseName"/> <property name="username" value="yourUsername"/> <property name="password" value="yourPassword"/> </bean>
- Change the database name, user, and password in the
-
Build and run the project:
- Run
mvn clean compile package. - Run
mvn tomcat7:run.
- Run
Good luck!