swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.97k stars 6.04k forks source link

Could not resolve dependencies for io.swagger:swagger-parser:jar:1.0.24-SNAPSHOT #4449

Closed tuolap closed 7 years ago

tuolap commented 7 years ago
Description

Trying to build the mvn package and I get the following error:

$ ./run-in-docker.sh mvn package
....
Downloaded: https://repo.maven.apache.org/maven2/org/jmockit/jmockit/1.25/jmockit-1.25.jar (742 KB at 172.0 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] swagger-codegen-project ............................ SUCCESS [ 36.561 s]
[INFO] swagger-codegen (core library) ..................... FAILURE [01:05 min]
[INFO] swagger-codegen (executable) ....................... SKIPPED
[INFO] swagger-codegen (maven-plugin) ..................... SKIPPED
[INFO] swagger-generator .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:50 min
[INFO] Finished at: 2016-12-22T10:16:30+00:00
[INFO] Final Memory: 22M/295M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project swagger-codegen: Could not resolve dependencies for project io.swagger:swagger-codegen:jar:2.2.2-S
NAPSHOT: The following artifacts could not be resolved: io.swagger:swagger-parser:jar:1.0.24-SNAPSHOT, io.swagger:swagger-compat-spec-parser
:jar:1.0.24-SNAPSHOT: Could not find artifact io.swagger:swagger-parser:jar:1.0.24-SNAPSHOT in sonatype-snapshots (https://oss.sonatype.org/
content/repositories/snapshots) -> [Help 1]                                                                                                
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :swagger-codegen
Swagger-codegen version

Latest from master (https://github.com/swagger-api/swagger-codegen/commit/d7afb22f1fcbb24b03dc3b2dab014877f2345d7a)

Steps to reproduce
git clone https://github.com/swagger-api/swagger-codegen
cd swagger-codegen
./run-in-docker.sh mvn package
Related issues
Suggest a Fix

swagger-parser's dev version was bumped to 1.0.25-SNAPSHOT few days ago and 1.0.24-SNAPSHOT is missing from https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-parser/, so bumping it's version in pom.xml might help.

wing328 commented 7 years ago

@tuolap thanks for reporting the issue. I've updated Swagger Parser version to 1.0.25-SNAPSHOT: d52f5a3133596aecc2b26a3bfe433379fe8d3f7d

Please pull the latest master to give it another try.

tuolap commented 7 years ago

thanks, seems to work!

koryshev commented 7 years ago

Hello! swagger-parser's dev version was bumped to 1.0.26-SNAPSHOT so the problem is actual again.

wing328 commented 7 years ago

@koryshev I've rolled back swagger parser to v1.0.24 via https://github.com/swagger-api/swagger-codegen/commit/fb3d4e61bb5c7f5ea343d8eac2d0842c2ffe685e for the time being while we're fixing the test issues due to changes in the latest swagger parser (1.0.26-SNAPSHOT)

Please pull the latest to give it a try.

fehguy commented 7 years ago

@wing328 I suggest using v1.0.25 of parser unless there's a reason why to use the next development version.

wing328 commented 7 years ago

@fehguy I did go with 1.0.25 to start with but got errors too. I'll do another test to double confirm.

wing328 commented 7 years ago

@fehguy FYI. Here are the errors using Swagger Parser 1.0.25:

Results :

Failed tests: 
  SwaggerMigratorTest.swaggerMigratorTest:14 » ClassCast java.math.BigDecimal ca...
  JavaScriptModelEnumTest.enumArrayMdoelTest:99 » NoSuchMethod io.swagger.models...
  JavaScriptModelEnumTest.enumMdoelValueTest:130 » NoSuchMethod io.swagger.model...
  ObjcModelTest.isArrayModelModelTest:297 » NoSuchMethod io.swagger.models.param...
  ObjcModelTest.mixedPropertiesDataModelTest:286 » NoSuchMethod io.swagger.model...
  ObjcModelTest.udidAndPasswordDataModelTest:272 » NoSuchMethod io.swagger.model...
  PhpModelTest.enumArrayMdoelTest:282 » NoSuchMethod io.swagger.models.parameter...
  PhpModelTest.enumMdoelValueTest:313 » NoSuchMethod io.swagger.models.parameter...
  TypeScriptFetchModelTest.enumArrayMdoelTest:192 » NoSuchMethod io.swagger.mode...
  TypeScriptFetchModelTest.enumMdoelValueTest:226 » NoSuchMethod io.swagger.mode...

Tests run: 598, Failures: 10, Errors: 0, Skipped: 0

Swagger parser version used in my test:

swagger-codegen|master⚡ ⇒ grep "1.0.25" pom.xml 
        <swagger-parser-version>1.0.25</swagger-parser-version>
swagger-codegen|master⚡ ⇒ 
fehguy commented 7 years ago

OK keep it at 1.0.24 and I'll send a PR to address these issues. It will not change with 1.0.26-SNAPSHOT

wing328 commented 7 years ago

@fehguy thanks 👍