自己动手编译apache-tomcat-6.0.41-src源码
第一步:下载apache-tomcat-6.0.41-src第二步:阅读BUILDING.txt。了解所需要的步骤。
In order to build a binary distribution version of Apache Tomcat from a source distribution, do the following:
(0) Download and Install a Java Development Kit
因为tomcat依赖于apache dbcp 源码进行编译,而dbcp依赖于JDBC规范,而不同的jdk之间JDBC规范定义的接口可能有出入。所以,这里推荐使用jdk1.5。
(1) Install Apache Ant 1.6.x on your computer
(2) Building Tomcat 6.0
(2.1) Checkout or obtain the source code for Tomcat 6.0
* Tomcat 6.0 SVN repository URL: http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/
(2.2) Building
* Go to that directory, and do:
cd ${tomcat.source}
ant download
ant
(3) Updating sources
It is recommended that you regularly update the downloaded Tomcat 6 sources using your SVN client.
(4) Rebuilds
For a quick rebuild of only modified code you can use:
cd ${tomcat.source}
ant
(5) Building the servlet and jsp API documentation
cd ${tomcat.source}
ant -f dist.xml dist-javadoc
(6) Building the extras (commons-logging, webservices etc.).
cd ${tomcat.source}
ant -f extras.xml
(7) Building a release:
cd ${tomcat.source}
ant -f dist.xml release
第三步:准备工作,安装配置JDK/ANT。
C:\Users\wsc>echo %java_home%
D:\wsc\Program Files (x86)\Java\jdk1.5.0_22
C:\Users\wsc>echo %ant_home%
D:\wsc\software\apache-ant-1.6.5-bin
C:\Users\wsc>
第四步:按照tortoise SVN,check out code。
D:\wsc\software\tomcat6.0.x>dir
驱动器 D 中的卷是 新加卷
卷的序列号是 D035-1040
D:\wsc\software\tomcat6.0.x 的目录
2014/06/2810:47 .
2014/06/2810:47 ..
2014/06/2810:36 1,136 .gitignore
2014/06/2810:36 bin
2014/06/2810:36 8,880 build.properties.default
2014/06/2810:36 36,756 build.xml
2014/06/2810:36 6,215 BUILDING.txt
2014/06/2810:36 conf
2014/06/2810:36 30,737 dist.xml
2014/06/2810:36 1,551 eclipse.classpath
2014/06/2810:36 1,191 eclipse.project
2014/06/2810:36 16,763 extras.xml
2014/06/2810:36 java
2014/06/2810:36 32,598 KEYS
2014/06/2810:36 57,695 LICENSE
2014/06/2810:36 783 NOTICE
2014/06/2811:20 output
2014/06/2810:36 9,363 RELEASE-NOTES
2014/06/2810:36 2,385 RELEASE-PLAN-6.0.txt
2014/06/2810:36 res
2014/06/2810:36 16,861 RUNNING.txt
2014/06/2810:36 2,764 STATUS.txt
2014/06/2810:36 test
2014/06/2810:36 webapps
15 个文件 225,678 字节
9 个目录 773,780,836,352 可用字节
第五步:在tomcat6.0.x(x表示开发6.0版本下的最新版本)运行ant download,下载所需要的jar包依赖,第一次下载可能需要几分钟。
D:\wsc\software\tomcat6.0.x>ant download
Buildfile: build.xml
build-manifests:
Copying 10 files to D:\wsc\software\tomcat6.0.x\output\manifests
download:
testexist:
Testingfor /usr/share/java/tomcat-native-1.1.30/tomcat-native.tar.gz
downloadfile-2:
testexist:
Testingfor /usr/share/java/tomcat-native-1.1.30/LICENSE
downloadzip-2:
proxyflags:
setproxy:
testexist:
Testingfor /usr/share/java/commons-daemon-1.0.15/commons-daemon-1.0.15.jar
downloadgz-2:
testexist:
Testingfor /usr/share/java/commons-daemon-1.0.15/commons-daemon-1.0.15-native-src.tar.gz
downloadfile-2:
testexist:
Testingfor /usr/share/java/commons-daemon-1.0.15/windows/prunmgr.exe
downloadzip-2:
proxyflags:
setproxy:
testexist:
Testingfor /usr/share/java/commons-pool-1.5.7-src/build.xml
downloadgz-2:
proxyflags:
setproxy:
testexist:
Testingfor /usr/share/java/commons-dbcp-1.3-src/build.xml
downloadgz-2:
build-manifests:
Copying 10 files to D:\wsc\software\tomcat6.0.x\output\manifests
build-tomcat-dbcp:
Copying 64 files to D:\usr\share\java\tomcat6-deps\dbcp
Moving 64 files to D:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp
Compiling 64 source files to \usr\share\java\tomcat6-deps\dbcp\classes
注意:某些输入文件使用或覆盖了已过时的 API。
注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
注意:某些输入文件使用了未经检查或不安全的操作。
注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
Building jar: D:\usr\share\java\tomcat6-deps\dbcp\tomcat-dbcp.jar
testexist:
Testingfor /usr/share/java/ecj-4.3.1/ecj-4.3.1.jar
downloadfile-2:
proxyflags:
setproxy:
testexist:
Testingfor /usr/share/java/nsis-2.46/makensis.exe
downloadzip:
BUILD SUCCESSFUL
Total time: 3 seconds
在windows下默认的依赖jar的保存路径为:
D:\usr\share\java>dir
驱动器 D 中的卷是 新加卷
卷的序列号是 D035-1040
D:\usr\share\java 的目录
2014/06/2811:19 .
2014/06/2811:19 ..
2014/06/2811:19 avalon-framework-4.1.3
2014/06/2810:52 commons-daemon-1.0.15
2014/06/2810:52 commons-dbcp-1.3-src
2014/06/2811:19 commons-logging-1.1.1
2014/06/2810:52 commons-pool-1.5.7-src
2014/06/2810:52 ecj-4.3.1
2014/06/2811:19 jaxrpc-1.1-rc4
2014/06/2811:19 log4j-1.2.12
2014/06/2811:19 logkit-1.0.1
2014/06/2810:55 nsis-2.46
2014/06/2811:19 servletapi-2.3
2014/06/2810:52 tomcat-native-1.1.30
2014/06/2810:52 tomcat6-deps
2014/06/2811:19 wsdl4j-1.6.1
0 个文件 0 字节
16 个目录 773,780,312,064 可用字节
第六步:运行ant命令。
结果如下:
D:\wsc\software\tomcat6.0.x>ant
Buildfile: build.xml
build-prepare:
Created dir: D:\wsc\software\tomcat6.0.x\output\classes
Created dir: D:\wsc\software\tomcat6.0.x\output\build
Created dir: D:\wsc\software\tomcat6.0.x\output\build\bin
Created dir: D:\wsc\software\tomcat6.0.x\output\build\conf
Created dir: D:\wsc\software\tomcat6.0.x\output\build\lib
Created dir: D:\wsc\software\tomcat6.0.x\output\build\logs
Created dir: D:\wsc\software\tomcat6.0.x\output\build\temp
Created dir: D:\wsc\software\tomcat6.0.x\output\build\webapps
compile:
Compiling 1090 source files to D:\wsc\software\tomcat6.0.x\output\classes
注意:某些输入文件使用或覆盖了已过时的 API。
注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
注意:某些输入文件使用了未经检查或不安全的操作。
注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
Copying 182 files to D:\wsc\software\tomcat6.0.x\output\classes
Copying 6 files to D:\wsc\software\tomcat6.0.x\output\classes\javax\servlet\resources
build-manifests:
Created dir: D:\wsc\software\tomcat6.0.x\output\manifests
Copying 10 files to D:\wsc\software\tomcat6.0.x\output\manifests
package:
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\annotations-api.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\servlet-api.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\jsp-api.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\el-api.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\bin\bootstrap.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\bin\tomcat-juli.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\catalina.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\catalina-tribes.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\catalina-ha.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\catalina-ant.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\tomcat-coyote.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\jasper.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\jasper-el.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\tomcat-i18n-es.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\tomcat-i18n-fr.jar
Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\tomcat-i18n-ja.jar
build-only:
build-docs:
Copying 27 files to D:\wsc\software\tomcat6.0.x\output\build\webapps
Copying 2 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev\sample
Created dir: D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs
Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\aio.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\aio.html
Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\apr.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\apr.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\balancer-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\balancer-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\building.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\building.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\cgi-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\cgi-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\changelog.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\changelog.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\class-loader-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\class-loader-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\cluster-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\cluster-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\connectors.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\connectors.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\default-servlet.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\default-servlet.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\deployer-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\deployer-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\developers.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\developers.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\extras.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\extras.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\html-manager-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\html-manager-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\index.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\index.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\introduction.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\introduction.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\jasper-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\jasper-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\jndi-datasource-examples-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\jndi-datasource-examples-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\jndi-resources-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\jndi-resources-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\logging.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\logging.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\manager-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\manager-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\maven-jars.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\maven-jars.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\mbeans-descriptor-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\mbeans-descriptor-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\monitoring.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\monitoring.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\proxy-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\proxy-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\realm-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\realm-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\security-manager-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\security-manager-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\setup.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\setup.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\ssi-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\ssi-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\ssl-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\ssl-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\virtual-hosting-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\virtual-hosting-howto.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\windows-service-howto.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\windows-service-howto.html
Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\appdev\deployment.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev\deployment.html
Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\appdev\index.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev\index.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\appdev\installation.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev\installation.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\appdev\introduction.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev\introduction.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\appdev\processes.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev\processes.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\appdev\source.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev\source.html
Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\fs-admin-apps.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\fs-admin-apps.html
Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\fs-admin-objects.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\fs-admin-objects.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\fs-admin-opers.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\fs-admin-opers.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\fs-default.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\fs-default.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\fs-invoker.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\fs-invoker.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\fs-jdbc-realm.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\fs-jdbc-realm.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\fs-jndi-realm.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\fs-jndi-realm.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\fs-memory-realm.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\fs-memory-realm.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\index.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\index.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\funcspecs\mbean-names.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs\mbean-names.html
Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\ajp.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\ajp.html
Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-channel.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-channel.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-deployer.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-deployer.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-interceptor.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-interceptor.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-listener.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-listener.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-manager.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-manager.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-membership.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-membership.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-receiver.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-receiver.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-sender.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-sender.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster-valve.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster-valve.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\cluster.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\cluster.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\context.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\context.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\engine.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\engine.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\executor.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\executor.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\filter.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\filter.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\globalresources.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\globalresources.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\host.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\host.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\http.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\http.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\index.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\index.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\listeners.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\listeners.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\loader.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\loader.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\manager.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\manager.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\realm.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\realm.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\resources.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\resources.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\server.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\server.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\service.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\service.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\systemprops.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\systemprops.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\config\valve.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config\valve.html
Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\architecture
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\architecture\index.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\architecture\index.html
Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\architecture\overview.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\architecture\overview.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\architecture\requestProcess.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\architecture\requestProcess.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\architecture\startup.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\architecture\startup.html
Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\tribes\developers.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes\developers.html
Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\tribes\faq.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes\faq.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\tribes\interceptors.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes\interceptors.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\tribes\introduction.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes\introduction.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\tribes\membership.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes\membership.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\tribes\setup.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes\setup.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\tribes\status.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes\status.html
Processing D:\wsc\software\tomcat6.0.x\webapps\docs\tribes\transport.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes\transport.html
warn.dbcp:
deploy:
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\bin
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\bin
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\bin
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\bin
Copying 17 files to D:\wsc\software\tomcat6.0.x\output\build\bin
Copying 7 files to D:\wsc\software\tomcat6.0.x\output\build\conf
Copying 208 files to D:\wsc\software\tomcat6.0.x\output\build\webapps
Copying 2 files to D:\wsc\software\tomcat6.0.x\output\build\webapps
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\ROOT
Compiling 43 source files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\WEB-INF\classes
注意:D:\wsc\software\tomcat6.0.x\webapps\examples\WEB-INF\classes\compressionFilters\CompressionServletResponseWrapper.java 使用或覆盖了已过时的 API。
注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
注意:某些输入文件使用了未经检查或不安全的操作。
注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
Compiling 1 source file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\plugin\applet
Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\simpletag
Converted 4 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\simpletag
Converted 5 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\simpletag
Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\jspattribute
Converted 4 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\jspattribute
Converted 4 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\cal
Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsptoserv
Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\el
Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\misc
Converted 4 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\tagfiles
Converted 47 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\lib
Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\lib
BUILD SUCCESSFUL
Total time: 12 seconds
D:\wsc\software\tomcat6.0.x>
第七步:测试。
在目录D:\wsc\software\tomcat6.0.x\output\build\bin下面,运行startup.bat,正常启动。
第八步:修改tomcat源码,再build,查看效果。
修改D:\wsc\software\tomcat6.0.x\java\org\apache\catalina\startup\Bootstrap.java文件的main方法如下:
public static void main(String args[]) {
//add start by wsc( 2014.06.28)
System.out.println(new java.util.Date());
System.out.println("==============================================================================");
for(String s : args) {
System.out.println(s);
}
System.out.println("==============================================================================");
System.out.println("==============================================================================");
System.out.println("==============================================================================");
//add end by wsc( 2014.06.28)
if (daemon == null) {
daemon = new Bootstrap();
try {
daemon.init();
} catch (Throwable t) {
t.printStackTrace();
return;
}
}
运行ant命令重新编译...
运行startup.bat的控制台输出如下:
运行shutdown.bat输出如下:
D:\wsc\software\tomcat6.0.x\output\build\bin>shutdown.bat
Using CATALINA_BASE: "D:\wsc\software\tomcat6.0.x\output\build"
Using CATALINA_HOME: "D:\wsc\software\tomcat6.0.x\output\build"
Using CATALINA_TMPDIR: "D:\wsc\software\tomcat6.0.x\output\build\temp"
Using JRE_HOME: "D:\wsc\Program Files (x86)\Java\jdk1.5.0_22"
Using CLASSPATH: "D:\wsc\software\tomcat6.0.x\output\build\bin\bootstrap.jar"
Sat Jun 28 12:52:13 CST 2014
==============================================================================
stop
==============================================================================
==============================================================================
==============================================================================
页:
[1]