JetBrains / sbt-idea-plugin

Develop IntelliJ plugins with Scala and SBT
Apache License 2.0
97 stars 28 forks source link

java.io.FileNotFoundException: https://d2s4y8xcwt8bet.cloudfront.net/com/jetbrains/intellij/idea/ideaIC/LATEST-EAP-SNAPSHOT/ideaIC-LATEST-EAP-SNAPSHOT-sources.jar #104

Closed jerrytheprogrammer closed 3 years ago

jerrytheprogrammer commented 3 years ago

plugins.sbt

addSbtPlugin("org.jetbrains" % "sbt-idea-plugin" % "3.12.1")

build.properties

sbt.version=1.3.13

build.sbt

name := "sample"

scalaVersion := "2.13.2"

intellijPlugins += "org.intellij.scala:2021.1.16".toPlugin
intellijDownloadSources := true
bundleScalaLibrary in ThisBuild := false

lazy val scalaIntellij = project.in(file("."))
  .enablePlugins(SbtIdeaPlugin)

Below is a simplified example to reproduce this problem :- https://github.com/moglideveloper/SamplePlugin

mutcianm commented 3 years ago

Sorry, there's an issue with IDEA artifacts deployment between the releases. Related issue https://github.com/JetBrains/gradle-intellij-plugin/issues/626 This will self-fix in a couple of days when the new EAP build is uploaded. In the meantime I'd suggest disabling sources downloading as a workaround if you absolutely need to use the LATEST-EAP-SNAPSHOT rather than some stable version:

intellijDownloadSources in ThisBuild := false

I must still say that it is strongly advised to prefer stable version of IJ platform if possible for production applications.

jerrytheprogrammer commented 3 years ago

Thanks @mutcianm for advising best practice.

As referred here :

https://github.com/JetBrains/intellij-scala/blob/840ec4ae3b6d52662454f2fe15077ed6d634a8d3/project/dependencies.scala#L12

Tried adding a stable version of IJ platform in build.sbt :

intellijBuild in ThisBuild := "211.6693.14"

But looks like, intellijBuild in ThisBuild is not the correct way to specify stable version of IJ platform, as still FileNotFoundException is there in build :

[error] (ThisBuild / updateIntellij) java.io.FileNotFoundException: https://d2s4y8xcwt8bet.cloudfront.net/com/jetbrains/intellij/idea/ideaIC/211.6693.14-EAP-SNAPSHOT/ideaIC-211.6693.14-EAP-SNAPSHOT-sources.jar

Kindly suggest, how to specify the stable version of IJ platform in build.sbt

Thanks

SamB commented 3 years ago

@jerrytheprogrammer I don't believe that build ID actually exists: it seems that sbt-idea looks for it, doesn't find it, and then retries with "-EAP-SNAPSHOT" tacked on to the end. Perhaps "211.6693.111" will do the trick? Looking on https://www.jetbrains.com/intellij-repository/releases/, that's an actual stable release that's not missing the ideaIC-sources.jar artifact.

jerrytheprogrammer commented 3 years ago

As suggested, problem self-fixed as the new EAP build is available.