第一步:下载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:Userswsc>echo %java_home% D:wscProgram Files (x86)Javajdk1.5.0_22 C:Userswsc>echo %ant_home% D:wscsoftwareapache-ant-1.6.5-bin C:Userswsc>
第四步:按照tortoise SVN,check out code。
D:wscsoftware omcat6.0.x>dir 驱动器 D 中的卷是 新加卷 卷的序列号是 D035-1040 D:wscsoftware omcat6.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:wscsoftware omcat6.0.x>ant download Buildfile: build.xml build-manifests: [copy] Copying 10 files to D:wscsoftware omcat6.0.xoutputmanifests 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:wscsoftware omcat6.0.xoutputmanifests build-tomcat-dbcp: [copy] Copying 64 files to D:usrsharejava omcat6-depsdbcp [move] Moving 64 files to D:usrsharejava omcat6-depsdbcpsrcjavaorgapache omcatdbcp [javac] Compiling 64 source files to usrsharejava omcat6-depsdbcpclasses [javac] 注意:某些输入文件使用或覆盖了已过时的 API。 [javac] 注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。 [javac] 注意:某些输入文件使用了未经检查或不安全的操作。 [javac] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。 [jar] Building jar: D:usrsharejava omcat6-depsdbcp omcat-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:usrsharejava>dir 驱动器 D 中的卷是 新加卷 卷的序列号是 D035-1040 D:usrsharejava 的目录 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:wscsoftware omcat6.0.x>ant Buildfile: build.xml build-prepare: [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputclasses [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputuild [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputuildin [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputuildconf [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputuildlib [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputuildlogs [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputuild emp [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputuildwebapps compile: [javac] Compiling 1090 source files to D:wscsoftware omcat6.0.xoutputclasses [javac] 注意:某些输入文件使用或覆盖了已过时的 API。 [javac] 注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。 [javac] 注意:某些输入文件使用了未经检查或不安全的操作。 [javac] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。 [copy] Copying 182 files to D:wscsoftware omcat6.0.xoutputclasses [copy] Copying 6 files to D:wscsoftware omcat6.0.xoutputclassesjavaxservlet esources build-manifests: [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputmanifests [copy] Copying 10 files to D:wscsoftware omcat6.0.xoutputmanifests package: [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibannotations-api.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibservlet-api.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibjsp-api.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibel-api.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildinootstrap.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildin omcat-juli.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibcatalina.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibcatalina-tribes.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibcatalina-ha.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibcatalina-ant.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlib omcat-coyote.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibjasper.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlibjasper-el.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlib omcat-i18n-es.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlib omcat-i18n-fr.jar [jar] Building jar: D:wscsoftware omcat6.0.xoutputuildlib omcat-i18n-ja.jar build-only: build-docs: [copy] Copying 27 files to D:wscsoftware omcat6.0.xoutputuildwebapps [copy] Copying 2 files to D:wscsoftware omcat6.0.xoutputuildwebappsdocs [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildwebappsdocs [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildwebappsdocsappdevsample [mkdir] Created dir: D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecs [xslt] Transforming into D:wscsoftware omcat6.0.xoutputuildwebappsdocs [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsaio.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsaio.html [xslt] Loading stylesheet D:wscsoftware omcat6.0.xwebappsdocs omcat-docs.xsl [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsapr.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsapr.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsalancer-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsalancer-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsuilding.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsuilding.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocscgi-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocscgi-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocschangelog.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocschangelog.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsclass-loader-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsclass-loader-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocscluster-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocscluster-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconnectors.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconnectors.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsdefault-servlet.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsdefault-servlet.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsdeployer-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsdeployer-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsdevelopers.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsdevelopers.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsextras.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsextras.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocshtml-manager-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocshtml-manager-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsindex.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsindex.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsintroduction.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsintroduction.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsjasper-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsjasper-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsjndi-datasource-examples-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsjndi-datasource-examples-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsjndi-resources-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsjndi-resources-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocslogging.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocslogging.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsmanager-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsmanager-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsmaven-jars.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsmaven-jars.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsmbeans-descriptor-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsmbeans-descriptor-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsmonitoring.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsmonitoring.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsproxy-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsproxy-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ealm-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ealm-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocssecurity-manager-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocssecurity-manager-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocssetup.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocssetup.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsssi-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsssi-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsssl-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsssl-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsvirtual-hosting-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsvirtual-hosting-howto.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocswindows-service-howto.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocswindows-service-howto.html [xslt] Transforming into D:wscsoftware omcat6.0.xoutputuildwebappsdocsappdev [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsappdevdeployment.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsappdevdeployment.html [xslt] Loading stylesheet D:wscsoftware omcat6.0.xwebappsdocs omcat-docs.xsl [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsappdevindex.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsappdevindex.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsappdevinstallation.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsappdevinstallation.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsappdevintroduction.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsappdevintroduction.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsappdevprocesses.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsappdevprocesses.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsappdevsource.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsappdevsource.html [xslt] Transforming into D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecs [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsfs-admin-apps.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsfs-admin-apps.html [xslt] Loading stylesheet D:wscsoftware omcat6.0.xwebappsdocs omcat-docs.xsl [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsfs-admin-objects.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsfs-admin-objects.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsfs-admin-opers.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsfs-admin-opers.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsfs-default.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsfs-default.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsfs-invoker.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsfs-invoker.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsfs-jdbc-realm.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsfs-jdbc-realm.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsfs-jndi-realm.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsfs-jndi-realm.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsfs-memory-realm.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsfs-memory-realm.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsindex.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsindex.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsfuncspecsmbean-names.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsfuncspecsmbean-names.html [xslt] Transforming into D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfig [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigajp.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigajp.html [xslt] Loading stylesheet D:wscsoftware omcat6.0.xwebappsdocs omcat-docs.xsl [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-channel.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-channel.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-deployer.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-deployer.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-interceptor.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-interceptor.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-listener.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-listener.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-manager.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-manager.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-membership.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-membership.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-receiver.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-receiver.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-sender.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-sender.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster-valve.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster-valve.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcluster.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcluster.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigcontext.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigcontext.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigengine.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigengine.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigexecutor.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigexecutor.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigfilter.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigfilter.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigglobalresources.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigglobalresources.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfighost.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfighost.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfighttp.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfighttp.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigindex.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigindex.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfiglisteners.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfiglisteners.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigloader.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigloader.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigmanager.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigmanager.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfig ealm.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfig ealm.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfig esources.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfig esources.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigserver.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigserver.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigservice.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigservice.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigsystemprops.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigsystemprops.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsconfigvalve.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsconfigvalve.html [xslt] Transforming into D:wscsoftware omcat6.0.xoutputuildwebappsdocsarchitecture [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsarchitectureindex.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsarchitectureindex.html [xslt] Loading stylesheet D:wscsoftware omcat6.0.xwebappsdocs omcat-docs.xsl [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsarchitectureoverview.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsarchitectureoverview.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsarchitecture equestProcess.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsarchitecture equestProcess.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocsarchitecturestartup.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocsarchitecturestartup.html [xslt] Transforming into D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribes [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ribesdevelopers.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribesdevelopers.html [xslt] Loading stylesheet D:wscsoftware omcat6.0.xwebappsdocs omcat-docs.xsl [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ribesfaq.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribesfaq.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ribesinterceptors.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribesinterceptors.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ribesintroduction.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribesintroduction.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ribesmembership.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribesmembership.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ribessetup.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribessetup.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ribesstatus.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribesstatus.html [xslt] Processing D:wscsoftware omcat6.0.xwebappsdocs ribes ransport.xml to D:wscsoftware omcat6.0.xoutputuildwebappsdocs ribes ransport.html warn.dbcp: deploy: [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildin [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildin [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildin [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildin [copy] Copying 17 files to D:wscsoftware omcat6.0.xoutputuildin [copy] Copying 7 files to D:wscsoftware omcat6.0.xoutputuildconf [copy] Copying 208 files to D:wscsoftware omcat6.0.xoutputuildwebapps [copy] Copying 2 files to D:wscsoftware omcat6.0.xoutputuildwebapps [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildwebappsROOT [javac] Compiling 43 source files to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesWEB-INFclasses [javac] 注意:D:wscsoftware omcat6.0.xwebappsexamplesWEB-INFclassescompressionFiltersCompressionServletResponseWrapper.java 使用或覆盖了已过时的 API。 [javac] 注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。 [javac] 注意:某些输入文件使用了未经检查或不安全的操作。 [javac] 注意:要了解详细信息,请使用 -Xlint:unchecked 重新编译。 [javac] Compiling 1 source file to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjsppluginapplet [txt2html] Converted 1 file to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsp2simpletag [txt2html] Converted 4 files to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsp2simpletag [txt2html] Converted 5 files to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsp2simpletag [txt2html] Converted 1 file to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsp2jspattribute [txt2html] Converted 4 files to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsp2jspattribute [txt2html] Converted 4 files to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspcal [txt2html] Converted 1 file to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsptoserv [txt2html] Converted 1 file to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsp2el [txt2html] Converted 1 file to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsp2misc [txt2html] Converted 4 files to D:wscsoftware omcat6.0.xoutputuildwebappsexamplesjspjsp2 agfiles [txt2html] Converted 47 files to D:wscsoftware omcat6.0.xoutputuildwebappsexamples [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildlib [copy] Copying 1 file to D:wscsoftware omcat6.0.xoutputuildlib BUILD SUCCESSFUL Total time: 12 seconds D:wscsoftware omcat6.0.x>
第七步:测试。
在目录D:wscsoftware omcat6.0.xoutputuildin下面,运行startup.bat,正常启动。
第八步:修改tomcat源码,再build,查看效果。
修改D:wscsoftware omcat6.0.xjavaorgapachecatalinastartupBootstrap.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:wscsoftware omcat6.0.xoutputuildin>shutdown.bat Using CATALINA_BASE: "D:wscsoftware omcat6.0.xoutputuild" Using CATALINA_HOME: "D:wscsoftware omcat6.0.xoutputuild" Using CATALINA_TMPDIR: "D:wscsoftware omcat6.0.xoutputuild emp" Using JRE_HOME: "D:wscProgram Files (x86)Javajdk1.5.0_22" Using CLASSPATH: "D:wscsoftware omcat6.0.xoutputuildinootstrap.jar" Sat Jun 28 12:52:13 CST 2014 ============================================================================== stop ============================================================================== ============================================================================== ==============================================================================