36

I'm trying to set jboss-interceptor-api-1.1 as a dependency via sbt, but it can't be found. I've searched on Maven Repository and this version is there, can anyone help me?

Actually, I'm trying to use sbt-assembly. Removing the plugin dependency and adding the dependency to libraryDependencies still shows that error.

Stack trace:

[info] Resolving org.jboss.interceptor#jboss-interceptor-api;1.1 ...
[info] Resolving org.jboss.interceptor#jboss-interceptor-api;1.1 ...
[warn] problem while downloading module descriptor: https://repo1.maven.org/maven2/org/jboss/interceptor/jboss-interceptor-api/1.1/jboss-interceptor-api-1.1.pom: invalid sha1: expected=453b712ff6cda3a3f10f46a9ab9b9a42fc9bc021 computed=56da14e5a3e7e5656fe2ed1942d9fc0c1f3b054b (122ms)
[warn]  module not found: org.jboss.interceptor#jboss-interceptor-api;1.1
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /Users/vicaba/.ivy2/local/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/jboss/interceptor/jboss-interceptor-api/1.1/jboss-interceptor-api-1.1.pom
[warn] ==== activator-launcher-local: tried
[warn]   /Users/vicaba/.activator/repository/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[warn] ==== activator-local: tried
[warn]   /Applications/activator-dist-1.3.12/repository/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/jboss/interceptor/jboss-interceptor-api/1.1/jboss-interceptor-api-1.1.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[info] Resolving javax.annotation#jsr250-api;1.0 ...
[info] Resolving javax.inject#javax.inject;1 ...
[info] Resolving org.eclipse.sisu#org.eclipse.sisu.inject;0.3.0 ...
[info] Resolving org.codehaus.plexus#plexus-component-annotations;1.5.5 ...
[info] Resolving org.codehaus.plexus#plexus-classworlds;2.5.2 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.jboss.interceptor#jboss-interceptor-api;1.1: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[info] Resolving com.typesafe.scala-logging#scala-logging_2.11;3.4.0 ...
[info] Resolving org.scala-lang#scala-library;2.11.8 ...
[info] Resolving org.slf4j#slf4j-api;1.7.21 ...
[info] Resolving ch.qos.logback#logback-core;1.1.7 ...
[info] Resolving ch.qos.logback#logback-classic;1.1.7 ...
[info] Resolving org.scala-lang#scala-reflect;2.11.8 ...
[info] Resolving org.scala-lang.modules#scala-parser-combinators_2.11;1.0.4 ...
[info] Resolving org.scala-lang#scala-compiler;2.11.8 ...
[info] Resolving org.scala-lang.modules#scala-xml_2.11;1.0.4 ...
[info] Resolving jline#jline;2.12.1 ...
[trace] Stack trace suppressed: run 'last *:updateSbtClassifiers' for the full output.
[error] (*:updateSbtClassifiers) sbt.ResolveException: unresolved dependency: org.jboss.interceptor#jboss-interceptor-api;1.1: not found
[error] Total time: 5 s, completed Feb 1, 2017 9:51:26 AM
vicaba
  • 2,836
  • 1
  • 27
  • 45
  • 2
    I'm also experiencing this issue, and am also using sbt-assembly, and am also using IntelliJ. Honestly, I think it's to do with IntelliJ, perhaps something in the latest update because SBT from the command line works fine. – Seer Feb 01 '17 at 23:14
  • 12
    Quick follow up: under the project's SBT settings I disabled "Download Sources for SBT and plugins", and was able to continue. – Seer Feb 01 '17 at 23:16
  • I'm another intellij user with this problem - disabling that option worked for me too – desbo Feb 03 '17 at 22:25
  • I also use intellij. @Seer suggestions worked for me as well. – Sam Orozco Feb 08 '17 at 22:57
  • To all those who are experiencing this, I suggest reporting to https://issues.jboss.org/projects/JBINTER/ (I am not affected directly by it, because I don't use IntelliJ, but got alerted to this by someone else who uses my project in IntelliJ) – HRJ Mar 17 '17 at 04:17
  • 2
    The issue tracking this in sbt-assembly is [#236](https://github.com/sbt/sbt-assembly/issues/236) – Caoilte Apr 24 '17 at 12:27

4 Answers4

29

LCartwright is correct that this is due to the SHA-1 hash file differring from the hash of the POM on maven central.

To get around this you can add the JBoss maven repository, where the hash matches, to your resolvers in the global sbt config ~/.sbt/0.13/global.sbt

resolvers += "JBoss" at "https://repository.jboss.org/"
LCartwright
  • 356
  • 1
  • 5
  • 12
Palmr
  • 358
  • 3
  • 7
  • 4
    I took the step of removing the extra resolver after the JBoss artifact had downloaded, as having unnecessary resolvers can be a dangerous thing: https://www.theguardian.com/info/developer-blog/live/2015/sep/21/conference-report-scala-world-2015?page=with:block-560180d8e4b0ae9eeb18805e#block-560180d8e4b0ae9eeb18805e – Roberto Tyley Mar 16 '17 at 14:43
  • As suggested by Roberto, I removed the extra resolver afterwards; the compilation still worked, but with this warning: SBT project import [warn] problem while downloading module descriptor: https://repo1.maven.org/maven2/org/jboss/interceptor/jboss-interceptor-api/1.1/jboss-interceptor-api-1.1.pom: invalid sha1: expected=453b712ff6cda3a3f10f46a9ab9b9a42fc9bc021 computed=56da14e5a3e7e5656fe2ed1942d9fc0c1f3b054b (100ms) – peter_v Mar 18 '17 at 22:10
  • having the sha fixed is the only real solution: https://issues.jboss.org/browse/JBINTER-21 – Daniel Schröter Dec 22 '17 at 10:06
21

I have the same issue in IntelliJ. When opening a project, it fails on jboss-interceptor-api. This is part of the log:

[info] Resolving org.apache.maven#maven-artifact;3.2.2 ...
[info] Resolving org.apache.maven#maven-plugin-api;3.2.2 ...
[info] Resolving org.eclipse.sisu#org.eclipse.sisu.plexus;0.0.0.M5 ...
[info] Resolving javax.enterprise#cdi-api;1.0 ...
[info] Resolving org.jboss.interceptor#jboss-interceptor-api;1.1 ...
[info] Resolving org.jboss.interceptor#jboss-interceptor-api;1.1 ...
[warn] problem while downloading module descriptor: https://repo1.maven.org/maven2/org/jboss/interceptor/jboss-interceptor-api/1.1/jboss-interceptor-api-1.1.pom: invalid sha1: expected=453b712ff6cda3a3f10f46a9ab9b9a42fc9bc021 computed=56da14e5a3e7e5656fe2ed1942d9fc0c1f3b054b (108ms)
[warn]  module not found: org.jboss.interceptor#jboss-interceptor-api;1.1
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[warn] ==== local: tried
[warn]   /Users/jessedobbelaere/.ivy2/local/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/jboss/interceptor/jboss-interceptor-api/1.1/jboss-interceptor-api-1.1.pom
[warn] ==== Typesafe repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/jboss/interceptor/jboss-interceptor-api/1.1/jboss-interceptor-api-1.1.pom
[warn] ==== bintray-kamon-io-sbt-plugins: tried
[warn]   https://dl.bintray.com/kamon-io/sbt-plugins/org.jboss.interceptor/jboss-interceptor-api/1.1/ivys/ivy.xml

I noticed that when unchecking "Download Sources for SBT and plugins" in IntelliJ, everything works perfectly fine

Frits
  • 7,341
  • 10
  • 42
  • 60
Jesse
  • 879
  • 1
  • 12
  • 26
  • Thanks, this worked for me as a temporary fix. Do you have any idea of the root cause of this? I've just upgraded to IntelliJ 2016.3.4 from 2016.1 in which this wasn't a problem. – LCartwright Feb 13 '17 at 17:39
  • 7
    Unbelievable! IDEA has some great Scala features. But bugs like this make me wonder if it is worth it. (Still present in 2017.1 and the latest EAP) – Brent Faust Apr 18 '17 at 01:52
11

Seems like the culprit is this line

[warn] problem while downloading module descriptor: https://repo1.maven.org/maven2/org/jboss/interceptor/jboss-interceptor-api/1.1/jboss-interceptor-api-1.1.pom: invalid sha1: expected=453b712ff6cda3a3f10f46a9ab9b9a42fc9bc021 computed=56da14e5a3e7e5656fe2ed1942d9fc0c1f3b054b (108ms)

reporting an incorrect SHA-1 for the pom file.

The SHA-1 for the pom is 56da14e5a3e7e5656fe2ed1942d9fc0c1f3b054b however the accompanying pom.sha1 file is 453b712ff6cda3a3f10f46a9ab9b9a42fc9bc021

As suggested above, unchecking "Download Sources for SBT and plugins" will solve your issue for now. Not sure who to contact to update the pom.sha1

LCartwright
  • 356
  • 1
  • 5
  • 12
  • Unchecking "Download Sources for SBT and plugins" - solved my issues after many hours of mucking around trying to get it working. – Chris Apr 16 '17 at 21:19
4

I met the same problems today and the plugin I used is sbt-native-packager. It also worked when I disable the option.

And later I go to the sbt github site and update my sbt plugin version from 1.0.0-RC1 to 1.2.0-M8 without disabling that option, I also worked. The plugin I used is

addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.0-M8")

Maybe you can go to https://github.com/sbt to search the lastest version.

symbls
  • 41
  • 2