Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play framework 2: Eclipse cant detect jBCrypt as project dependency

I am trying to use jBCrypt to start securing my passwords more effectively but I dont know why eclipse doenst detect my project dependency: I have added at least following:

plugins.sbt

resolvers += "jBCrypt Repository" at "http://repo1.maven.org/maven2/org/"

Build.scala

val appDependencies = Seq(
      // Add your project dependencies here,
      "mysql" % "mysql-connector-java" % "5.1.18",
      "org.mindrot" % "jbcrypt" % "0.3m"
    )

SecurityUtils.java (testing to import)

import org.mindrot... <- not recognized.. when i type just org. and view list of packages there is not mindrot...

When I try at terminal play dependencies I can see that module org.mindrot:jbcrypt:0.3m is successfully loaded and its required by "testProject:testProject_2.9.1:1.0" As jbcrypt-0.3m.jar

Same .jar package can be found when browsing it via finder of Mac. (inside cache of play repository folder).

I have also tried to refresh eclipse among running play clean, compile, ~run etc. but with no luck. What could be the problem? This is play framework 2.0.2 java project.

like image 593
Mauno Vähä Avatar asked Dec 15 '22 20:12

Mauno Vähä


1 Answers

It seems that generating eclipse configurations again middle of other play commands solved the problem and package is now recognized. I used following commands:

play clean
play compile
play eclipsify
play ~run

This doesnt seem fair that we should create new eclipse project files when we add new dependency? but I guess I need to stick with this if there is no other opinions how to solve similar case? thnx in advance.

Edit:

Heads up! eclipsify command has been replaced by eclipse in recent versions of sbt.

like image 185
Mauno Vähä Avatar answered Apr 27 '23 23:04

Mauno Vähä