hootsuite / sbt-swagger

SBT plugin for extracting Swagger & JAX-RS (jsr311) annotations from compiled classes into Swagger API models, which are then serialized to JSON for consumption with swagger-ui.
Other
27 stars 6 forks source link

SBT can't find Swagger plugin #15

Open sashaepstein opened 4 years ago

sashaepstein commented 4 years ago

It reports unresolved dependency: com.hootsuite#sbt-swagger;1.0.0: not found Is there a particular repo that I need to add to Resolvers?

Thanks.

ssong-van commented 4 years ago

Hello,

This project is published to Bintray. Newer versions of sbt should automatically point to the correct resolver. In case it doesn't, this might help in plugins.sbt resolvers += Resolver.url("hootsuite", url("https://dl.bintray.com/hootsuite/sbt-plugins/"))(Resolver.ivyStylePatterns)

sashaepstein commented 4 years ago

Hi Steve,

Adding this resolver doesn’t seem to help, SBT still gives the same error: unresolved dependency: com.hootsuite#sbt-swagger;1.0.0: not found

Sasha

From: Steve Song notifications@github.com Sent: Monday, September 30, 2019 4:33 PM To: hootsuite/sbt-swagger sbt-swagger@noreply.github.com Cc: Sasha Epstein sasha@epstein2.com; Author author@noreply.github.com Subject: Re: [hootsuite/sbt-swagger] SBT can't find Swagger plugin (#15)

Hello,

This project is published to Bintray. Newer versions of sbt should automatically point to the correct resolver. In case it doesn't, this might help in plugins.sbt resolvers += Resolver.url("hootsuite", url("https://dl.bintray.com/hootsuite/sbt-plugins/"))(Resolver.ivyStylePatterns)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hootsuite/sbt-swagger/issues/15?email_source=notifications&email_token=AD4LJS644K4XOTUH6SWFDGTQMJO7BA5CNFSM4I27KZT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7672AQ#issuecomment-536739074 , or mute the thread https://github.com/notifications/unsubscribe-auth/AD4LJS3LA25B644Q564Z3P3QMJO7BANCNFSM4I27KZTQ .

ssong-van commented 4 years ago

Are you able to get sbt plugins listed here? https://bintray.com/beta/#/sbt/sbt-plugin-releases?tab=packages

If so and the issue seems to be sbt-swagger, please let me know which version you are using for Scala and SBT. It would also help if you can share build.sbt.

sashaepstein commented 4 years ago

I can see sbt-swagger in that repo, either from the url you specified, or directly in https://dl.bintray.com/hootsuite/sbt-plugins/com.hootsuite/

From the plugin meta in that repo I saw that the Scala version used in the build was 2.10. Correspondingly I tried to specify the exact plugin artifact as: addSbtPlugin("com.hootsuite" % "sbt-swagger_2.10" % "1.0.0")

because my Scala version is 2.12, I can’t use %%,

or just the way your doc specifies:

addSbtPlugin("com.hootsuite" % "sbt-swagger" % "1.0.0")

but neither worked.

Here is my plugins.sbt (not sure I needed resolver there but it doesn’t seem to matter):

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.20")

addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.4.2")

addSbtPlugin("com.hootsuite" % "sbt-swagger" % "1.0.0")

resolvers in Global ++= {

Seq(

Resolver.url("hootsuite", url("https://dl.bintray.com/hootsuite/sbt-plugins/"))(Resolver.ivyStylePatterns)

)}

And here is the relevant portion of my build.sbt (it is big):

