繁体   English   中英

码头蚁任务配置

[英]Jetty ant task configuration

有关配置码头蚂蚁任务的两个问题

为了让码头在不同的端口上监听,我在jetty.xml中这样做:

<Call name="addConnector">
    <Arg>
        <New class="org.mortbay.jetty.nio.SelectChannelConnector">
            <Set name="port"><SystemProperty name="jetty.port" default="9080"/></Set>
        </New>
    </Arg>
</Call>

并在ant脚本中引用它,例如

<jetty tempDirectory="..." jettyXml="...jetty.xml">

不幸的是,这只会让码头同时装载9080和8080。我如何让码头不需要8080?

第二个问题-码头任务是否支持派生码头程序,还是我必须直接蚂蚁高管代替使用码头插件来做到这一点?

没关系。 对于遇到同样问题的任何人,都可以这样解决:

<jetty tempDirectory="..."> 
     <connectors>
        <selectChannelConnector port="9999" />
      </connectors>
  </jetty>

jetty.xml被删除,调用该方法添加引用的端口而不是替换。 类似于语法

< systemProperties>
    <systemProperty name="jetty.port" value="9181"/>
  </systemProperties>

它替换了在jetty xml中引用的端口,但添加了该端口而不是覆盖默认端口。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM