Virgo Project-GreenPages Sample开发部署

1.开发环境

   JDK1.6.0_33, virgo-tomcat-server-3.0.3.RELEASE, Maven3.0.3, Eclipse Virgo Tooling(virgo.ide-1.0.0.201106220519-M01), OS:Ubuntu10.10, greenpages-2.5.0.RELEASE.zip

   请先安装和配置好相关环境变量,可参考本博客Linux下Java 开发环境篇!

2.部署运行

   (1)下载:http://eclipse.org/virgo/download/

   (2)打包:

   fdc@FDC:~/workspace-sts-2.7.2-1/greenpages-2.5.0.RELEASE$ mvn package

   (3) Copy 该工程需要的依赖至Virgo Tomcat Server

   执行上述命令时mvn 使用dependency:copy-dependencies 插件搜集GreenPages工程所需要的所有依赖Bundle

   (Virgo Tomcat Server不支持的),执行完package阶段后,这些第三方的依赖Bundle可在/home/fdc/workspace-

   sts-2.7.2-1/greenpages-2.5.0.RELEASE/greenpages/target/par-provided 下找到,需要将这些JAR拷贝至

   Virgo Tomcat Server下的/repository/usr 目录下。

 

    Notice that Virgo Tomcat Server will not necessarily see these dependencies unless its repository
    indexes are rebuilt. Different repositories behave differently in this respect; some are passive
    (their indexes are built only once upon startup ) and some are active (they can detect new files or
    files being removed dynamically ). The usr repository is active so there is no need to restart
    Virgo Tomcat Server when copying these files. The next time Virgo Tomcat Server is started the
    -clean option will cause Virgo Tomcat Server to re-scan the repository directories in any case.
    It is always safe to start Virgo Tomcat Server with the -clean option.

 

    (4)配置数据库

    启动数据库: fdc@FDC:~/workspace-sts-2.7.2-1/greenpages-2.5.0.RELEASE/db$ ./run.sh

    初始化数据: fdc@FDC:~/workspace-sts-2.7.2-1/greenpages-2.5.0.RELEASE/db$ ./data.sh

    (5)安装GreenPages

    复制greenpages-solution-2.5.0.RELEASE.par至Virgo Tomcat Server 下的pickup目录:

     fdc@FDC:~$ cp /home/fdc/workspace-sts-2.7.2-1/greenpages-2.5.0.RELEASE/greenpages/target/greenpages-2.5.0.RELEASE.par /home/fdc/VTS-3.0.3/pickup/

    (6) 启动VTS

    启动Virgo Tomcat Server With "-claen":

    fdc@FDC:~/VTS-3.0.3/bin$ ./startup.sh -clean

 

    查看控制台的输出日志信息,检验GreenPages工程启动:

    <DE0005I> Started par 'greenpages' version '2.5.0.RELEASE'.

    控制台默认账户密码:admin/springsource

 

3. 从Eclipse(STS)中运行GreenPages

    (1)Import Green Pages工程

    (2)配置Virgo Tomcat Server Target Runtime

    在Server视图中,配置Virgo Tomcat Server,指定JDK为JAVA_HOME中的JDK;

    (3)运行GreenPages

    Right click on the Virgo Tomcat Server instance in the Servers view and select the Add and

    Remove… menu item;

    Add greenpages-solution (which is the containing project or PAR) to the server and finish.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值