Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find new source for sbt-git-stamp, other than bintray.com #996

Open
gwwatkin opened this issue Sep 13, 2021 · 3 comments
Open

Find new source for sbt-git-stamp, other than bintray.com #996

gwwatkin opened this issue Sep 13, 2021 · 3 comments

Comments

@gwwatkin
Copy link

Building with sbt is broken. The cause is the unresolved dependency uk.gov.hmrc#sbt-git-stamp;5.2.0: not found.

Previously, sbt-git-stamp was fetched from bintray:

// The Sbt-Git-Stamp repo
resolvers += Resolver.url("hmrc-sbt-plugin-releases",
url("https://dl.bintray.com/hmrc/sbt-plugin-releases"))(Resolver.ivyStylePatterns)

But bintray.com has been dismantled: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

@frbayart
Copy link
Contributor

Hi, @gwwatkin
can you open a PR to fix it?

Thx

@gwwatkin
Copy link
Author

Hi @frbayart,

Don't think I can :/ . looks like this is a problem with upstream sbt git stamp: hmrc/sbt-git-stamp#15. I'm not enough of an expert to go ahead and set up a mirror.

So to keep moving I just disabled the git stamping feature in the manifest file, which seems to work fine

Patch:
diff --git a/build.sbt b/build.sbt
index a46b5f20..22d9b33a 100644
--- a/build.sbt
+++ b/build.sbt
@@ -27,8 +27,6 @@ enablePlugins(GitVersioning)
 
 enablePlugins(GitBranchPrompt)
 
-import uk.gov.hmrc.gitstamp.GitStampPlugin._
-
 import com.typesafe.sbt.SbtNativePackager.autoImport.NativePackagerHelper._
 
 dockerBaseImage := DockerProperties.baseImage
@@ -346,9 +344,6 @@ lazy val sparkNotebook = rootProject.enablePlugins(SbtWeb)
     git.useGitDescribe := true,
     git.baseVersion := SparkNotebookSimpleVersion
   )
-  .settings(
-    gitStampSettings: _*
-  )
   .settings(
     Extra.sparkNotebookSettings
   )
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 3c8b5405..1c59e009 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -4,10 +4,6 @@ logLevel := Level.Warn
 // The Typesafe repository
 resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
 
-// The Sbt-Git-Stamp repo
-resolvers += Resolver.url("hmrc-sbt-plugin-releases",
-  url("https://dl.bintray.com/hmrc/sbt-plugin-releases"))(Resolver.ivyStylePatterns)
-
 // Use the Play sbt plugin for Play projects
 addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.5.15")
 
@@ -23,8 +19,6 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.3.2")
 
 addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.8.5")
 
-addSbtPlugin("uk.gov.hmrc" % "sbt-git-stamp" % "5.2.0")
-
 /**
   * coursier
   *

@falconepl
Copy link

I have recently created a fork of hmrc/sbt-git-stamp plugin:
https://github.com/nescale/sbt-git-stamp

It's available on Maven Central. You can switch to it by adding the following to the project/plugins.sbt file:

addSbtPlugin("com.nescale" % "sbt-git-stamp" % "1.0.0")

And those two lines to the build.sbt file:

import com.nescale.gitstamp.GitStampPlugin._

Seq(gitStampSettings: _*)

Check out the README for more details. Version 1.0.0 of the fork is compatible with the last version (6.2.0) of this plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants