Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbteclipse-plugin;4.0.0: not found #315

Open
henrykey opened this issue Apr 17, 2016 · 22 comments
Open

sbteclipse-plugin;4.0.0: not found #315

henrykey opened this issue Apr 17, 2016 · 22 comments

Comments

@henrykey
Copy link

Hi, I just tried the plugin as mentioned in README to put that line into plugins.sbt. It's failure to run eclipse and got following information:
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13) (/Users/kehongwei/.sbt/0.13/plugins.sbt#L1-2)
[warn] +- net.ruippeixotog:scala-scraper_2.11:1.0.1-SNAPSHOT
[trace] Stack trace suppressed: run last *:update for the full output.
error sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[error] Total time: 4 s, completed 2016-4-17 10:33:56

what should I'm going to do for fixing this?

Thanks,

Henry

@2m
Copy link
Member

2m commented Apr 25, 2016

Hey. Which sbt version are you using? It looks like it tries to resolve sbteclipse plugin for scala 2.11, but current sbt version 0.13.11 is compiled under 2.10 AFAIK.

Where is your plugins.sbt located?

@ryanstull
Copy link

I'm getting the same issue as well. I'm using the latest version of SBT with scala 2.11.7 . However I looked on maven central and it seems like the project no longer exists under com.typesafe, as far as I can tell.

@2m
Copy link
Member

2m commented Apr 26, 2016

This sbt plugin is published to bintray under sbt/sbt-plugin-releases which is where sbt looks for sbt plugins as well.

@Dris101
Copy link

Dris101 commented May 3, 2016

I have the same issue. I have just moved some projects over to a new machine on which I did a clean install of sbt 0.13.11. Using Scala 2.11.8 and referencing addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") from ~\.sbt\0.13\plugins.sbt I get the following:-

warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes.
[warn] com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn]
[warn] Note: Unresolved dependencies path:
[info] Resolving org.scala-lang#scala-library;2.11.8 ...
[warn] com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)

Any suggestion on how to fix this would be much appreciated. These projects were compiling fine on my old machine. All my local ivy caches are empty on my new machine as it is a new build. I am not sure if that is why I didn't get this issue before.

@beezerbt
Copy link

beezerbt commented May 5, 2016

I am simply trying to use sbt eclipse to configure a project with the above settings (i.e. same versions mentioned by Dris101) and I get the same error. Is there a fallback?

@Dris101
Copy link

Dris101 commented May 8, 2016

I have fixed the issue for my project by deleting ~\.sbt\0.13\plugins.sbt entirely and putting the addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0") in project\plugins.sbt. I think the plugins should be looking to resolve vs. the scala version that sbt was built with (which I think is 2.10), not the scala version that the project is using (2.11 in my case). In any case, using project\plugins.sbt worked for me. The artifact at https://bintray.com/sbt/sbt-plugin-releases/sbteclipse/4.0.0/view#files/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.10/sbt_0.13/4.0.0 does exist but not one called .../scala_2.11/...

@aaronwitt27
Copy link

Has anyone been able to resolve this issue? I'm trying to set up my machine so that sbteclipse is a global plugin, and not part of each project's source.

At SBT_HOME, I have build.sbt and plugins/plugins.sbt.

Here's SBT_HOME\build.sbt:

resolvers += Classpaths.typesafeResolver

// Download Source and Javadocs with binaries
EclipseKeys.withSource := true
EclipseKeys.withJavadoc := true

// Compile the project before generating Eclipse files, so that generated .scala or .class files for views and routes are present
EclipseKeys.preTasks := Seq(compile in Compile)

// Java project. Don't expect Scala IDE
EclipseKeys.projectFlavor := EclipseProjectFlavor.Java           

// Use .class files instead of generated .scala files for views and routes
EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources)

And here's SBT_HOME\plugins\plugins.sbt:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")

My projects use scalaVersion := "2.11.8", as specified in their respective build.sbt files. Since I'm currently upgrading from 2.3.x, my projects are using addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6"), as specified in their respective project/plugins.sbt files. And lastly, each project specifies sbt.version=0.13.11, in project/build.properties.

As stated by others, I'd like to configure sbteclipse globally, to be used in any project for generating Eclipse project files. Am I missing configuration? Am I misconfiguring?

@2m
Copy link
Member

2m commented Jun 16, 2016

@aaronwitt27 your setup looks correct. What error are you getting?

@Dris101 I noticed that you put addSbtPlugin(...) to ~\.sbt\0.13\plugins.sbt. This is incorrect. It should be under ~/.sbt/0.13/plugins/ directory. Anyway, I tried to reproduce the same situation in a docker container (I used this image), because I do not have a clean system, but I was unable to reproduce the issue. When following your setup I do not get eclipse command added to the project as expected and no error shows up.

