sbt-microsites
sbt-microsites copied to clipboard
Error while trying to use with Intellij: not found: https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar
When I try to import an sbt project with sbt-microsites plugin, I get the following error:
Error while importing sbt project:
List(;reload; set _root_.org.jetbrains.sbt.StructureKeys.sbtStructureOptions in Global := "download resolveClassifiers resolveSbtClassifiers" ;*/*:dumpStructureTo /tmp/sbt-structure.xml; session clear-all ; set ideaPort in Global := 42399
[warn] sbt version mismatch, current: 1.3.7, in build.properties: "1.3.8", use 'reboot' to use the new value.
[info] Loading settings for project global-plugins from plugins.sbt,credentials.sbt,idea.sbt ...
[info] Loading global plugins from /home/umi/.sbt/1.0/plugins
[info] Loading settings for project garner-common2-build from plugins.sbt,idea.sbt ...
[info] Loading project definition from /run/media/umi/HDD/Projects/Scala/garner-common2/project
[info] Loading settings for project root from build.sbt ...
[warn] Discarding 1 session setting. Use 'session save' to persist session settings.
[info] Set current project to root (in build file:/run/media/umi/HDD/Projects/Scala/garner-common2/)
[info] Defining Global / sbtStructureOptions
[info] The new value will be used by Global / ssOptions
[info] Reapplying settings...
[info] Set current project to root (in build file:/run/media/umi/HDD/Projects/Scala/garner-common2/)
[error] stack trace is suppressed; run last updateSbtClassifiers for the full output
[error] (updateSbtClassifiers) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar: not found: https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar
[error] https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04-sources.jar: not found: https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04-sources.jar
[error] Total time: 1 s, completed Mar 30, 2020, 10:38:19 PM)
@MaT1g3R it seems the sources for those libraries are not available in Maven. I'm trying to identify which library uses those, but the sbt-dependency-graph fails trying to fetch the tree.
A workaround would be to disable the sbt sources in IntelliJ when updating the project. This is working for me.
@fedefernandez The work around works, but do you think we can solve the missing sources problem?
@MaT1g3R we'd need to identify from where is coming that dependency. It seems to be from an sbt-plugin but can't find which
After #465 , I've been able to load it successfully with IntelliJ.
Could you please check it out now? Thanks!
thank you, I'll try it out later today
@juanpedromoreno
Hello, I just loaded up the master branch on my local IntelliJ, and it's still not working. I did some digging and found the culprit:
com.47deg:sbt-microsites:1.1.4+17-8742a2d3+20200409-1313-SNAPSHOT
+-com.typesafe.sbt:sbt-site:1.4.0
| +-org.foundweekends:pamflet-library_2.12:0.8.0 [S]
| | +-org.antlr:stringtemplate:3.2.1
| | | +-antlr:antlr:2.7.7
pamflate is depending on an old version of
stringtemplate, which pulls in the outdated antlr
version that causes the problem. There is a new version of stringtemplate here that should fix the issue: https://github.com/antlr/stringtemplate4
But we'd need to get pamflet
to use the new version , then get sbt-site
to update to the newest pamflet
version after that......
Full dependency tree if you are interested:
Error log:
Error while importing sbt project:
List(;reload; set _root_.org.jetbrains.sbt.StructureKeys.sbtStructureOptions in Global := "download resolveClassifiers resolveSbtClassifiers" ;*/*:dumpStructureTo /tmp/sbt-structure.xml; session clear-all ; set ideaPort in Global := 33965
[info] Loading settings for project global-plugins from plugins.sbt,credentials.sbt,idea.sbt ...
[info] Loading global plugins from /home/umi/.sbt/1.0/plugins
[info] Loading settings for project sbt-microsites-build from plugins.sbt,idea.sbt ...
[info] Loading project definition from /run/media/umi/HDD/Projects/Scala/sbt-microsites/project
[info] Loading settings for project sbt-microsites from build.sbt ...
[warn] Discarding 1 session setting. Use 'session save' to persist session settings.
[info] Set current project to sbt-microsites (in build file:/run/media/umi/HDD/Projects/Scala/sbt-microsites/)
[info] Defining Global / sbtStructureOptions
[info] The new value will be used by Global / ssOptions
[info] Reapplying settings...
[info] Set current project to sbt-microsites (in build file:/run/media/umi/HDD/Projects/Scala/sbt-microsites/)
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[warn] There may be incompatibilities among your library dependencies; run 'evicted' to see detailed eviction warnings.
[error] stack trace is suppressed; run last updateSbtClassifiers for the full output
[error] (updateSbtClassifiers) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar: not found: https://repo1.maven.org/maven2/antlr/antlr/2.7.7/antlr-2.7.7-sources.jar
[error] https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04-sources.jar: not found: https://repo1.maven.org/maven2/xml-apis/xml-apis-ext/1.3.04/xml-apis-ext-1.3.04-sources.jar
[error] Total time: 25 s, completed Apr 9, 2020, 1:12:31 PM)
Thanks @MaT1g3R for the thorough investigation.
It seems like the latest version of pamflet
is still on stringtemplate 3.2.1 😕
@juanpedromoreno I made a PR upstream to update stringtemplate
version, hopefully it will get merged soon