java spring3.3,springside3.3.4部署小结

上次看到spring高手问答,不由得想来学下springside,结果他们的wiki又被关了,googlecode上面只有src的版本,

幸亏还有个移动硬盘里有all-in-one的版本,好了,搞过来,开始学习。。

刚开始导入eclipse里面开始报错

Plugin execution not covered by lifecycle configuration:

org.apache.maven.plugins:maven-antrun-plugin:1.3:run

(execution: instrument-hibernate-entity, phase: process-classes)

在eclipse中尽管都编译成功了,但不知道怎么运行,还是跑DOS下面去运行quick-start.bat,一跑,很多错误,一团雾水,只好慢慢研究这个bat文件:

1.把自带的repository的东西拷到本地库去,白衣用的xcopy /s/e/i/h/d/y,包含了递归和更新比较

2.clean install springside下面的项目到本地库中去

3.调用eclipse:clean eclipse两个goal生成eclipse项目,这个步骤把我原先导进去的maven项目改成了dynamic web项目,害我还得一个个改回来,后来直接rem掉了

4.启动h2数据库,h2数据库有两种访问方式,http和tcp,http方式可以直接进入http形式的h2数据库管理页面,tcp是干嘛用的,给其他工具使用,搜索了下,也没发现h2有啥客户端访问的方式

5.我们的重点来了,启动应用,默认第一个应用是webservice,又分为两步

1)导入数据库,这个是最让我沮丧的地方,话说当时正在eclipse下面,因为直接跑bat看不清楚错误,所以部分工作挪到eclipse下面,结果此时又报错了

Buildfile: D:\DevWorkArea\workspace3.7\springside-3.3.4\examples\showcase\bin\build.xml

[artifact:dependencies] Downloading: org/springside/springside3-parent/3.3.4/springside3-parent-3.3.4.pom from repository central at http://repo1.maven.org/maven2

[artifact:dependencies] Unable to locate resource in repository

[artifact:dependencies] [INFO] Unable to find resource 'org.springside:springside3-parent:pom:3.3.4' in repository central (http://repo1.maven.org/maven2)

[artifact:dependencies] An error has occurred while processing the Maven artifact tasks.

[artifact:dependencies] Diagnosis:

[artifact:dependencies]

[artifact:dependencies] Unable to initialize POM pom.xml: Cannot find parent: org.springside:springside3-parent for project: org.springside.examples:showcase:war:null for project org.springside.examples:showcase:war:null

[artifact:dependencies] Unable to download the artifact from any repository

[artifact:dependencies]

居然找不到本地maven库,我已经把maven-ant-tasks-2.1.1.jar拷到eclipse自带目录下面了,顺便提下,白衣的导库,备份都是通过ant脚本来做的,很酷,用一个叫做dbunit的task来完成,酷归酷,报错依然存在,只好回到dos下面来玩,问题还是一样,build失败,我想这应该是没去找本地maven库的问题,因为我改过默认的位置,看到springside自带的ant下面有两个xml,分别是fetch.xml和get-m2.xml(想问下@XiuCalvin,这两个文件是干嘛用的,因为后来几乎没用到过,如果说get-m2.xml是去获取maven的话,事实上在脚本里maven都出现在ant前面),研究了半天没发现改什么地方。搜索了下,有人说设置M2_REPO变量,设置了,依然无效,查看了官网,看得我很心烦,都是英文,google翻译的像狗屎一样,没办法,只好把改成默认位置,居然运行成功了,可我偏偏不喜欢默认位置,只好继续看maven ant task的官网,在reference里找到localpository的配置方法

于是我在

在pom前面加上了竟然成功了,这个问题实在是郁闷,我想不通为什么在eclipse下面明明看到本地库,却跑不了,现在想来,对于ant来说,它根本不去管settings.xml下面的内容。

2)直接run。

至此,部署完成,测试通过

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值