Code Monkey home page Code Monkey logo

Comments (7)

dcaoyuan avatar dcaoyuan commented on July 27, 2024

Would you please give me the piece of .classpath_nb which you mentioned? since I have no problem under Fedora, where I run NetBeans via short_cut

from nbsbt.

mgenereu avatar mgenereu commented on July 27, 2024

Here's a line relatively referencing a file from my lib. Actual path /home/mgenereux/Projects/test/lib.

<classpathentry kind="lib" path="./lib/lang-scala_2.10-1.1.0-SNAPSHOT.jar" scope="compile"/>

Thanks!

from nbsbt.

dcaoyuan avatar dcaoyuan commented on July 27, 2024

It seems your project depends on the lib jar directly instead of ivy? How did you define the lib dependency in your Build.scala or build.sbt?

from nbsbt.

mgenereu avatar mgenereu commented on July 27, 2024

Neither. SBT includes the lib folder per http://www.scala-sbt.org/0.13/tutorial/Library-Dependencies.html .

from nbsbt.

mgenereu avatar mgenereu commented on July 27, 2024

I'm still learning Scala or I'd try to make a pull request. Could you point me in the right direction so I could help?

from nbsbt.

dcaoyuan avatar dcaoyuan commented on July 27, 2024

I took a look at the corresponding code in nbscala:

            case "lib" =>
              val path = (entry \ "@path").text.trim.replace("\\", "/")
              val isTest = (entry \ "@scope").text.trim.equalsIgnoreCase("test")
              val libFile = new File(path) match {
                case x if x.isAbsolute => x
                case _                 => new File(projectDir, path)
              }

              if (libFile.exists) {
                if (isTest) {
                  testCps += libFile
                } else {
                  mainCps += libFile
                }
              }

It seems the relative lib path should have been converted to absolute path with projectDir as parent.
For more information, please see:

https://github.com/dcaoyuan/nbscala/blob/master/scala.sbt/src/main/scala/org/netbeans/modules/scala/sbt/project/SBTResolver.scala

from nbsbt.

mgenereu avatar mgenereu commented on July 27, 2024

Ah. So the .classpath_nb is correct to specify relative and then the plugin should respect that in turn. I'll create a pull request on the plugin.

from nbsbt.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.