build.properties文件配置如下: 
tomcat.home= C:/apache-tomcat-6.0.14 
tomcat.manager.url=http://localhost:8080/manager 
tomcat.manager.username=admin 
tomcat.manager.password=tomcat 然后运行ant,出现以下错误: 
BUILD FAILED 
D:\AntBuild\build.xml:81: C:\apache-tomcat-6.0.14\common\lib not found. 
使用tomcat5.0.x和tomcat5.5.x都可以成功编译。 
我查看了一下,一直到tomcat5.5.x版,在tomcat_home下lib是放在common目录下的,而tomcat6.0.x则直接放到tomcat_home下了,怎么解决这个问题。

解决方案 »

  1.   

    server.xml么?
    没有做什么改动,基本都是缺省配置
    tomcat5.5.12的server.xml
    <!-- Example Server Configuration File -->
    <!-- Note that component elements are nested corresponding to their
         parent-child relationships with each other --><Server port="8005" shutdown="SHUTDOWN">  <Listener className="org.apache.catalina.core.AprLifecycleListener" />
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
      <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>  <!-- Global JNDI resources -->
      <GlobalNamingResources>    <!-- Test entry for demonstration purposes -->
        <Environment name="simpleValue" type="java.lang.Integer" value="30"/>    <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
           description="User database that can be updated and saved"
               factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />  </GlobalNamingResources>  <!-- Define the Tomcat Stand-Alone Service -->
      <Service name="Catalina">    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
        <Connector port="8080" maxHttpHeaderSize="8192"
                   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                   enableLookups="false" redirectPort="8443" acceptCount="100"
                   connectionTimeout="20000" disableUploadTimeout="true" 
       URIEncoding="UTF-8" useBodyEncodingForURI="true" />    <!-- Define a SSL HTTP/1.1 Connector on port 8443 -->    <!-- Define an AJP 1.3 Connector on port 8009 -->
        <Connector port="8009" 
                   enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />    <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
        <!-- See proxy documentation for more information about using this. -->
             
        <!-- Define the top level container in our container hierarchy -->
        <Engine name="Catalina" defaultHost="localhost">      <!--
          <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
          -->      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 resourceName="UserDatabase"/>      <!-- Comment out the old realm but leave here for now in case we
               need to go back quickly -->
          <!--
          <Realm className="org.apache.catalina.realm.MemoryRealm" />
          -->      <!-- Replace the above Realm with one of the following to get a Realm
               stored in a database and accessed via JDBC -->      <!-- Define the default virtual host
               Note: XML Schema validation will not work with Xerces 2.2.
           -->
       
          <Host name="localhost" appBase="webapps"
           unpackWARs="true" autoDeploy="true"
           xmlValidation="false" xmlNamespaceAware="false">
            
            <!--
            <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                     managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                     expireSessionsOnShutdown="false"
                     useDirtyFlag="true"
                     notifyListenersOnReplication="true">            <Membership 
                    className="org.apache.catalina.cluster.mcast.McastService"
                    mcastAddr="228.0.0.4"
                    mcastPort="45564"
                    mcastFrequency="500"
                    mcastDropTime="3000"/>            <Receiver 
                    className="org.apache.catalina.cluster.tcp.ReplicationListener"
                    tcpListenAddress="auto"
                    tcpListenPort="4001"
                    tcpSelectorTimeout="100"
                    tcpThreadCount="6"/>            <Sender
                    className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                    replicationMode="pooled"
                    ackTimeout="15000"/>            <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
                       filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
                       
                <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                          tempDir="/tmp/war-temp/"
                          deployDir="/tmp/war-deploy/"
                          watchDir="/tmp/war-listen/"
                          watchEnabled="false"/>
                          
                <ClusterListener className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
            </Cluster>
            -->        
            <!--
            <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
            -->        <!--
            <Valve className="org.apache.catalina.valves.AccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
            -->        <!--
            <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
            -->
            <!--
            <Valve className="org.apache.catalina.valves.ByteBufferAccessLogValve"
                     directory="logs"  prefix="localhost_access_log." suffix=".txt"
                     pattern="common" resolveHosts="false"/>
            -->      </Host>
      <!--
    <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
    <Context path="" docBase="C:\apache-tomcat-5.5.12\webapps\newcnb2bclub\"  debug="0" reloadable="true" crossContext="true">
    </Context>
    <Logger className="org.apache.catalina.logger.FileLogger" directory="logs"  prefix="onion_log." suffix=".txt" timestamp="true"/>
    <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  prefix="onion_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
        </Host>
    -->
        </Engine>  </Service></Server>
    文件里删除了很多注释