我正在拼命地在OS X Mountain Lion上使用我的Macbook Pro上的swagger-codegen。swagger-codegen在mac上安裝
將Java升級到1.7。
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
安裝了自制軟糖。
按照「brew醫生」卸載Mono和Xamarin。
每個「brew doctor」都安裝了Xcode命令行工具。
執行的 「釀造更新」
安裝斯卡拉 「釀造安裝階」。
安裝SBT 「釀造安裝SBT」
執行的 「SBT」
[info] Loading project definition from /Users/jecz/Apache/swagger-codegen-master/project
[info] Set current project to swagger-codegen (in build file:/Users/jecz/Apache/swagger-codegen-master/)
執行的 「./sbt組件」
Detected sbt version 0.13.0
[info] Loading project definition from /Users/jecz/Apache/swagger-codegen-master/project
[info] Set current project to swagger-codegen (in build file:/Users/jecz/Apache/swagger-codegen-master/)
[warn] Credentials file /Users/jecz/.ivy2/.credentials does not exist
[info] ResourceExtractorTest:
[info] ResourceExtractor
[info] - should get 3 apis from a resource listing
[info] ApiExtractorTest:
[info] ApiExtractor
[info] - should verify the deserialization of the store api
[info] ResourceListingValidationTest:
[info] - should not have base path
[info] - should fail resource listing without apiVersion
[info] - should fail with missing paths in a ResourceListing
[info] ApiListingReferenceValidationTest:
[info] - should deserialize an ApiListingReference
[info] - should serialize an ApiListingReference
[info] ApiDescriptionValidationTest:
[info] - should fail to deserialize an ApiDescription with path, method, return type
[info] OperationValidationTest:
[info] - should fail to deserialize an Operation with missing param type
[info] - should serialize an operation
[info] ResponseMessageValidationTest:
[info] - should deserialize an ResponseMessage
[info] - should serialize an operation
[info] ParameterValidationTest:
[info] - should deserialize another param
[info] - should deserialize a parameter
[info] - should serialize a parameter
[info] ModelValidationTest:
[info] - should deserialize a model
[info] - should serialize a model
[info] ModelRefValidationTest:
[info] - should deserialize a model ref
[info] - should serialize a model ref
[info] ModelPropertyValidationTest:
[info] - should deserialize a model property with allowable values and ref
[info] - should serialize a model property with allowable values and ref
[info] - should deserialize a model property with allowable values
[info] - should serialize a model property with allowable values
[info] - should deserialize a model property
[info] - should serialize a model property
[info] AllowableValuesValidationTest:
[info] - should deserialize allowable value list
[info] - should serialize allowable values list
[info] - should deserialize allowable values range
[info] - should serialize allowable values range
[info] ResourceListingSerializersTest:
[info] - should deserialize an ResourceListing with no apis
[info] - should serialize an ApiListingReference with no apis
[info] - should deserialize an ResourceListing
[info] - should serialize an ApiListingReference
[info] ApiListingReferenceSerializersTest:
[info] - should deserialize an ApiListingReference
[info] - should serialize an ApiListingReference
[info] ApiDescriptionSerializersTest:
[info] - should deserialize an ApiDescription with no ops
[info] - should serialize an ApiDescription with no operations
[info] - should deserialize an ApiDescription
[info] - should serialize an ApiDescription
[info] OperationSerializersTest:
[info] - should deserialize an Operation
[info] - should serialize an operation
[info] ErrorResponseSerializersTest:
[info] - should deserialize an ResponseResponse
[info] - should serialize an operation
[info] ParameterSerializersTest:
[info] - should deserialize another param
[info] - should deserialize a parameter
[info] - should serialize a parameter
[info] ModelSerializationTest:
[info] - should deserialize a model
[info] - should serialize a model
[info] ModelRefSerializationTest:
[info] - should deserialize a model ref
[info] - should serialize a model ref
[info] ModelPropertySerializationTest:
[info] - should deserialize a model property with allowable values and ref
[info] - should serialize a model property with allowable values and ref
[info] - should deserialize a model property with allowable values
[info] - should serialize a model property with allowable values
[info] - should deserialize a model property
[info] - should serialize a model property
[info] AllowableValuesSerializersTest:
[info] - should deserialize allowable value list
[info] - should serialize allowable values list
[info] - should deserialize allowable values range
[info] - should serialize allowable values range
[info] ResourceListingValidationTest:
[info] - should fail resource listing without base path
[info] - should fail resource listing without apiVersion
[info] - should fail with missing paths in a ResourceListing
[info] ApiListingReferenceValidationTest:
[info] - should deserialize an ApiListingReference
[info] - should serialize an ApiListingReference
[info] ApiDescriptionValidationTest:
[info] - should fail to deserialize an ApiDescription with path, method, return type
[info] OperationValidationTest:
[info] - should fail to deserialize an Operation with missing param type
[info] - should serialize an operation
[info] ResponseMessageValidationTest:
[info] - should deserialize an ResponseMessage
[info] - should serialize an operation
[info] ParameterValidationTest:
[info] - should deserialize another param
[info] - should deserialize a parameter
[info] - should serialize a parameter
[info] ModelValidationTest:
[info] - should deserialize a model
[info] - should serialize a model
[info] ModelRefValidationTest:
[info] - should deserialize a model ref
[info] - should serialize a model ref
[info] ModelPropertyValidationTest:
[info] - should deserialize a model property with allowable values and ref
[info] - should serialize a model property with allowable values and ref
[info] - should deserialize a model property with allowable values
[info] - should serialize a model property with allowable values
[info] - should deserialize a model property
[info] - should serialize a model property
[info] AllowableValuesValidationTest:
[info] - should deserialize allowable value list
[info] - should serialize allowable values list
[info] - should deserialize allowable values range
[info] - should serialize allowable values range
[info] SwaggerModelTest:
[info] Swagger Model
[info] - should deserialize ResourceListing
[info] - should deserialize ApiListing
[info] - should deserialize ApiListing with AllowableValues
[info] - should maintain model property order when deserializing
[info] - should deserialize models
[info] ResourceExtractorTest:
[info] ResourceExtractor
[info] - should get 3 apis from a resource listing
[info] ApiExtractorTest:
[info] ApiExtractor
[info] - should verify the deserialization of the store api
09:49:13,840 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:49:13,840 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:49:13,840 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/jecz/Apache/swagger-codegen-master/target/scala-2.9.1/classes/logback.xml]
09:49:13,991 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:49:14,000 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:49:14,012 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
09:49:14,114 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead.
09:49:14,114 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
09:49:14,114 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
09:49:14,116 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.wordnik] to DEBUG
09:49:14,116 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to ERROR
09:49:14,116 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
09:49:14,117 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:49:14,119 |-INFO in [email protected] - Registering current configuration as safe fallback point
[info] BasicScalaGeneratorTest:
[info] BasicScalaGenerator
[info] - should process a response declaration
[info] - should process a string response
[info] - should process a string array
[info] - should process an unmapped response type
[info] - should get the invoker package
[info] - should get the api package
[info] - should get the model package
[info] - should convert to a declared type
[info] - should convert a string a declaration
[info] - should honor the import mapping
[info] - should quote a reserved var name
[info] - should create a declaration with a List of strings
[info] - should create a declaration with a List of ints
[info] - should create a declaration with a List of floats
[info] - should create a declaration with a List of doubles
[info] - should create a declaration with a List of complex objects
[info] - should verify an api map with query params
[info] - should verify an api map with query params with default values
[info] - should create an api file
[info] BasicGeneratorTest:
[info] BasicGenerator
[info] - should get operations
[info] - should verify ops are grouped by path correctly
[info] - should create a model map
[info] - should create a model file
[info] BasicJavaGeneratorTest:
[info] BasicJavaGenerator
[info] - should process a response declaration
[info] - should process a string response
[info] - should process a string array
[info] - should process an upper-case string array
[info] - should process an unmapped response type
[info] - should get the invoker package
[info] - should get the api package
[info] - should get the model package
[info] - should convert to a declared type
[info] - should convert a string a declaration
[info] - should honor the import mapping
[info] - should quote a reserved var name
[info] - should create a declaration with a List of strings
[info] - should create a declaration with a List of ints
[info] - should create a declaration with a List of floats
[info] - should create a declaration with a List of doubles
[info] - should create a declaration with a List of complex objects
[info] CodegenConfigTest:
[info] PathUtil
[info] - should convert an api name
[info] - should convert a path
[info] CodegenConfig
[info] - should process a response declaration
[info] - should process an unchanged response
[info] - should process an mapped response type
[info] - should get the invoker package
[info] - should get the api package
[info] - should get the model package
[info] - should convert to a declared type
[info] - should honor the import mapping
[info] - should quote a reserved var name
[info] CoreUtilsTest:
[info] CoreUtils
[info] - should verify models are extracted
[info] - should verify operation names
[info] - should find required models
[info] - should find required models from a nested list
[info] PathUtilTest:
[info] PathUtil
[info] - should convert an api name
[info] - should convert a path
[info] - should get determine the basePath implicitly
[info] ResourceListingSerializersTest:
[info] - should deserialize an ResourceListing with no apis
[info] - should serialize an ApiListingReference with no apis
[info] - should deserialize an ResourceListing
[info] - should serialize an ApiListingReference
[info] ApiListingReferenceSerializersTest:
[info] - should deserialize an ApiListingReference
[info] - should serialize an ApiListingReference
[info] ApiDescriptionSerializersTest:
[info] - should deserialize an ApiDescription with no ops
[info] - should serialize an ApiDescription with no operations
[info] - should deserialize an ApiDescription
[info] - should serialize an ApiDescription
[info] OperationSerializersTest:
[info] - should deserialize an Operation
[info] - should deserialize an Operation with an array property
[info] - should serialize an operation
[info] - should deserialize an Operation with array
[info] ErrorResponseSerializersTest:
[info] - should deserialize an Response
[info] - should serialize an operation
[info] ParameterSerializersTest:
[info] - should deserialize another param
[info] - should deserialize a parameter
[info] - should serialize a parameter
[info] ModelSerializationTest:
[info] - should deserialize a model
[info] - should deserialize a model with a set
[info] - should serialize a model
[info] ModelRefSerializationTest:
[info] - should deserialize a model ref
[info] - should serialize a model ref
[info] ModelPropertySerializationTest:
[info] - should deserialize a model property with allowable values and ref
[info] - should serialize a model property with allowable values and ref
[info] - should deserialize a model property with allowable values
[info] - should serialize a model property with allowable values
[info] - should deserialize a model property
[info] - should serialize a model property
[info] - should extract model properties
[info] - should extract model properties with arrays
[info] AllowableValuesSerializersTest:
[info] - should deserialize allowable value list
[info] - should serialize allowable values list
[info] - should deserialize allowable values range
[info] - should serialize allowable values range
[info] CoreUtilsTest:
[info] CoreUtils
[info] - should verify models are extracted
[info] - should verify operation names
[info] - should find required models
[info] - should find required models from a nested list
[info] BasicCSharpGeneratorTest:
[info] BasicCSharpGenerator
[info] - should perserve the name date
[info] - should process a string array
[info] Passed: Total 194, Failed 0, Errors 0, Passed 194
[info] Including from cache: json4s-ast_2.9.1-3.2.5.jar
[info] Including from cache: jackson-annotations-2.2.2.jar
[info] Including from cache: jackson-core-2.2.2.jar
[info] Including from cache: json4s-core_2.9.1-3.2.5.jar
[info] Including from cache: jackson-databind-2.2.2.jar
[info] Including from cache: paranamer-2.5.6.jar
[info] Including from cache: commons-io-2.3.jar
[info] Including from cache: scala-inflector_2.9.1-1.3.5.jar
[info] Including from cache: json4s-jackson_2.9.1-3.2.5.jar
[info] Including from cache: mockito-all-1.9.0.jar
[info] Including from cache: scallop_2.9.1-0.9.4.jar
[info] Including from cache: scalate-core_2.9-1.6.1.jar
[info] Including from cache: scalate-util_2.9-1.6.1.jar
[info] Including from cache: scala-compiler-2.9.1.jar
[info] Including from cache: scala-library-2.9.1.jar
[info] Including from cache: scalap-2.9.1.jar
[info] Including from cache: slf4j-api-1.6.1.jar
[warn] Merging 'META-INF/MANIFEST.MF' with strategy 'discard'
[warn] Strategy 'discard' was applied to a file
[info] Checking every *.class/*.jar file's SHA-1.
[info] Assembly up to date: /Users/jecz/Apache/swagger-codegen-master/target/scala-2.9.1/swagger-codegen.jar
[success] Total time: 26 s, completed Nov 1, 2013 9:49:34 AM
執行的」 ./bin/scala-petstore。 sh「
Please set scalaVersion := "2.10.3" in build.sbt and run ./sbt assembly
更新的原始問題與結果。似乎更接近一點。出現以下錯誤:「請在build.sbt中設置scalaVersion:=」2.10.3「並運行./sbt程序集」 – jecz