settings(

name := "kernel-application",

resolvers in Global ++= {

  Seq(

    "sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",

    Resolver.bintrayRepo("cppexpert", "maven"),

    Resolver.bintrayRepo("krasserm", "maven"),

    Resolver.bintrayRepo("mfglabs", "maven"),

    "bintray-bankmonitor-hu.bankmonitor.commons" at "http://dl.bintray.com/bankmonitor/hu.bankmonitor.commons",

    "kernel snapshots" at "http://maven.gokernel.com/artifactory/sbt-release-local",

    Resolver.mavenCentral,

    Resolver.mavenLocal,

    Resolver.url("hootsuite", url("https://dl.bintray.com/hootsuite/sbt-plugins/"))(Resolver.ivyStylePatterns)

  )

},

My SBT version is 1.6. The error is:

[warn] Note: Unresolved dependencies path:

[warn] com.hootsuite:sbt-swagger:1.0.0 (scalaVersion=2.12, sbtVersion=1.0)

Thanks,

Sasha

From: Steve Song notifications@github.com Sent: Tuesday, October 1, 2019 7:26 PM To: hootsuite/sbt-swagger sbt-swagger@noreply.github.com Cc: Sasha Epstein sasha@epstein2.com; Author author@noreply.github.com Subject: Re: [hootsuite/sbt-swagger] SBT can't find Swagger plugin (#15)

Are you able to get sbt plugins listed here? https://bintray.com/beta/#/sbt/sbt-plugin-releases?tab=packages

If so and the issue seems to be sbt-swagger, please let me know which version you are using for Scala and SBT. It would also help if you can share build.sbt.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hootsuite/sbt-swagger/issues/15?email_source=notifications&email_token=AD4LJS4RRIWU5WVEH2L77SLQMPMB3A5CNFSM4I27KZT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEADB7OQ#issuecomment-537272250 , or mute the thread https://github.com/notifications/unsubscribe-auth/AD4LJSYS27YVG5IYNPSGM6DQMPMB3ANCNFSM4I27KZTQ .

sashaepstein commented 4 years ago

Sorry, I mistyped my SBT version, it is 1.2.7.

Sasha

From: sasha@epstein2.com sasha@epstein2.com Sent: Tuesday, October 1, 2019 8:12 PM To: 'hootsuite/sbt-swagger' reply@reply.github.com; 'hootsuite/sbt-swagger' sbt-swagger@noreply.github.com Cc: 'Author' author@noreply.github.com Subject: RE: [hootsuite/sbt-swagger] SBT can't find Swagger plugin (#15)

I can see sbt-swagger in that repo, either from the url you specified, or directly in https://dl.bintray.com/hootsuite/sbt-plugins/com.hootsuite/

From the plugin meta in that repo I saw that the Scala version used in the build was 2.10. Correspondingly I tried to specify the exact plugin artifact as: addSbtPlugin("com.hootsuite" % "sbt-swagger_2.10" % "1.0.0")

because my Scala version is 2.12, I can’t use %%,

or just the way your doc specifies:

addSbtPlugin("com.hootsuite" % "sbt-swagger" % "1.0.0")

but neither worked.

Here is my plugins.sbt (not sure I needed resolver there but it doesn’t seem to matter):

addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2")

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.20")

addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.4.2")

addSbtPlugin("com.hootsuite" % "sbt-swagger" % "1.0.0")

resolvers in Global ++= {

Seq(

Resolver.url("hootsuite", url("https://dl.bintray.com/hootsuite/sbt-plugins/"))(Resolver.ivyStylePatterns)

)}

And here is the relevant portion of my build.sbt (it is big):

settings(

name := "kernel-application",

resolvers in Global ++= {

  Seq(

    "sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",

    Resolver.bintrayRepo("cppexpert", "maven"),

    Resolver.bintrayRepo("krasserm", "maven"),

    Resolver.bintrayRepo("mfglabs", "maven"),

    "bintray-bankmonitor-hu.bankmonitor.commons" at "http://dl.bintray.com/bankmonitor/hu.bankmonitor.commons",

    "kernel snapshots" at "http://maven.gokernel.com/artifactory/sbt-release-local",

    Resolver.mavenCentral,

    Resolver.mavenLocal,

    Resolver.url("hootsuite", url("https://dl.bintray.com/hootsuite/sbt-plugins/"))(Resolver.ivyStylePatterns)

  )

},

My SBT version is 1.6. The error is:

[warn] Note: Unresolved dependencies path:

[warn] com.hootsuite:sbt-swagger:1.0.0 (scalaVersion=2.12, sbtVersion=1.0)

Thanks,

Sasha

From: Steve Song <notifications@github.com mailto:notifications@github.com > Sent: Tuesday, October 1, 2019 7:26 PM To: hootsuite/sbt-swagger <sbt-swagger@noreply.github.com mailto:sbt-swagger@noreply.github.com > Cc: Sasha Epstein <sasha@epstein2.com mailto:sasha@epstein2.com >; Author <author@noreply.github.com mailto:author@noreply.github.com > Subject: Re: [hootsuite/sbt-swagger] SBT can't find Swagger plugin (#15)

Are you able to get sbt plugins listed here? https://bintray.com/beta/#/sbt/sbt-plugin-releases?tab=packages

If so and the issue seems to be sbt-swagger, please let me know which version you are using for Scala and SBT. It would also help if you can share build.sbt.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hootsuite/sbt-swagger/issues/15?email_source=notifications&email_token=AD4LJS4RRIWU5WVEH2L77SLQMPMB3A5CNFSM4I27KZT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEADB7OQ#issuecomment-537272250 , or mute the thread https://github.com/notifications/unsubscribe-auth/AD4LJSYS27YVG5IYNPSGM6DQMPMB3ANCNFSM4I27KZTQ .

ssong-van commented 4 years ago

Thanks for the info. The root cause is that sbt-swagger is compiled with Scala 2.10 and SBT 0.13.x. I tried to cross compile to 2.11 and 2.12 without success.

Looking at versions on https://github.com/swagger-api/swagger-core, it requires newer version of swagger-core in order to go to 2.12. This will be a big change as newer swagger-core adopts new OpenAPI spec.

We currently don't have capacity to support this project and bring it up to more recent versions. A PR is always welcome and we can review but cannot commit to doing it ourselves.

Have you looked for other options? Is there another SBT plugin that's more recent than this project?

sashaepstein commented 4 years ago

Thanks, Steve, that’s what I thought when I looked at https://dl.bintray.com/hootsuite/sbt-plugins/com.hootsuite/sbt-swagger/scala_2.10/sbt_0.13/1.0.0/ivys/ivy.xml

I found one more swagger plugin for SBT but that one is for Swagger 2.0 API and for Akka HTTP REST server. Neither is what I need. There is what seems to be a sutable Swagger plugin for Gradle but I hate to convert our project to Gradle.

Sasha

From: Steve Song notifications@github.com Sent: Wednesday, October 2, 2019 7:33 PM To: hootsuite/sbt-swagger sbt-swagger@noreply.github.com Cc: Sasha Epstein sasha@epstein2.com; Author author@noreply.github.com Subject: Re: [hootsuite/sbt-swagger] SBT can't find Swagger plugin (#15)

Thanks for the info. The root cause is that sbt-swagger is compiled with Scala 2.10 and SBT 0.13.x. I tried to cross compile to 2.11 and 2.12 without success.

Looking at versions on https://github.com/swagger-api/swagger-core, it requires newer version of swagger-core in order to go to 2.12. This will be a big change as newer swagger-core adopts new OpenAPI spec.

We currently don't have capacity to support this project and bring it up to more recent versions. A PR is always welcome and we can review but cannot commit to doing it ourselves.

Have you looked for other options? Is there another SBT plugin that's more recent than this project?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hootsuite/sbt-swagger/issues/15?email_source=notifications&email_token=AD4LJS4OPIXOJYRX7RMNS53QMUVTDA5CNFSM4I27KZT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAGQI4Q#issuecomment-537724018 , or mute the thread https://github.com/notifications/unsubscribe-auth/AD4LJS46JQ7Q7CHSDVIJF3LQMUVTDANCNFSM4I27KZTQ .