自己动手编译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/28 10:47 <DIR> .
2014/06/28 10:47 <DIR> ..
2014/06/28 10:36 1,136 .gitignore
2014/06/28 10:36 <DIR> bin
2014/06/28 10:36 8,880 build.properties.default
2014/06/28 10:36 36,756 build.xml
2014/06/28 10:36 6,215 BUILDING.txt
2014/06/28 10:36 <DIR> conf
2014/06/28 10:36 30,737 dist.xml
2014/06/28 10:36 1,551 eclipse.classpath
2014/06/28 10:36 1,191 eclipse.project
2014/06/28 10:36 16,763 extras.xml
2014/06/28 10:36 <DIR> java
2014/06/28 10:36 32,598 KEYS
2014/06/28 10:36 57,695 LICENSE
2014/06/28 10:36 783 NOTICE
2014/06/28 11:20 <DIR> output
2014/06/28 10:36 9,363 RELEASE-NOTES
2014/06/28 10:36 2,385 RELEASE-PLAN-6.0.txt
2014/06/28 10:36 <DIR> res
2014/06/28 10:36 16,861 RUNNING.txt
2014/06/28 10:36 2,764 STATUS.txt
2014/06/28 10:36 <DIR> test
2014/06/28 10:36 <DIR> 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:
[copy] Copying 10 files to D:\wsc\software\tomcat6.0.x\output\manifests download: testexist:
[echo] Testing for /usr/share/java/tomcat-native-1.1.30/tomcat-native.tar.gz downloadfile-2: testexist:
[echo] Testing for /usr/share/java/tomcat-native-1.1.30/LICENSE downloadzip-2: proxyflags: setproxy: testexist:
[echo] Testing for /usr/share/java/commons-daemon-1.0.15/commons-daemon-1.0.15.jar downloadgz-2: testexist:
[echo] Testing for /usr/share/java/commons-daemon-1.0.15/commons-daemon-1.0.15-native-src.tar.gz downloadfile-2: testexist:
[echo] Testing for /usr/share/java/commons-daemon-1.0.15/windows/prunmgr.exe downloadzip-2: proxyflags: setproxy: testexist:
[echo] Testing for /usr/share/java/commons-pool-1.5.7-src/build.xml downloadgz-2: proxyflags: setproxy: testexist:
[echo] Testing for /usr/share/java/commons-dbcp-1.3-src/build.xml downloadgz-2: build-manifests:
[copy] Copying 10 files to D:\wsc\software\tomcat6.0.x\output\manifests build-tomcat-dbcp:
[copy] Copying 64 files to D:\usr\share\java\tomcat6-deps\dbcp
[move] Moving 64 files to D:\usr\share\java\tomcat6-deps\dbcp\src\java\org\apache\tomcat\dbcp
[javac] Compiling 64 source files to \usr\share\java\tomcat6-deps\dbcp\classes
[javac] 注意:某些输入文件使用或覆盖了已过时的 API。
[javac] 注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
[javac] 注意:某些输入文件使用了未经检查或不安全的操作。
[javac] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
[jar] Building jar: D:\usr\share\java\tomcat6-deps\dbcp\tomcat-dbcp.jar testexist:
[echo] Testing for /usr/share/java/ecj-4.3.1/ecj-4.3.1.jar downloadfile-2: proxyflags: setproxy: testexist:
[echo] Testing for /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/28 11:19 <DIR> .
2014/06/28 11:19 <DIR> ..
2014/06/28 11:19 <DIR> avalon-framework-4.1.3
2014/06/28 10:52 <DIR> commons-daemon-1.0.15
2014/06/28 10:52 <DIR> commons-dbcp-1.3-src
2014/06/28 11:19 <DIR> commons-logging-1.1.1
2014/06/28 10:52 <DIR> commons-pool-1.5.7-src
2014/06/28 10:52 <DIR> ecj-4.3.1
2014/06/28 11:19 <DIR> jaxrpc-1.1-rc4
2014/06/28 11:19 <DIR> log4j-1.2.12
2014/06/28 11:19 <DIR> logkit-1.0.1
2014/06/28 10:55 <DIR> nsis-2.46
2014/06/28 11:19 <DIR> servletapi-2.3
2014/06/28 10:52 <DIR> tomcat-native-1.1.30
2014/06/28 10:52 <DIR> tomcat6-deps
2014/06/28 11:19 <DIR> wsdl4j-1.6.1
0 个文件 0 字节
16 个目录 773,780,312,064 可用字节
第六步:运行ant命令。
结果如下:
D:\wsc\software\tomcat6.0.x>ant
Buildfile: build.xml build-prepare:
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\classes
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\build
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\build\bin
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\build\conf
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\build\lib
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\build\logs
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\build\temp
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\build\webapps compile:
[javac] Compiling 1090 source files to D:\wsc\software\tomcat6.0.x\output\classes
[javac] 注意:某些输入文件使用或覆盖了已过时的 API。
[javac] 注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
[javac] 注意:某些输入文件使用了未经检查或不安全的操作。
[javac] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
[copy] Copying 182 files to D:\wsc\software\tomcat6.0.x\output\classes
[copy] Copying 6 files to D:\wsc\software\tomcat6.0.x\output\classes\javax\servlet\resources build-manifests:
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\manifests
[copy] Copying 10 files to D:\wsc\software\tomcat6.0.x\output\manifests package:
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\annotations-api.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\servlet-api.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\jsp-api.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\el-api.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\bin\bootstrap.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\bin\tomcat-juli.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\catalina.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\catalina-tribes.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\catalina-ha.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\catalina-ant.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\tomcat-coyote.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\jasper.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\jasper-el.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\tomcat-i18n-es.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\tomcat-i18n-fr.jar
[jar] Building jar: D:\wsc\software\tomcat6.0.x\output\build\lib\tomcat-i18n-ja.jar build-only: build-docs:
[copy] Copying 27 files to D:\wsc\software\tomcat6.0.x\output\build\webapps
[copy] Copying 2 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs
[copy] Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs
[copy] Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev\sample
[mkdir] Created dir: D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs
[xslt] Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\aio.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\aio.html
[xslt] Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\apr.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\apr.html
[xslt] 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
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\building.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\building.html
[xslt] 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
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\changelog.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\changelog.html
[xslt] 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
[xslt] 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
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\connectors.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\connectors.html
[xslt] 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
[xslt] 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
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\developers.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\developers.html
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\extras.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\extras.html
[xslt] 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
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\index.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\index.html
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\introduction.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\introduction.html
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\logging.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\logging.html
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\monitoring.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\monitoring.html
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] Processing D:\wsc\software\tomcat6.0.x\webapps\docs\setup.xml to D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\setup.html
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\appdev
[xslt] 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
[xslt] Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\funcspecs
[xslt] 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
[xslt] Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\config
[xslt] 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
[xslt] Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\architecture
[xslt] 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
[xslt] Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] Transforming into D:\wsc\software\tomcat6.0.x\output\build\webapps\docs\tribes
[xslt] 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
[xslt] Loading stylesheet D:\wsc\software\tomcat6.0.x\webapps\docs\tomcat-docs.xsl
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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
[xslt] 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:
[copy] Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\bin
[copy] Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\bin
[copy] Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\bin
[copy] Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\bin
[copy] Copying 17 files to D:\wsc\software\tomcat6.0.x\output\build\bin
[copy] Copying 7 files to D:\wsc\software\tomcat6.0.x\output\build\conf
[copy] Copying 208 files to D:\wsc\software\tomcat6.0.x\output\build\webapps
[copy] Copying 2 files to D:\wsc\software\tomcat6.0.x\output\build\webapps
[copy] Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\ROOT
[javac] Compiling 43 source files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\WEB-INF\classes
[javac] 注意:D:\wsc\software\tomcat6.0.x\webapps\examples\WEB-INF\classes\compressionFilters\CompressionServletResponseWrapper.java 使用或覆盖了已过时的 API。
[javac] 注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
[javac] 注意:某些输入文件使用了未经检查或不安全的操作。
[javac] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。
[javac] Compiling 1 source file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\plugin\applet
[txt2html] Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\simpletag
[txt2html] Converted 4 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\simpletag
[txt2html] Converted 5 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\simpletag
[txt2html] Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\jspattribute
[txt2html] Converted 4 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\jspattribute
[txt2html] Converted 4 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\cal
[txt2html] Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsptoserv
[txt2html] Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\el
[txt2html] Converted 1 file to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\misc
[txt2html] Converted 4 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples\jsp\jsp2\tagfiles
[txt2html] Converted 47 files to D:\wsc\software\tomcat6.0.x\output\build\webapps\examples
[copy] Copying 1 file to D:\wsc\software\tomcat6.0.x\output\build\lib
[copy] 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
==============================================================================
==============================================================================
==============================================================================
自己动手编译apache-tomcat-6.0.41-src源码的更多相关文章
- 如何编译Apache Hadoop2.6.0源代码
如何编译Apache Hadoop2.6.0源代码 1.安装CentOS 我使用的是CentOS6.5,下载地址是http://mirror.neu.edu.cn/centos/6.5/isos/x8 ...
- Target runtime Apache Tomcat v6.0 is not defined
在工程目录下的.settings文件夹里,打开org.eclipse.wst.common.project.facet.core.xml文件,其内容是: <?xml version=" ...
- Target runtime Apache Tomcat v7.0 is not defined.
打开项目,找到.settings--->org.eclipse.wst.common.project.facet.core 修改这个文件中: <?xml version="1.0 ...
- Java compiler level does not match the version of the installed Java project facet. springmvc1 和 Target runtime Apache Tomcat v7.0 is not defined.
Java compiler level does not match the version of the installed Java project facet.springmvc1 : Targ ...
- Target runtime Apache Tomcat v6.0 is not defined. phyy Unknown Faceted Project Problem
Description Resource Path Location TypeTarget runtime Apache Tomcat v6.0 is not defined. phyy Unknow ...
- 【甘道夫】Win7x64环境下编译Apache Hadoop2.2.0的Eclipse小工具
目标: 编译Apache Hadoop2.2.0在win7x64环境下的Eclipse插件 环境: win7x64家庭普通版 eclipse-jee-kepler-SR1-win32-x86_64.z ...
- Target runtime Apache Tomcat v8.0 is not defined.
Target runtime Apache Tomcat v8.0 is not defined. Window-Preference-MyEclipse-Targeted Runtimes,选择存在 ...
- 【eclipse】Target runtime Apache Tomcat v7.0 is not defined解决
在eclipse中导入项目时提示Target runtime Apache Tomcat v7.0 is not defined, 解决方法:右键项目--properties--targeted ru ...
- 创建Dynamic Web Project时 显示最新Apache Tomcat 8.0 的方法
创建Dynamic Web Project时 显示最新Apache Tomcat 8.0 等的方法 解决办法如下: 第一步:eclipse菜单help->eclipse marketplac ...
- Server Library [Apache Tomcat 7.0] unbound解决方案
问题描述: 当在MyEclipse中导入高版本Eclipse的[Eclipse Dynamic Web]项目后,会发现其Java Build Path(选定项目->Alt+Enter即可打开Pr ...
随机推荐
- JS去掉数组的重复项
自己知道思路怎么去,但是就是自己不会写,在网上找了一些来看,有些还是没有怎么看明白.学习到了这么一种方法 var a=['ss','dd','ss','cc','dd',1,2,1] var b={} ...
- Packets(模拟 POJ1017)
Packets Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 47750 Accepted: 16182 Description ...
- ambari之hbase数据迁移
一.hbase原理剖析 Base是一个构建在HDFS上的分布式列存储系统:HBase是基于Google BigTable模型开发的,典型的key/value系统:HBase是Apache Hadoop ...
- JAVA线程同步辅助类CyclicBarrier循环屏障
CyclicBarrier是一个同步辅助类,主要作用是让一组线程互相等待,知道都到达一个公共障点,在一起走.在涉及一组固定大小的线程的程序中,这些线程必须不时地互相等待,此时 CyclicBarrie ...
- ms sql 经典语句【珍藏】
数据库中字段中有不需要"[演示数据请勿真实购买]" 例如: update Hishop_Products set ProductName = replace(ProductName ...
- [问题2014A10] 复旦高等代数 I(14级)每周一题(第十二教学周)
[问题2014A10] 设 \(A\) 为 \(n\) 阶实方阵满足 \(AA'=I_n\) (即 \(A\) 为 \(n\) 阶正交阵), 证明: \[\mathrm{rank}(I_n-A)=\ ...
- centos中安装mysql数据库
1.查看是否已有mysql数据库: #rpm -qa |grep mysql 命令返回空,说明没有安装成功. 2.安装mysql yum install mysql* 安装完成后,却发现只安装了JDB ...
- Bootstrap_警示框
一.默认警示框 Bootstrap框架通过“alert“样式来实现警示框效果.在默认情况之下,提供了四种不同的警示框效果: 1.成功警示框:告诉用用户操作成功,在“alert”样式基础上追加“aler ...
- php : 类常量
使用总结: 1.不能使用 define 来定义 2.通过 "类名::常量名" 来获取 /** * PHP类常量 * * 类常量属于类自身,不属于对象实例,不能通过对象实例访问 * ...
- [java基础]循环结构2
[java基础]循环结构2 写了几个循环结构练习~记录一下~~ 1:99乘法表 /** 文件路径:G:\JavaByHands\循环语句\ 文件名称:GameForFor.java 编写时间:2016 ...