joepjoosten / XSL-tester

MIT License
82 stars 52 forks source link

Issues deploying lately #18

Open timrettop opened 3 years ago

timrettop commented 3 years ago

Hi there, I was looking at deploying this following the guidance in #10 however I run into an error when starting sbt.

[ec2-user@ip-10-0-0-28 XSL-tester]$ sbt
[info] Loading project definition from /home/ec2-user/XSL-tester/project
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/2.2.4/ivys/ivy.xml
[error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.10/sbt_0.13/2.2.4/ivys/ivy.xml
[error] SERVER ERROR: HTTPS Required url=http://repo1.maven.org/maven2/com/typesafe/play/sbt-plugin_2.10_0.13/2.2.4/sbt-plugin-2.2.4.pom
[error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/releases/com/typesafe/play/sbt-plugin_2.10_0.13/2.2.4/sbt-plugin-2.2.4.pom
[warn]  module not found: com.typesafe.play#sbt-plugin;2.2.4

Wondering if anyone has tried deploying this recently, does the project need to have updated sbt or scala versions?

timrettop commented 3 years ago

I was able to work around this by defining a repositories file and pointing sbt to it.

contents of /home/ec2-user/.sbt/repositories

  local
  sbt-releases-repo: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  sbt-plugins-repo: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-central: https://repo1.maven.org/maven2/
  typesafe-releases: https://repo.typesafe.com/typesafe/releases
  typesafe-ivy-releases: https://repo.typesafe.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

and execute sbt with a flag to point to this repositories file and override the cache (not sure if the second flag is always required). sbt -Dsbt.repository.config=/home/ec2-user/.sbt/repositories -Dsbt.override.build.repos=true

But there's probably a better way of handling it, I guess depending on the sbt environment maybe?

joepjoosten commented 3 years ago

Could you make a pull request for this one, i will merge it into master