2012-01-12 5 views
0

Java + Cucumber 통합에 대한 훌륭한 자습서가 있습니까? Ant + Ivy를 사용하기 시작했지만 제대로 프로젝트를 빌드 할 수 없습니다.Java와 Cucumber + Ivy

Buildfile: C:\workspace\cucumber-helloworld\build.xml 
resolve: 
[ivy:retrieve] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ :: 
[ivy:retrieve] :: loading settings :: file = C:\workspace\cucumber-helloworld\ivysettings.xml 
[ivy:retrieve] :: resolving dependencies :: cukes.info#java-example;[email protected] 
[ivy:retrieve] confs: [default] 
[ivy:retrieve] found cuke4duke#cuke4duke;0.4.4 in cukes 
[ivy:retrieve] found org.jruby#jruby-complete;1.5.1 in ibiblio 
[ivy:retrieve] found org.picocontainer#picocontainer;2.10.2 in ibiblio 
[ivy:retrieve] found junit#junit;4.8.1 in ibiblio 
[ivy:retrieve] :: resolution report :: resolve 162ms :: artifacts dl 6ms 
-------------------------------------------------------------------- 
|     |   modules   || artifacts | 
|  conf  | number| search|dwnlded|evicted|| number|dwnlded| 
--------------------------------------------------------------------- 
|  default  | 4 | 0 | 0 | 0 || 4 | 0 | 
--------------------------------------------------------------------- 
[ivy:retrieve] :: retrieving :: cukes.info#java-example 
[ivy:retrieve] confs: [default] 
[ivy:retrieve] 0 artifacts copied, 4 already retrieved (0kB/6ms) 
-define-paths: 
-install-gems: 
    [gem] JRuby limited openssl loaded. http://jruby.org/openssl 
    [gem] gem install jruby-openssl for full support. 
    [gem] System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException 
    [gem]  from DefaultResolver.java:111:in `makeTime' 
    [gem]  from DefaultResolver.java:277:in `create' 
    [gem]  from DefaultResolver.java:317:in `handleScalar' 
    [gem]  from DefaultResolver.java:435:in `orgHandler' 
    [gem]  from DefaultResolver.java:455:in `node_import' 
    [gem]  from org/yecht/ruby/DefaultResolver$s_method_1_0$RUBYINVOKER$node_import.gen:65535:in `call' 
    [gem]  from CachingCallSite.java:146:in `call' 
    [gem]  from RubyLoadHandler.java:40:in `handle' 
    [gem]  from Parser.java:300:in `addNode' 
    [gem]  from DefaultYAMLParser.java:676:in `yyparse' 
    [gem]  from Parser.java:290:in `yechtparse' 
    [gem]  from Parser.java:284:in `parse' 
    [gem]  from YParser.java:152:in `load' 
    [gem]  from org/yecht/ruby/YParser$s_method_0_1$RUBYINVOKER$load.gen:65535:in `call' 
    [gem]  from JavaMethod.java:630:in `call' 
    [gem]  from DynamicMethod.java:186:in `call' 
    [gem]  from CachingCallSite.java:309:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:148:in `call' 
    [gem]  from CallOneArgNode.java:57:in `interpret' 
    [gem]  from LocalAsgnNode.java:123:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from InterpretedMethod.java:180:in `call' 
    [gem]  from DefaultMethod.java:172:in `call' 
    [gem]  from CachingCallSite.java:309:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:148:in `call' 
    [gem]  from CallOneArgNode.java:57:in `interpret' 
    [gem]  from LocalAsgnNode.java:123:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:180:in `call' 
    [gem]  from DefaultMethod.java:172:in `call' 
    [gem]  from CachingCallSite.java:309:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:148:in `call' 
    [gem]  from CallOneArgNode.java:57:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from RescueNode.java:199:in `executeBody' 
    [gem]  from RescueNode.java:118:in `interpretWithJavaExceptions' 
    [gem]  from RescueNode.java:110:in `interpret' 
    [gem]  from InterpretedMethod.java:180:in `call' 
    [gem]  from DefaultMethod.java:172:in `call' 
    [gem]  from CachingCallSite.java:309:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:148:in `call' 
    [gem]  from FCallOneArgNode.java:36:in `interpret' 
    [gem]  from InstAsgnNode.java:95:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from EnsureNode.java:96:in `interpret' 
    [gem]  from BeginNode.java:83:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from WhenOneArgNode.java:36:in `whenSlowTest' 
    [gem]  from WhenOneArgNode.java:46:in `when' 
    [gem]  from CaseNode.java:133:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from InterpretedBlock.java:373:in `evalBlockBody' 
    [gem]  from InterpretedBlock.java:346:in `yield' 
    [gem]  from InterpretedBlock.java:303:in `yield' 
    [gem]  from Block.java:194:in `yield' 
    [gem]  from YieldNode.java:112:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedBlock.java:373:in `evalBlockBody' 
    [gem]  from InterpretedBlock.java:346:in `yield' 
    [gem]  from InterpretedBlock.java:303:in `yield' 
    [gem]  from Block.java:194:in `yield' 
    [gem]  from RubyKernel.java:1251:in `loop_1_9' 
    [gem]  from org/jruby/RubyKernel$s_method_0_0$RUBYFRAMEDINVOKER$loop_1_9.gen:65535:in `call' 
    [gem]  from CachingCallSite.java:299:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:117:in `callBlock' 
    [gem]  from CachingCallSite.java:132:in `callIter' 
    [gem]  from FCallNoArgBlockNode.java:32:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from InterpretedMethod.java:160:in `call' 
    [gem]  from DefaultMethod.java:164:in `call' 
    [gem]  from CachingCallSite.java:299:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:117:in `callBlock' 
    [gem]  from CachingCallSite.java:122:in `call' 
    [gem]  from CallNoArgBlockNode.java:64:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:242:in `call' 
    [gem]  from DefaultMethod.java:196:in `call' 
    [gem]  from CachingCallSite.java:339:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:197:in `callBlock' 
    [gem]  from CachingCallSite.java:202:in `call' 
    [gem]  from RubyClass.java:815:in `call' 
    [gem]  from DynamicMethod.java:194:in `call' 
    [gem]  from WrapperMethod.java:62:in `call' 
    [gem]  from CachingCallSite.java:329:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:188:in `call' 
    [gem]  from FCallTwoArgNode.java:38:in `interpret' 
    [gem]  from LocalAsgnNode.java:123:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from EnsureNode.java:96:in `interpret' 
    [gem]  from InterpretedMethod.java:242:in `call' 
    [gem]  from DefaultMethod.java:196:in `call' 
    [gem]  from CachingCallSite.java:339:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:197:in `callBlock' 
    [gem]  from CachingCallSite.java:202:in `call' 
    [gem]  from CallTwoArgBlockPassNode.java:62:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:283:in `call' 
    [gem]  from DefaultMethod.java:212:in `call' 
    [gem]  from CachingCallSite.java:359:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:237:in `callBlock' 
    [gem]  from CachingCallSite.java:252:in `callIter' 
    [gem]  from CallThreeArgBlockNode.java:64:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:262:in `call' 
    [gem]  from DefaultMethod.java:204:in `call' 
    [gem]  from CachingCallSite.java:349:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:228:in `call' 
    [gem]  from FCallThreeArgNode.java:40:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from InterpretedBlock.java:373:in `evalBlockBody' 
    [gem]  from InterpretedBlock.java:346:in `yield' 
    [gem]  from InterpretedBlock.java:303:in `yield' 
    [gem]  from Block.java:194:in `yield' 
    [gem]  from RubyIO.java:1104:in `open' 
    [gem]  from RubyKernel.java:283:in `open' 
    [gem]  from org/jruby/RubyKernel$s_method_0_2$RUBYFRAMEDINVOKER$open.gen:65535:in `call' 
    [gem]  from DynamicMethod.java:198:in `call' 
    [gem]  from CachingCallSite.java:339:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:197:in `callBlock' 
    [gem]  from CachingCallSite.java:212:in `callIter' 
    [gem]  from FCallTwoArgBlockNode.java:34:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from IfNode.java:119:in `interpret' 
    [gem]  from IfNode.java:119:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:221:in `call' 
    [gem]  from DefaultMethod.java:188:in `call' 
    [gem]  from CachingCallSite.java:329:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:188:in `call' 
    [gem]  from CallTwoArgNode.java:59:in `interpret' 
    [gem]  from InstAsgnNode.java:95:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from RescueNode.java:199:in `executeBody' 
    [gem]  from RescueNode.java:118:in `interpretWithJavaExceptions' 
    [gem]  from RescueNode.java:110:in `interpret' 
    [gem]  from BeginNode.java:83:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:242:in `call' 
    [gem]  from DefaultMethod.java:196:in `call' 
    [gem]  from CachingCallSite.java:339:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:197:in `callBlock' 
    [gem]  from CachingCallSite.java:202:in `call' 
    [gem]  from RubyClass.java:815:in `call' 
    [gem]  from DynamicMethod.java:194:in `call' 
    [gem]  from CachingCallSite.java:329:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:188:in `call' 
    [gem]  from CallTwoArgNode.java:59:in `interpret' 
    [gem]  from DAsgnNode.java:110:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedBlock.java:373:in `evalBlockBody' 
    [gem]  from InterpretedBlock.java:346:in `yield' 
    [gem]  from InterpretedBlock.java:303:in `yield' 
    [gem]  from Block.java:194:in `yield' 
    [gem]  from RubyArray.java:1630:in `eachCommon' 
    [gem]  from RubyArray.java:1637:in `each' 
    [gem]  from org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:65535:in `call' 
    [gem]  from CachingCallSite.java:299:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:117:in `callBlock' 
    [gem]  from CachingCallSite.java:122:in `call' 
    [gem]  from CallNoArgBlockNode.java:64:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:221:in `call' 
    [gem]  from DefaultMethod.java:188:in `call' 
    [gem]  from CachingCallSite.java:329:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:188:in `call' 
    [gem]  from CallTwoArgNode.java:59:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from RescueNode.java:199:in `executeBody' 
    [gem]  from RescueNode.java:118:in `interpretWithJavaExceptions' 
    [gem]  from RescueNode.java:110:in `interpret' 
    [gem]  from BeginNode.java:83:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from InterpretedBlock.java:373:in `evalBlockBody' 
    [gem]  from InterpretedBlock.java:346:in `yield' 
    [gem]  from InterpretedBlock.java:303:in `yield' 
    [gem]  from Block.java:194:in `yield' 
    [gem]  from RubyArray.java:1630:in `eachCommon' 
    [gem]  from RubyArray.java:1637:in `each' 
    [gem]  from org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen:65535:in `call' 
    [gem]  from CachingCallSite.java:299:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:117:in `callBlock' 
    [gem]  from CachingCallSite.java:122:in `call' 
    [gem]  from CallNoArgBlockNode.java:64:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:139:in `call' 
    [gem]  from DefaultMethod.java:156:in `call' 
    [gem]  from CachingCallSite.java:289:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:108:in `call' 
    [gem]  from VCallNode.java:85:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from IfNode.java:119:in `interpret' 
    [gem]  from IfNode.java:119:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:113:in `call' 
    [gem]  from InterpretedMethod.java:127:in `call' 
    [gem]  from DefaultMethod.java:147:in `call' 
    [gem]  from CachingCallSite.java:279:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:68:in `call' 
    [gem]  from CallSpecialArgNode.java:73:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from CaseNode.java:138:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:180:in `call' 
    [gem]  from DefaultMethod.java:172:in `call' 
    [gem]  from CachingCallSite.java:309:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:148:in `call' 
    [gem]  from FCallOneArgNode.java:36:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from RescueNode.java:199:in `executeBody' 
    [gem]  from RescueNode.java:118:in `interpretWithJavaExceptions' 
    [gem]  from RescueNode.java:110:in `interpret' 
    [gem]  from InterpretedMethod.java:180:in `call' 
    [gem]  from DefaultMethod.java:172:in `call' 
    [gem]  from CachingCallSite.java:309:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:148:in `call' 
    [gem]  from CallOneArgNode.java:57:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedMethod.java:180:in `call' 
    [gem]  from DefaultMethod.java:172:in `call' 
    [gem]  from CachingCallSite.java:309:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:148:in `call' 
    [gem]  from CallOneArgNode.java:57:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from RescueNode.java:199:in `executeBody' 
    [gem]  from RescueNode.java:118:in `interpretWithJavaExceptions' 
    [gem]  from RescueNode.java:110:in `interpret' 
    [gem]  from BeginNode.java:83:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from RootNode.java:129:in `interpret' 
    [gem]  from Ruby.java:2540:in `loadFile' 
    [gem]  from ExternalScript.java:61:in `load' 
    [gem]  from LoadService.java:255:in `load' 
    [gem]  from RubyKernel.java:1010:in `loadCommon' 
    [gem]  from RubyKernel.java:992:in `load' 
    [gem]  from org/jruby/RubyKernel$s_method_0_1$RUBYFRAMEDINVOKER$load.gen:65535:in `call' 
    [gem]  from DynamicMethod.java:190:in `call' 
    [gem]  from DynamicMethod.java:186:in `call' 
    [gem]  from CachingCallSite.java:309:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:148:in `call' 
    [gem]  from FCallOneArgNode.java:36:in `interpret' 
    [gem]  from NewlineNode.java:104:in `interpret' 
    [gem]  from BlockNode.java:71:in `interpret' 
    [gem]  from InterpretedBlock.java:373:in `evalBlockBody' 
    [gem]  from InterpretedBlock.java:327:in `yield' 
    [gem]  from BlockBody.java:78:in `call' 
    [gem]  from Block.java:89:in `call' 
    [gem]  from RubyProc.java:224:in `call' 
    [gem]  from ProcMethod.java:62:in `call' 
    [gem]  from DynamicMethod.java:182:in `call' 
    [gem]  from DynamicMethod.java:178:in `call' 
    [gem]  from CachingCallSite.java:289:in `cacheAndCall' 
    [gem]  from CachingCallSite.java:108:in `call' 
    [gem]  from gem:1:in `__file__' 
    [gem]  from gem:-1:in `load' 
    [gem]  from Ruby.java:685:in `runScript' 
    [gem]  from Ruby.java:568:in `runNormally' 
    [gem]  from Ruby.java:414:in `runFromMain' 
    [gem]  from Main.java:286:in `run' 
    [gem]  from Main.java:128:in `run' 
    [gem]  from Main.java:97:in `main' 

