gstackoverflow
gstackoverflow

Reputation: 36966

How configure jetty-maven-plugin 9 to use https?

I need to use https for jetty maven plugin.

I googled following answer

https://stackoverflow.com/a/3795116/2674303

But looks like this answer is not suitable for jetty-maven-plugin of 9 version.

http://joxi.ru/J2beM5gUEG8Km6

idea complains about syntax

How to fix my problem?

Upvotes: 2

Views: 2205

Answers (1)

svilen dimitrov
svilen dimitrov

Reputation: 11

Ok, since jetty-9.0 it is no longer possible to configure a https connector directly in the pom.xml: you need to use jetty xml config files to do it. I am new to exchange ,so excuse my code copy/paste.

jetty.xml

 <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
 <Set name="secureScheme">https</Set>
 <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
 <Set name="outputBufferSize">32768</Set>
 <Set name="requestHeaderSize">8192</Set>
 <Set name="responseHeaderSize">8192</Set>
 <Set name="sendServerVersion">true</Set>
 <Set name="sendDateHeader">false</Set>
 <Set name="headerCacheSize">512</Set>

 <!-- Uncomment to enable handling of X-Forwarded- style headers
 <Call name="addCustomizer">
 <Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/>   
 </Arg>
 </Call>
 -->
 </New>

Look here, for whole bunch of xml's and if it is helpful please check my answer as correct

Upvotes: 1

Related Questions