`
budairenqin
  • 浏览: 201529 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Building Spring 3

 
阅读更多
最近想读下spring3的源码,决定自己构建下spring3以方便阅读源码
参考了以下资料:
Spring Team Blog:http://blog.springsource.org/2009/03/03/building-spring-3/
http://zachary-guo.iteye.com/blog/661839

一、首先确定你的机器有以下环境:
1.JDK1.6或以上版本(否则不能编译)
2.ant 1.7或以上版本
3.设置以下两个环境变量以确保编译时不会内存溢出:
JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxNewSize=512m -XX:MaxPermSize=1024m
ANT_OPTS=-Xms256m -Xmx768m -XX:MaxNewSize=256m -XX:MaxPermSize=512m

二、获取源码
用svn从以下地址获得源码
https://github.com/SpringSource/spring-framework/tags/v3.1.1.RELEASE




三、build
打开 {SRC_HOME}\build-spring-framework\build.xml
找到这一行:
<target name="precommit" depends="clean, clean-integration, test"/>
我build过程中总是单元测试不通过,所以这里我"test"去掉,
改成<target name="precommit" depends="clean, clean-integration"/>
(如果有高手解决了单元测试的问题,欢迎指点)

然后在{SRC_HOME}\build-spring-framework\ 目录下打开命令行执行 ant 命令开始build
第一次编译要下载各种依赖,所以抽烟的最好先去抽根烟,不抽烟的最好先去喝杯咖啡,总之就是时间很长



四、将源码导入Eclipse
1.首先设置下IVY_CACHE这个环境变量(spring3所有工程都依赖它)
Window -> Preferences -> Java -> Build Path -> Classpath Variables
IVY_CACHE={SRC_HOME}\ivy-cache\repository
2. File -> Import -> Existing Projects into workspace,选择项目根目录{SRC_HOME},即可导入spring全部模块,可能有几个工程会无法构建,是由于工程依赖的jar包不存在,我急性子,有问题的jar引用直接删除,最后项目都能构建了,但是还有数个工程测试代码报错,引入相关jar包,问题解决



  • 大小: 50.3 KB
  • 大小: 23.3 KB
  • 大小: 180 KB
分享到:
评论
6 楼 di1984HIT 2014-02-04  
用gradle后,真坑爹,完全不如ant么
5 楼 wilhard 2013-04-22  
分了这么多工程
4 楼 liuxingzhuriXSH 2012-11-21  
三楼下载的是源码吗?你试下不去掉test试试!
3 楼 wangling1hao 2012-11-06  
根本就不行啊,我的是spring3.1的ant后几秒钟就OK了但projects目录并没有ivy-cache目录
2 楼 budairenqin 2012-06-27  
yanqingluo 写道
验证过了,正确.
转走了哦.

欢迎转
1 楼 yanqingluo 2012-06-26  
验证过了,正确.
转走了哦.

相关推荐

    Building Spring 2 Enterprise Applications

    Build a three-tier enterprise Java applicaiton using the lastes the Spring Framework 2.x has to offer.

    Building Web Apps with Spring 5 and Angular epub

    Building Web Apps with Spring 5 and Angular 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除

    Building-REST-Services-with-Spring

    本文档将详细介绍如何使用Spring 3构建RESTful服务,并涵盖安全、发现性、错误处理等多个方面。 #### 二、构建基本的Web项目 1. **概述** 本章节主要介绍如何启动一个基本的Web应用项目,重点在于如何从传统的...

    Building Web Apps with Spring 5 and Angular azw3

    Building Web Apps with Spring 5 and Angular 英文azw3 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除

    building restful web services with spring 5 2e

    Building RESTful Web Services with Spring 5 – Second Edition: Leverage the power of Spring 5.0, Java SE 9, and Spring Boot 2.0 Find out how to implement the REST architecture to build resilient ...

    Building a Rest API with Spring

    3. 为REST API添加Spring Security:这部分详细说明了为REST API集成Spring Security的过程,包括了web.xml中的Spring Security配置、安全配置、认证入口点、登录表单的配置、认证状态的正确返回码以及认证失败时的...

    Building Spring 2 Enterprise Applications(2007.8).pdf

    《构建Spring 2企业级应用》一书是Interface21公司、Bram Smeets与Seth Ladd共同编写的,于2007年出版,主要针对的是使用Java Spring框架进行企业级应用开发的技术人员。Spring框架自2004年由Rod Johnson创建以来,...

    Building Microservices with Spring.epub

    Getting Started with Spring Microservices begins with an overview of the Spring Framework 5.0, its design patterns, and its guidelines that enable you to implement responsive microservices at scale....

    Building Web Apps with Spring 5 and Angular 无水印pdf

    Building Web Apps with Spring 5 and Angular 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有...

    Pro Spring Boot 2 An Authoritative Guide to Building MicroServices

    Pro Spring Boot 2 An Authoritative Guide to Building MicroServices, Web and Enterprise Applications, and Best Practices

    Pro Spring Boot 2第2版-2009-EPUB版

    Pro Spring Boot 2: An Authoritative Guide to Building Microservices, Web and Enterprise Applications, and Best Practices Quickly and productively develop complex Spring applications and microservices...

    Building+a+REST+API+with+Spring

    ### 3. Spring Security for a REST API #### 3.1 概览 安全性对于任何应用程序都至关重要。Spring Security为REST API提供了强大的认证和授权功能。 - **配置Spring Security**:使用`@EnableWebSecurity`注解启动...

    Building RESTful Web Services with Spring 5(2nd) epub

    Building RESTful Web Services with Spring 5(2nd) 英文epub 第2版 本资源转载自网络,如有侵权,请联系上传者或csdn删除查看此书详细信息请在美国亚马逊官网搜索此书

    Beginning Spring Boot 2 Applications and Microservices with the Spring Framework

    Spring is the most popular Java-based framework for building enterprise applications. The Spring framework provides a rich ecosystem of projects to address modern application needs, like security, ...

    Building Modern Web Apps with Spring Boot and Vaadin.pdf

    根据提供的文件信息,我们可以了解到《Building Modern Web Apps with Spring Boot and Vaadin.pdf》是一本关于使用Java语言开发现代Web应用的指南,特别强调了Spring Boot和Vaadin框架的结合使用。文件中提及的内容...

    Building Applications with Spring 5 and Kotlin

    Kotlin shares the same pragmatic, innovative and opinionated mindset as Spring, so they work well together. Spring when combined with Kotlin helps you to reach a new level of productivity. This ...

    Beginning-Spring-Boot-2.pdf

    Spring is the most popular Java-based framework for building enterprise applications. The Spring framework provides a rich ecosystem of projects to address modern application needs, like security, ...

    Spring.Essentials.178398

    Build mission-critical ...3. Accessing Data with Spring 4. Understanding WebSocket 5. Securing Your Applications 6. Building a Single-Page Spring Application 7. Integrating with Other Web Frameworks

Global site tag (gtag.js) - Google Analytics