Skip to content

Instantly share code, notes, and snippets.

@anoras
Created May 9, 2012 11:08
Show Gist options
  • Save anoras/2643774 to your computer and use it in GitHub Desktop.
Save anoras/2643774 to your computer and use it in GitHub Desktop.
Trøbbel
Snehvit:Sessions anders$ gradle runJetty8
Dynamic properties are deprecated: http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html
Deprecated dynamic property: "jettyVersion" on "root project 'Sessions'", value: "8.0.2.v20111006".
Deprecated dynamic property: "type" on "DefaultExternalModuleDependency{group='org.eclipse.jetty.orbit', name='javax.servlet', version='3.0.0.v201112011016', configuration='default'}", value: "orbit".
:runJetty8
2012-05-09 22:14:30.822:INFO:omjr.Runner:Runner
2012-05-09 22:14:30.823:WARN:omjr.Runner:No tx manager found
2012-05-09 22:14:30.871:INFO:omjr.Runner:Deploying file:/Users/anders/Projects/SB1/Sessions/build/libs/Sessions.war @ /
[o.e.j.w.WebAppContext{/,null},file:/Users/anders/Projects/SB1/Sessions/build/libs/Sessions.war]
2012-05-09 22:14:30.893:INFO:oejs.Server:jetty-8.0.y.z-SNAPSHOT
2012-05-09 22:14:31.344:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
2012-05-09 22:14:31.386:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/Users/anders/Projects/SB1/Sessions/build/libs/Sessions/},file:/Users/anders/Projects/SB1/Sessions/build/libs/Sessions.war
java.lang.IllegalArgumentException: Object of class 'org.eclipse.jetty.webapp.WebAppContext' is not of type 'org.eclipse.jetty.webapp.WebAppContext'. Object Class and type Class are from different loaders.
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:315)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:276)
at org.eclipse.jetty.webapp.JettyWebXmlConfiguration.configure(JettyWebXmlConfiguration.java:100)
at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:427)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1207)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:610)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:89)
at org.eclipse.jetty.server.Server.doStart(Server.java:262)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.mortbay.jetty.runner.Runner.run(Runner.java:500)
at org.mortbay.jetty.runner.Runner.main(Runner.java:639)
2012-05-09 22:14:31.430:INFO:oejs.AbstractConnector:Started [email protected]:8080 STARTING
> Building > :runJetty8
apply plugin: 'war'
apply plugin: 'idea'
jettyVersion = '8.0.2.v20111006'
repositories {
mavenCentral()
}
configurations {
jetty8
}
dependencies {
compile group: 'commons-io', name: 'commons-io', version: '1.4'
compile group: 'log4j', name: 'log4j', version: '1.2.15', ext: 'jar'
compile group: 'redis.clients', name: 'jedis', version: '2.0.0'
compile group: 'com.ovea', name: 'jetty-session-redis', version: '2.3.ga'
runtime group: 'javax.servlet', name: 'servlet-api', version: '2.5'
runtime group: 'org.eclipse.jetty.orbit', name: 'javax.servlet', version: '3.0.0.v201112011016', type: 'orbit', ext: 'jar'
runtime group: 'org.eclipse.jetty.aggregate', name: 'jetty-all', version: "$jettyVersion"
jetty8 ("org.mortbay.jetty:jetty-runner:$jettyVersion") {
exclude module: 'javax.activation'
exclude module: 'javax.mail.glassfish'
exclude module: 'javax.transaction'
exclude module: 'javax.servlet'
exclude module: 'javax.annotation'
exclude module: 'org.objectweb.asm'
exclude module: 'javax.servlet.jsp'
exclude module: 'org.apache.jasper.glassfish'
exclude module: 'javax.servlet.jsp.jstl'
exclude module: 'javax.el'
exclude module: 'com.sun.el'
exclude module: 'org.eclipse.jdt.core'
}
}
task runJetty8(type: JavaExec) {
main = "org.mortbay.jetty.runner.Runner"
args = [war.archivePath]
classpath configurations.jetty8
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment