sbt-openapi-generator icon indicating copy to clipboard operation
sbt-openapi-generator copied to clipboard

Set up repositories for publishing releases and snapshots

Open chameleon82 opened this issue 5 years ago • 13 comments

Define which repositories this artefact will be published.

At least, for sbt community it should be published to https://bintray.com/sbt/sbt-plugin-releases, I believe @eed3si9n can help us on it.

chameleon82 avatar Mar 02 '20 02:03 chameleon82

We have a bintray account, but I don't have the details. I'll set this up once I get the credentials.

jimschubert avatar Mar 03 '20 12:03 jimschubert

I've been added to our bintray account. The documentation for publishing to bintray is fairly straightforward… https://www.scala-sbt.org/1.x/docs/Bintray-For-Plugins.html

jimschubert avatar Mar 15 '20 01:03 jimschubert

I've gotten this working. Please evaluate when you have a chance: https://bintray.com/beta/#/openapitools/sbt-plugins/sbt-openapi-generator?tab=overview

Bintray doesn't support snapshots, so non-release plugins have a funky looking suffix.

I'm thinking about doing an automated monthly "snapshot" build (to reduce cluttering artifacts too much), then a release version build + tag. We can build ad-hoc as well for the "snapshot" releases, but the scala generators change so infrequently.

jimschubert avatar Mar 28 '20 21:03 jimschubert

I found snapshots supported by oss.jfrog.com repository which likely could be activated with bintray the main difference i see bintray - cdn for releases oss - artifactory for development/snapshots both support maven

some details found in next article https://reflectoring.io/publish-snapshots-with-gradle/

chameleon82 avatar Mar 29 '20 10:03 chameleon82

Thanks. I wasn't able to sign up for oss.jfrog.org. It seems like they now have a different offering for OSS at https://jfrog.com/artifactory/saas-gcp/. I've requested OSS access here, but the email they respond with refers to a 14 day free trial. I guess we'll see what goes down with that.

I think I'll hold off on the 4.3.0 release of the SBT plugin for a couple days, because I'd rather that be synced to JFrog's Artifactory if possible.

jimschubert avatar Apr 04 '20 01:04 jimschubert

Also, the bintray user interface doesn't have the option to link as the blog post you posted has. I google for other tutorials, which all reference that option. I don't see it in the old or the new UI, and I'm an admin on the project. ¯\_(ツ)_/¯

jimschubert avatar Apr 04 '20 01:04 jimschubert

@jimschubert i've checked my repo and i have this button for my repo https://bintray.com/adenza/sbt-plugins/sbt-openapi-generator It should be here https://bintray.com/openapitools/sbt-plugins/sbt-openapi-generator in right bottom corner in section Linked to (0) If button not there it could be for next reasons:

  • VCS not point to github project
  • Maturity setting is incorrect ( in my repo i have Development configured)
  • something else

chameleon82 avatar Apr 22 '20 16:04 chameleon82

@jimschubert i've tested snapshot one more time next configuration works fine

project/plugins.sbt

// resolver to access to sbt-plugin in bintray
resolvers += Resolver.bintrayIvyRepo("openapitools", "sbt-plugins")

// resolver to access oss snapshots for `org.openapitools#openapi-generator-core;4.3.0-SNAPSHOT`
externalResolvers += Resolver.sonatypeRepo("snapshots")

// version
addSbtPlugin("org.openapitools" % "sbt-openapi-generator" % "4.3.0-20200404T011651-5e6cf6a9")

chameleon82 avatar Apr 22 '20 16:04 chameleon82

I'll go ahead and release the 4.3.0 version. JFrog never responded about the artifactory hosting, and I'm blocked in usage of Bintray and its cryptic errors and usage. We can always review and change the hosting strategy in the future.

jimschubert avatar Apr 26 '20 01:04 jimschubert

  • VCS not point to github project
  • Maturity setting is incorrect ( in my repo i have Development configured)
  • something else

The UI doesn't allow me to set the github project, it keeps saying it's not found. I've also tried all maturity levels and nothing resolves. I'm an admin on the project.

jimschubert avatar Apr 26 '20 02:04 jimschubert

@jimschubert here is instruction how to link package to sbt organization and make it available by default resolvers https://www.scala-sbt.org/1.x/docs/Combined+Pages.html#Linking+your+package+to+the+sbt+organization

chameleon82 avatar May 20 '20 12:05 chameleon82

Thanks. I'd followed those but seems to be an issue in Bintray since I'm an admin but don't have the option.

jimschubert avatar May 20 '20 13:05 jimschubert

I found the issue why we cannot connect repo to jcenter. It is because Repository "sbt-plugins " was created with "Repository Type" = "Generic" rather than "Maven". Seems to have it we might need to recreate repository as it is not possible to change repository type after it was created.

chameleon82 avatar Jun 01 '20 14:06 chameleon82