Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Jenkins的Jetty/winstone连接器配置_Java_Jenkins_Jetty_Winstone - Fatal编程技术网

Java Jenkins的Jetty/winstone连接器配置

Java Jenkins的Jetty/winstone连接器配置,java,jenkins,jetty,winstone,Java,Jenkins,Jetty,Winstone,我在JENKINS的WAN链接上的下载速度很慢。我不想详细讨论这个问题,我想配置Jenkins使用的Jetty来添加以下连接器: <New class="org.eclipse.jetty.server.nio.SelectChannelConnector"> <Set name="host"><Property name="application-host"/></Set> <Set name="port"><Propert

我在JENKINS的WAN链接上的下载速度很慢。我不想详细讨论这个问题,我想配置Jenkins使用的Jetty来添加以下连接器:

<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
 <Set name="host"><Property name="application-host"/></Set>
 <Set name="port"><Property name="application-port"/></Set>
 <Set name="forwarded">true</Set>
 <Set name="responseBufferSize">16777216</Set>
 <Set name="responseHeaderSize">1048576</Set>
</New>

真的
16777216
1048576
但我不确定什么是正确的地点。 我在安装中的任何位置都找不到jetty.xml文件。 我在Windows上使用Jenkins,所以我想我只是使用java-jar Jenkins.war启动它,它应该使用Jetty/Winstone


编辑:看起来这不能仅仅通过更改配置来完成。至少不在SSL上下文中:硬代码创建ServerContext

如果您不使用像Tomcat这样的定制servlet容器,那么Jenkins实际上会使用内置的“Jetty/Winstone”容器。更准确地说:Jenkins在Jetty周围使用了一个包装器,它实现了Winstone命令行界面(动机是在不改变界面的情况下从旧Winstone切换到Jetty)

Jetty容器可以通过直接在Jenkins命令行上添加选项来定制(也就是说,在Windows中,通过将选项添加到github上的

如果这些选项不够,则可以通过在
pom.xml
中修改此部分来进一步自定义容器:

      <connectors>
        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
            <port>${port}</port>
        </connector>
      </connectors>

${port}
…或者通过编辑
web.xml
文件。通过编辑未打包的
$JENKINS_HOME/war/web-INF/web.xml
,至少可以在不更改
war
文件的情况下修改后者。不过,我还没有尝试这两种方法