BUILD FAILED 
C:\workspace\cucumber-helloworld\build.xml:33: Failed to run gem with arguments: install cuke4duke --version 0.4.4 --source http://rubygems.org/ 

총 시간 : 10 초

+0

아이비 문제가 아닙니다. 검색 작업이 성공적으로 완료되었습니다. 루비 보석 실패처럼 보입니다. –

답변

1

는 것 같다 나는 다음 site을 발견했습니다,하지만 가장 가까운 내가 프로젝트를 빌드에 올 수 있었던 자신의 코드를 체크 아웃 한 후 다음과 같은 오류입니다 cuke4duke 프로젝트가 죽었어요. 이 프로젝트를 cucumber-jvm으로 바꾼다. here.

1

행동을 설명하는 데 Gherkin과 동일한 구문 (AFAICT)을 사용하고 Java에서 기본이기 때문에 아마도 을 사용했을 것으로 생각 했습니까? 이렇게하면 JRuby 코드를 작성하지 않는 한 JRuby 등 모든 번거 로움을 피할 수 있습니다.

+0

그럴 가능성이 높습니다. 지금 나는 방금 옵션을 연구 중이다. 사람들이 google 오이와 자바 (적어도 현재는)에서 발견 할 수있는 대부분은 죽은 cuke4duke를 가리킬 것이다. – Scott