swagger-api / swagger-samples

Samples for the various Swagger projects under swagger-api
http://swagger.io
Apache License 2.0
538 stars 883 forks source link

swagger-samples/java/java-jersey-jaxrs Build error #198

Open pingsutw opened 4 years ago

pingsutw commented 4 years ago

After run mvn package -Dlog4j.configuration=file:./conf/log4j.properties jetty:run I got following error

[INFO] Total time:  0.309 s
[INFO] Finished at: 2020-04-29T20:10:43+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project swagger-java-jersey-sample-app: Could not resolve dependencies for project io.swagger:swagger-java-jersey-sample-app:war:1.0.0: Failure to find io.swagger:swagger-jersey-jaxrs:jar:1.5.22-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced -> [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

If I change swagger-version from 1.5.22-SNAPSHOT to 1.5.22, it works well.

VasilVasilev93 commented 4 years ago

Same here, cannot use the snapshot versions, maybe it has to do with the nexus m2 mirrors setup.

rtomlinson-clari commented 2 years ago

I get the same error in the java-jersey2 project. Workaround, was the same as pingsutw, by changing the dependency in the root level pom.xml to not include SNAPSHOT.