How to add xml code in dependency file in sbt

21 views
Skip to first unread message

Rishi Khandelwal

unread,
Sep 11, 2013, 3:58:37 AM9/11/13
to simple-b...@googlegroups.com
Hello ,

I am using sbt 0.7.7 and jetty 8.0.0 M3 version.

I crested dependency file as :

class LiftProject(info: ProjectInfo) extends DefaultWebProject(info) with Eclipsify {}

I added following dependencies in above file :
"org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "test" artifacts (Artifact("javax.servlet", "jar", "jar")),
 "org.eclipse.jetty" % "jetty-webapp" % "8.0.0.M3" % "test",

Currently, My application is running on http, but I want to run it on https. So for this, I have to make SSL configuration.

I followed these steps to configure SSL.

But above solution is for that process in which we download the .tar.gz (for Linux) file. (I did it separately)
I did this change in a xml file which runs when jetty runs :
<Configure id="Server" class="org.eclipse.jetty.server.Server">

  <!-- if NIO is not available, use org.eclipse.jetty.server.ssl.SslSocketConnector -->
  
  <New id="sslContextFactory" class="org.eclipse.jetty.http.ssl.SslContextFactory">
    <Set name="KeyStore"><Property name="jetty.home" default="." />/etc/keystore</Set>
    <Set name="KeyStorePassword">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
    <Set name="KeyManagerPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set>
    <Set name="TrustStore"><Property name="jetty.home" default="." />/etc/keystore</Set>
    <Set name="TrustStorePassword">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set>
  </New>

  <Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
        <Arg><Ref id="sslContextFactory" /></Arg>
        <Set name="Port">8443</Set>
        <Set name="maxIdleTime">30000</Set>
        <Set name="Acceptors">2</Set>
        <Set name="AcceptQueueSize">100</Set>
      </New>
    </Arg>
  </Call>
</Configure>

I want to do the same for my app in which jetty runs with sbt. But I am not getting that where I will set the above xml configuration so that it will run as my jetty starts.

Please suggest me for the right direction.

Thank You

Reply all
Reply to author
Forward
0 new messages