我要回家过年
-
下载并安装Virtual Box 4.2: https://www.virtualbox.org/wiki/Downloads
-
下载并安装Vagrant: http://vagrantup.com/
-
第一次运行时,打开命令行,进入源代码的根目录,执行(如果是windows平台,在下面的命令后面加.bat后缀):
vagrant box add base http://files.vagrantup.com/lucid32.box
vagrant up
-
下次就只需要执行下面的命令就可以使用:
vagrant up
-
如果是windows平台,用putty登录:127.0.0.1:2222,用户名/密码:vagrant/vagrant
-
如果是非Windows平台
vagrant ssh
-
进入工作主目录 - 这个虚拟机上的主目录是你宿主机执行vagrant命令的目录
cd /vagrant/trunk/tpms
mvn compile exec:java
-
顺利的话,你应该可以看到BUILD SUCCESS的字样,如有任何问题,欢迎到下面的链接上报BUG: http://bugzilla.12306ng.org/
-
在宿主机(例如Windows系统上),使用浏览器访问以下地址并能看到一堆json输出的话,恭喜你,环境同步好了: http://localhost:12306/ticket/id/1
-
要访问票池原型的话,请在宿主机上(例如Windows系统上),使用浏览器打开 <12306ngpm根目录>\trunk\web\index.htm。你应该可以试验简单的按车次查询和买票。
-
如果需要执行测试用例的话,请执行
cd /vagrant/trunk/tpms
mvn test
-
Download and install latest virtual box: https://www.virtualbox.org/wiki/Downloads
-
Download and install vagrant: http://vagrantup.com/
-
If you are run this project for the first time, change you cmd(Windows) or shell(Linux/Mac) to the root directory of this project, and run (this will create a virtual machine and setup the dev environment for you automatically):
vagrant box add base http://files.vagrantup.com/lucid32.box
vagrant up
-
next time, you just cd to the root directory of this project, and run:
vagrant up
-
For Windows platform, please login to the virtual machine by putty, below are putty settings: Host name - 127.0.0.1:2222 User name/Password - vagrant/vagrant
-
For Non Windows platform, run:
vagrant ssh
-
Now you should log on the virtual machine shell, build the project source on the virtual machine by run following:
cd /vagrant