• 卓帕卡布拉动作/冒险Windows/Linux/Macintosh 2018-12-12
  • 使命召唤15:黑色行动4windows 2018-12-12
  • “地才”的他们崛起,证明努力绝对是件好事 2018-12-12
  • 扶贫领域腐败问题督查:乡干部成了“包工头”? 2018-12-12
  • #游戏江湖事#政确选黑,玩家选白,游戏公司应当站哪边?瓦克五1226 2018-12-12
  • 大神活动网易炉石大神计划启动 2018-12-12
  • 新游前瞻玩家的饕餮盛宴!2018年全平台必玩游戏推荐!(中) 2018-12-12
  • 林郑月娥:香港不会改变自由贸易的重要地位 2018-12-12
  • 兔子角斗士动作/冒险Windows 2018-12-12
  • 圣兽助战《梦幻西游》手游九黎之墟帮派守护兽解锁 2018-12-12
  • 中日交易所签署备忘录助推中日ETF实现互通 2018-12-12
  • 《七人传奇:英雄集结》公测卡 2018-12-12
  • 暗黑“3”分钟第一期:猎魔人天下第一火多重 2018-12-12
  • 感恩节马赛克拼图解谜Windows/Macintosh 2018-12-12
  • 使命召唤15:黑色行动4windows 2018-12-12
  • Building Tomcat

    Table of Contents

    Introduction

    新开户送体验金68 www.oneworldfilmnet.com Building Apache Tomcat from source is very easy, and is the first step to contributing to Tomcat. The complete and comprehensive instructions are provided in the file BUILDING.txt. The following is a quick step by step guide.

    Download a Java Development Kit (JDK) version 7

    Building Apache Tomcat requires a JDK (version 7) to be installed. You can download one from
    http://www.oracle.com/technetwork/java/javase/downloads/index.html
    http://openjdk.java.net/install/index.html
    or another JDK vendor.

    IMPORTANT: Set an environment variable JAVA_HOME to the pathname of the directory into which you installed the JDK release.

    Install Apache Ant 1.9.5 or later

    Download a binary distribution of Ant 1.9.5 or later from here.

    Unpack the binary distribution into a convenient location so that the Ant release resides in its own directory (conventionally named apache-ant-1.9.x). For the remainder of this guide, the symbolic name ${ant.home} is used to refer to the full pathname of the Ant installation directory.

    IMPORTANT: Create an ANT_HOME environment variable to point the directory ${ant.home}, and modify the PATH environment variable to include directory ${ant.home}/bin in its list. This makes the ant command line script available, which will be used to actually perform the build.

    Checkout or obtain the Tomcat source code

    Tomcat SVN repository URL: http://svn.apache.org/repos/asf/tomcat/tc8.5.x/trunk/

    Tomcat source packages: http://tomcat.apache.org/download-80.cgi.

    Checkout the source using SVN, selecting a tag for released version or trunk for the current development code, or download and unpack a source package. For the remainder of this guide, the symbolic name ${tomcat.source} is used to refer to the location where the source has been placed.

    Configure download area

    Building Tomcat involves downloading a number of libraries that it depends on. It is strongly recommended to configure download area for those libraries.

    By default the build is configured to download the dependencies into the ${user.home}/tomcat-build-libs directory. You can change this (see below) but it must be an absolute path.

    The build is controlled by creating a ${tomcat.source}/build.properties file. It can be used to redefine any property that is present in build.properties.default and build.xml files. The build.properties file does not exist by default. You have to create it.

    The download area is defined by property base.path. For example:

    # ----- Default Base Path for Dependent Packages -----
    # Replace this path with the directory path where
    # dependencies binaries should be downloaded.
    base.path=/home/me/some-place-to-download-to

    Different versions of Tomcat are allowed to share the same download area.

    Another example:

    base.path=${user.dir}/../libraries-tomcat8.5

    Users who access the Internet through a proxy must use the properties file to indicate to Ant the proxy configuration:

    # ----- Proxy setup -----
    proxy.host=proxy.domain
    proxy.port=8080
    proxy.use=on

    Building Tomcat

    Use the following commands to build Tomcat:

    cd ${tomcat.source}
    ant

    Once the build has completed successfully, a usable Tomcat installation will have been produced in the ${tomcat.source}/output/build directory, and can be started and stopped with the usual scripts.

    Building with Eclipse

    IMPORTANT: This is not a supported means of building Tomcat; this information is provided without warranty :-). The only supported means of building Tomcat is with the Ant build described above. However, some developers like to work on Java code with a Java IDE, and the following steps have been used by some developers.

    NOTE: This will not let you build everything under Eclipse; the build process requires use of Ant for the many stages that aren't simple Java compilations. However, it will allow you to view and edit the Java code, get warnings, reformat code, perform refactorings, run Tomcat under the IDE, and so on.

    WARNING: Do not forget to create and configure ${tomcat.source}/build.properties file as described above before running any Ant targets.

    Sample Eclipse project files and launch targets are provided in the res/ide-support/eclipse directory of the source tree. The instructions below will automatically copy these into the required locations.

    An Ant target is provided as a convenience to download all binary dependencies, and to create the Eclipse project and classpath files in the root of the source tree.

    cd ${tomcat.source}
    ant ide-eclipse

    Start Eclipse and create a new Workspace.

    Open the Preferences dialog and then select Java->Build Path->Classpath Variables to add two new Classpath Variables:

    TOMCAT_LIBS_BASEThe same location as the base.path setting in build.properties, where the binary dependencies have been downloaded
    ANT_HOMEthe base path of Ant 1.9.5 or later

    Use File->Import and choose Existing Projects into Workspace. From there choose the root directory of the Tomcat source tree (${tomcat.source}) and import the Tomcat project located there.

    start-tomcat and stop-tomcat launch configurations are provided in res/ide-support/eclipse and will be available in the Run->Run Configurations dialog. Use these to start and stop Tomcat from Eclipse. If you want to configure these yourself (or are using a different IDE) then use org.apache.catalina.startup.Bootstrap as the main class, start/stop etc. as program arguments, and specify -Dcatalina.home=... (with the name of your build directory) as VM arguments.

    Tweaking a few formatting preferences will make it much easier to keep consistent with Tomcat coding conventions (and have your contributions accepted):

    Java -> Code Style -> Formatter -> Edit... Tab policy: Spaces only
    Tab and Indentation size: 4
    General -> Editors -> Text Editors Displayed tab width: 2
    Insert spaces for tabs
    Show whitespace characters (optional)
    XML -> XML Files -> EditorIndent using spaces
    Indentation size: 2
    Ant -> Editor -> FormatterTab size: 2
    Use tab character instead of spaces: unchecked

    The recommended configuration of Compiler Warnings is documented in res/ide-support/eclipse/java-compiler-errors-warnings.txt file.

    Building with other IDEs

    The same general approach should work for most IDEs; it has been reported to work in IntelliJ IDEA, for example.

    Comments

    Notice: This comments section collects your suggestions on improving documentation for Apache Tomcat.

    If you have trouble and need help, read Find Help page and ask your question on the tomcat-users 新开户送体验金68. Do not ask such questions here. This is not a Q&A section.

    The Apache Comments System is explained here. Comments may be removed by our moderators if they are either implemented or considered invalid/off-topic.

  • 新开户送体验金68
  • 投哪网如何使用现金券
  • 外汇平台开户送体验金
  • 乐虎国际手机平台 | 旋乐吧spin8 | 利来在线 | 利来app | 高博亚洲 |