Exclude Gradle classpath runtime when launching JettyRun

99封情书 提交于 2019-12-04 05:06:51

As described in the manual for jettyRun task, it has a classpath property which is by default set to project.sourceSets.main.runtimeClasspath. You can just set this property to the classpath of your choice:

configurations{
  myJettyRuntime
}

dependencies{
  myJettyRuntime "group:name:version"
  ...
}

jettyRun{
  classpath = configurations.myJettyRuntime
}

alternatively you can add or subtract unneeded or conflicting dependencies from this classpath, using -= and += operators respectively.

jettyRun{
  classpath -= configurations.myExcludedConf
}

If you are just worried about the two SLF4j bindings, it would seem you can ignore the warning in this case. That is exactly what I'm doing.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!