@beezerbt
Copy link

Thanks to @Dris101 it builds now.
The documentation on the sbt site is flawed.
The HelloWorld example should be a packaging one...who cares about running it from sbt ....

So, in short:

  1. Remove the plugins file from your home/.sbt/
  2. Add the plugins in your baseDir/project/plugins.sbt file (i.e. the sbteclipse dependency with version 4.0.0)
  3. Have your simple build.sbt have your version of scala

Of course running the jar file shows me that the are libs missing !!!!
So, once again, the documentation on sbt for newbies is FALWED.

@beezerbt
Copy link

In fact, once you try to build with sbt you will see how woeful the documentation actually is, cause you will very quickly understand the need for the assembly plugin.
I am going to look at gradle...this sbt is ..... well.... you make up your own mind.

@bjornregnell
Copy link

I also suddenly got
[warn] :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
in projects that used to work. Is the plugin broken or removed?

@bjornregnell
Copy link

I found a work-around: do not use any global version settings in ~.sbt/0.13/global.sbt -- neither scalaVersion nor sbtVersion -- as these will confuse the resolution process.
Hence, the scala 2.10 and 2.11 mismatch can be caused by adding scalaVersion to your global.sbt... (And it not just the plugins-file in .sbt, from comment above, that can cause confusion...)
Then also make sure that all build.properties in all sub-projects are aligned with your main project. When new versions of sbt things may break so it is wise to nail it to e.g. sbt.version := 0.13.12 in build.properties and also include that in all sub-projects or else another sbt version might kick in.

This issue is likely to bite more people, so I think the sbtplugin should be made available for 2.11, and also perhaps the sbt documentation on global settings could be improved. (I don't really see the point of global default settings if the can't be overridden by a project's specific settings...)

Here is a minimal test case that reproduced the problem on my machines (linux ubuntu 14.04, also tested correspondingly on win7):

$ cat >~/.sbt/0.13/global.sbt
scalaVersion := "2.11.8"

sbtVersion := "0.13.12"

$ mkdir test-sbteclipse
$ cd test-sbteclipse
$ mkdir project
$ echo 'addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")' > project/plugins.sbt
$ sbt
...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbteclipse#sbteclipse-plugin;4.0.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn] 
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]      com.typesafe.sbteclipse:sbteclipse-plugin:4.0.0 (scalaVersion=2.11, sbtVersion=0.13)
[warn] 

@KrakenChaos
Copy link

I am having the same issue and tried to follow solutions provided by @Dris101 and @beezerbt but it does not work for me.

@bjornregnell
Copy link

Have you tried removing ~/.sbt/0.13/global.sbt ?

@KrakenChaos
Copy link

Yeah, I got it working by removing
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
from project_folder/project/plugins.sbt
and putting in ~/.sbt/0.13/plugins/plugins.sbt file.

@joney000
Copy link

remove ~/.sbt/boot/sbt.boot.lock and again try . It worked for me.

@devndone
Copy link

devndone commented Apr 6, 2017

while running sbt without any project setup on command line does give same issue..
I got it working by removing
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "4.0.0")
from ~/.sbt/0.13/plugins/plugins.sbt
(Later when I need to create a project n run I'll add it to project_folder/project/plugins.sbt, I think it should work)

@rnevitt
Copy link

rnevitt commented Jan 27, 2018

I see this issue was resolved for you, but just in case it happens to somebody else I'd like to point out that the "project/plugins.sbt" is actually a folder named project inside your project's folder. This cost me about 10 minutes of confusion, because I'd put the plugins.sbt in my project's folder. Maybe that will help somebody else later.

@bpossolo
Copy link

holy shit @rnevitt thank you! what a time sink

@sachinjha1
Copy link

Newer version of plugin worked for me:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")

@mkumar18
Copy link

For me following settings in the plugin.sbt worked.

addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.8")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")

@Helsonkumar
Copy link

Helsonkumar commented Mar 20, 2020

I got this resolved as follows:

  1. Clean all files generated by previous erroneous runs. (This also includes removing plugins.sbt from project root directory)
  2. Create a new file plugins.sbt under "/project_root_dir/project/" folder if there is no one and add addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4")
  3. Else Insert -> addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "5.2.4") to the existing plugins.sbt file
  4. Run "sbt package" from project root directory followed by "sbt eclipse" command
  5. Once succeeded, go to eclipse and import your sbt built project as "Import Existing Project"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests