当前位置: 代码迷 >> Eclipse >> Spring3源代码移栽到eclipse中编译
  详细解决方案

Spring3源代码移栽到eclipse中编译

热度:69   发布时间:2016-04-23 13:07:56.0
Spring3源代码移植到eclipse中编译

?

Spring3源代码移植到eclipse中编译.

?

1.?? 下载spring-framework-3.0.2.RELEASE-dependencies.zip

2.???根据SVN下载3.0.6版本源码.

3.?? 在源码中执行ANT命令,要注意的几点:

?

?? Build Pre-requisites:

- javac1.6 or > must be in your system path

- ant 1.7or > must be in your system path

- setANT_OPTS as follows (to avoid out of memory errors):

??? ANT_OPTS="-XX:MaxPermSize=1024m -Xmx1024m -Dtest.vm.args='-XX:MaxPermSize=512m -Xmx1024m'"

?

编译过程中会出现几种错误,以下是解决方法:

l由于ANT版本过低,ANT升级到高版本.

l内存不足,进行设置,参见<<JVM复习总结>>:

l最后仍然会有错误,是在测试阶段有错误,无法解决.一个权宜之计是运行ant jar,只生成各项目的依赖包,而不进行源码的测试.

?

4.??以上结束后则在eclipse中设置变量ivy_cache.

5.??最后通过导入已经存在的工程,将下载的源代码导入.

  相关解决方案