giter8 icon indicating copy to clipboard operation
giter8 copied to clipboard

`sbt new` not working reliable, gives server errors

Open mkurz opened this issue 8 months ago • 1 comments

  • Originally posted here: https://github.com/sbt/sbt/issues/8144

steps

  • sbt new
  • choosing g (play-java-seed.g8)
  • takes a while

problem

Timeout with error message

Unexpected response status 504 fetching metadata from https://search.maven.org/solrsearch/select?q=g:%22org.foundweekends.giter8%22+AND+a:%22giter8_2.13%22&rows=10&wt=xml

expectation

sbt new should work - and take you to the next step (name [play-java-seed]: ...)

notes

This did happen to me 3 times in the last 2 weeks, other user(s) are reporting the same in https://github.com/sbt/sbt/issues/8144

It looks like the problem originates here:

  • https://github.com/playframework/play-java-seed.g8/blob/3.0.x/src/main/g8/default.properties#L11
  • https://github.com/foundweekends/giter8/blob/v0.17.0/library/src/main/scala/giter8/MavenHelper.scala#L24-L26

Maybe giter8 should fall back to a default if it can't fetch the versions from the maven.org api?

  • Either hardcode some values for the most used libraries.
  • Or what about a fallback mechanism in the properties file itself? Something like
    sbt_giter8_scaffold_version = maven(org.foundweekends.giter8, giter8_2.13), 0.17.0
    
    So if the server error occurs OR if after like a timeout of 3 seconds no answer received yet the fallback will be used instead?

mkurz avatar Jun 13 '25 07:06 mkurz

For the play seed projects, as a workaround I made them avoid querying maven.org:

  • https://github.com/playframework/play-java-seed.g8/pull/205
  • https://github.com/playframework/play-java-seed.g8/pull/204
  • https://github.com/playframework/play-scala-seed.g8/pull/280
  • https://github.com/playframework/play-scala-seed.g8/pull/281

mkurz avatar Jun 13 '25 11:06 mkurz

  • https://github.com/foundweekends/giter8/pull/977

xuwei-k avatar Aug 29 '25 23:08 xuwei-k

0.18.0-RC1 released

xuwei-k avatar Sep 06 '25 05:09 xuwei-k