【问题标题】:How to build samples from spring-security source如何从 spring-security 源构建示例
【发布时间】:2013-10-15 02:21:06
【问题描述】:

我从github上查了spring security的源码,想运行samples目录下的“contacts”例子(samples目录下有个子目录叫contacts-xml),我试了下http://docs.spring.io/spring-security/site/build.html的方法,我通过命令成功运行了cas demo

毕业证

它有效。

但是当我尝试时

gradle jettyRun

在 contacts-xml 目录中,我收到一条错误消息

nine@nine:~/codes/spring-security/samples/contacts-xml$ gradle jettyRun
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes
:buildSrc:jar
:buildSrc:assemble
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
:buildSrc:testClasses UP-TO-DATE
:buildSrc:test UP-TO-DATE
:buildSrc:check UP-TO-DATE
:buildSrc:build
The ConfigurationContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
The TaskContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
The Test.testResultsDir property has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the Test.getReports().getJunitXml().setDestination() property instead.
The Test.testReportDir property has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the Test.getReports().getHtml().getDestination() property instead.
'appEngineSdkRoot' must be set in gradle.properties
2013-10-15 10:01:59.832:INFO::Logging to STDERR via org.mortbay.log.StdErrLog

FAILURE: Could not determine which tasks to execute.

* What went wrong:
**Task 'jettyRun' not found in project ':spring-security-samples-contacts-xml'.**

* Try:
Run gradle tasks to get a list of available tasks.

**BUILD FAILED**

我错过了什么吗?

【问题讨论】:

    标签: java spring spring-mvc spring-security gradle


    【解决方案1】:

    文档说你需要导航到特定的子目录:

    cd samples/contacts

    【讨论】:

    • 运行“gradle jettyRun”命令时,我已经在samples/contacts-xml目录中了。
    • 似乎他们将示例切换为使用 Tomcat 插件。文档已过时。您需要运行tomcatRun 任务:../../gradlew tomcatRun。
    猜你喜欢
    • 2013-11-13
    • 1970-01-01
    • 1970-01-01
    • 2014-08-06
    • 2019-06-14
    • 1970-01-01
    • 2011-11-20
    • 1970-01-01
    • 2020-10-13
    相关资源
    最近更新 更多