2013-10-15 49 views
1

我从github中检查spring security的源,并且想要运行示例目录(samples目录中有一个名为contacts-xml的子目录)中的“contacts”示例,我试过的方法中http://docs.spring.io/spring-security/site/build.html,我成功地命令运行CAS演示如何从弹簧安全源构建示例

gradlew CAS

和它的作品。

但是,当我在联系人的XML目录试图

gradle这个jettyRun

,我得到了一个错误信息

[email protected]:~/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** 

难道我错过了什么?

回答

0

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

cd samples/contacts

+0

运行“gradle这个jettyRun”命令时,我已经在样品/联系人的XML目录。 – nineright

+0

似乎他们将其示例切换为使用Tomcat插件。文档已过时。您需要运行'tomcatRun'任务:'../../gradlew tomcatRun'。 –