Git Maven - onsalelocal/java-training GitHub Wiki
The page covers how to download and build the example project "safeway"
- Create a database "safeway" in your local MySQL server. If you don't know how to do it, refer Database layer
- Download http://onsalelocal.com/safeway.sql.gz and save to safeway.sql.gz
- Decompress safeway.sql.gz to safeway.sql
- Import safeway.sql with command "mysql -uroot safeway -e 'safeway.sql'"
Last time we installed Maven plugin for Eclipse. We also need to build the project from command line.
Download Maven package from http://maven.apache.org/download.cgi. Exact to a local directory. Set environment MAVEN_HOME and M2_HOME. Both should point to the directory where maven is installed. Added the bin directory to the path variable so that you can run command "mvn" anywhere. Verify the installation and settings with command "mvn -version"
I'm using Mac and git was installed already. You need to figure out how to install Git for your system.
After git installation, check out the example project with command
git clone https://github.com/onsalelocal/data-import.git
Go to the data-import/safeway directory, run "mvn jetty:run -P prod"
A lot of things will be downloaded to your local when you run the command first time. Depending on your PC performance and network speed, it could take from few minutes to ten somethings minutes. Please report me what do you get. You should be able to see sth like below eventually.
INFO: Adding the following classes declared in META-INF/services/jersey-server-components to the resource configuration: class com.sun.jersey.multipart.impl.FormDataMultiPartDispatchProvider class com.sun.jersey.multipart.impl.MultiPartConfigProvider class com.sun.jersey.multipart.impl.MultiPartReader class com.sun.jersey.multipart.impl.MultiPartWriter 2013-03-18 00:01:45.836:INFO::Started [email protected]:6666 [INFO] Started Jetty Server INFO SafewayDaoImpl.java updateTasks 30 10094 SafewayDaoImpl 2013-03-18 00:01:52,842 - Updated 80 tasks to Ready status INFO TaskProcessCenterImpl.java processTask 33 10104 TaskProcessCenterImpl 2013-03-18 00:01:52,852 - got 10 tasks for SafewayStoreTask
If you see msg above, it means some process are running to get data from safeway web site. You can use CTRL-C to exit it out.
We are getting closer. Spring Framework will be introduced next.