[sbt] Support for SBT 0.9.x is added to sbt-netbeans-plugin

235 views
Skip to first unread message

Vasil Remeniuk

unread,
May 7, 2011, 1:16:12 PM5/7/11
to simple-build-tool
Hello everyone,

I've recently started a branch [1] of sbt-netbeans-plugin with SBT
0.9.x support.
Currently, the most of the features from master branch (plugin/
processor oriented on 0.7.x) are supported for 0.9.x, and the plugin
is absolutely usable.

Anyone, who wants to try out an early support for Netbeans in SBT
0.9.x projects, please welcome.

Regards,
Vasil

[1] https://github.com/remeniuk/sbt-netbeans-plugin/tree/0.9

Andrew Gaydenko

unread,
May 16, 2011, 9:56:44 PM5/16/11
to simple-b...@googlegroups.com

I have tried, publishing is OK:

...
[info] published sbt-netbeans-plugin_2.8.1 to /home/anli/.ivy2/local/org.netbeans/sbt-netbeans-plugin_2.8.1/0.0.6_0.9.5/poms/sbt-netbeans-plugin_2.8.1.pom
[info] published sbt-netbeans-plugin_2.8.1 to /home/anli/.ivy2/local/org.netbeans/sbt-netbeans-plugin_2.8.1/0.0.6_0.9.5/jars/sbt-netbeans-plugin_2.8.1.jar
[info] published sbt-netbeans-plugin_2.8.1 to /home/anli/.ivy2/local/org.netbeans/sbt-netbeans-plugin_2.8.1/0.0.6_0.9.5/jars/sbt-netbeans-plugin_2.8.1-sources.jar
[info] published ivy to /home/anli/.ivy2/local/org.netbeans/sbt-netbeans-plugin_2.8.1/0.0.6_0.9.5/ivys/ivy.xml
...

But (in project dir) :

...
> netbeans
[error] Not a valid command: netbeans
[error] Not a valid project ID: netbeans
[error] Not a valid configuration: netbeans (similar: test)
[error] Not a valid key: netbeans (similar: test, streams)
[error] netbeans
[error] ^
...

sbt version is 0.9.6. I'm at first steps stage of sbt learning. What have I missed?


a

Vasil Remeniuk

unread,
May 17, 2011, 1:58:51 AM5/17/11
to simple-b...@googlegroups.com
Hi Andrew,

    It looks like an incompatibility of the plugin with 0.9.6. I'll figure out what the problem is, and publish the fix asap.

--Vasil



a

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.




--
-----

Twitter: twitter.com/remeniuk
Blog: vasilrem.com
Github: github.com/remeniuk
StackOverflow: stackoverflow.com/users/354067/vasil-remeniuk
Scala Enthusiasts Belarus: twitter.com/scalaby


Vasil Remeniuk

unread,
May 17, 2011, 7:47:28 AM5/17/11
to simple-b...@googlegroups.com
Hi Andrew,

The problem is fixed now.

Two notes:
1) You don't have to build from source to use the plugin - "Installing the plugin" section describes, how to download/use compiled artifacts;
2) After you've added a library dependency to the plugin, you need to call "update" in order to download the plugin/its dependencies

Regards,
Vasil
Scala Enthusiasts Belarus: twitter.com/scalaby


anli

unread,
May 17, 2011, 5:04:04 PM5/17/11
to simple-b...@googlegroups.com
Vasil, thanks! - got it. Now all is OK.

(it seems Google group sometimes ignores replying via mail-client; sorry if duplicate will take place)

Can you give me initial hints to configure such use case? - say I have self-contained project prj1, prj2 depending on prj1, and prj3 depending on prj1 and prj2. For simplicity all projects' directories are fixed in terms of their relative location. How to (briefly)?

anli

unread,
May 17, 2011, 5:14:52 PM5/17/11
to simple-b...@googlegroups.com
It seems like scala-swing jar is missed in deps.

Vasil Remeniuk

unread,
May 17, 2011, 6:34:29 PM5/17/11
to simple-b...@googlegroups.com
Hi Andrew,

>> Can you give me initial hints to configure such use case? - say I have self-contained project prj1, prj2 depending on prj1, and prj3 depending on prj1 and prj2. For simplicity all projects' directories are fixed in terms of their relative location. How to (briefly)?

Create an empty *.scala file in the /project folder, and put there a project definition:

object SampleProject extends Build
{
lazy val projects = Seq(root, prj1, prj2, prj3)

        lazy val root = Project("root", file(".")) aggregate(prj1, prj2, prj3)
lazy val prj1 = Project("prj1", file("prj1"))
lazy val prj2 = Project("prj2", file("prj2")) dependsOn(prj1)
lazy val prj3 = Project("prj3", file("prj3")) dependsOn(prj2)
}

Now, if you start xsbt in the root folder, and run `netbeans`, netbeans profiles will be created for all the descending projects. You can also run `netbeans create source-directories transitive` to create an empty source directories for all the sub-projects.
If you open root project in Netbeans, now, all the 3 projects are loaded! (though references to other dep sub-projects in prj2 and prj3 will be incorrect (I'll fix it asap) , and, thus, some errors will be shown in the IDE).

--Vasil

On Wed, May 18, 2011 at 12:14 AM, anli <andrew....@gmail.com> wrote:
It seems like scala-swing jar is missed in deps.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
Scala Enthusiasts Belarus: twitter.com/scalaby


Andrew Gaydenko

unread,
May 17, 2011, 9:50:07 AM5/17/11
to simple-b...@googlegroups.com
On Tue, 17 May 2011 14:47:28 +0300
Vasil Remeniuk <vasil.r...@gmail.com> wrote:

> The problem is fixed now.

Vasil, thanks! - got it, newly created project was successfully opened by NB.

Sorry, I'm not ready for more feedback yet as far as am still learning xsbt (it is very funny to read the xsbt wiki in alphabet order :-)).


Andrew

anli

unread,
May 18, 2011, 3:46:02 PM5/18/11
to simple-b...@googlegroups.com
Vasil, thanks for the explanation! Do I understand correctly, aggregating project (root in your example) must be in enclosing directory? I have digged in the wiki but haven't found anything concerning overall internal projects' location demands (say, is it possible to use something like file("../../a/b/c") in a project definition).

Vasil Remeniuk

unread,
May 18, 2011, 5:01:04 PM5/18/11
to simple-b...@googlegroups.com
No, aggregating project shouldn't enclose the projects it aggregates.
E.g., the following would be a valid build definition:

object SampleProject extends Build
{
lazy val projects = Seq(root, prj1, prj2, prj3)

        lazy val root = Project("root", file("root")) aggregate(prj1, prj2, prj3)
lazy val prj1 = Project("prj1", file("prj1"))
lazy val prj2 = Project("prj2", file("prj1/prj2")) dependsOn(prj1)
lazy val prj3 = Project("prj3", file("prj1/prj2/prj3")) dependsOn(prj2)
}

The only limitation I know of is that sub-projects should be located under the _build_ root (and, thus,  "../../a/b/c" will not work - paths are relative to the build root, not to aggregating projects).

On Wed, May 18, 2011 at 10:46 PM, anli <andrew....@gmail.com> wrote:
Vasil, thanks for the explanation! Do I understand correctly, aggregating project (root in your example) must be in enclosing directory? I have digged in the wiki but haven't found anything concerning overall internal projects' location demands (say, is it possible to use something like file("../../a/b/c") in a project definition).

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

Vasil Remeniuk

unread,
May 18, 2011, 5:04:24 PM5/18/11
to simple-b...@googlegroups.com
Ahh, by the way,

>> If you open root project in Netbeans, now, all the 3 projects are loaded! (though references to other dep sub-projects in prj2 and prj3 will be incorrect (I'll fix it asap) , and, thus, some errors will be shown in the IDE).

This is fixed in branch 0.9 already.

anli

unread,
May 18, 2011, 5:26:47 PM5/18/11
to simple-b...@googlegroups.com
On Thursday, May 19, 2011 1:01:04 AM UTC+4, Vasil Remeniuk wrote:
The only limitation I know of is that sub-projects should be located under the _build_ root

Aha, I see, thanks!

anli

unread,
May 18, 2011, 5:33:06 PM5/18/11
to simple-b...@googlegroups.com
On Thursday, May 19, 2011 1:04:24 AM UTC+4, Vasil Remeniuk wrote:
This is fixed in branch 0.9 already.

Thanks! Probably at my case it's simpler to wait for next plugin version.

anli

unread,
May 19, 2011, 5:04:52 PM5/19/11
to simple-b...@googlegroups.com
Vasil, if you are not tied  with my questions, I have more one :-)

I have created a build aggregating five existing scala projects (maven was previously used) with such directories structure:

buildRoot
  set1
    prj1
    prj2
    prj3
  set2
    prj4
    prj5

with Build successor in buildRoot/project containing all projects definitions with individual settings. I'm able to build all projects in sbt session. Then I have selected prj1 (it is self-contained) and ran 'netbeans create'. Then started netbeans IDE, opened this prj1 project, started (via context menu) 'Clean and Build' and got:

clean:
[info] Set current project to default (in build file:/home/anli/.sbt/plugins/)
[info] Set current project to default (in build file:/wrk/x/zgs-kit/zgs-lib/)
[error] Expected project ID
[error] ;project zgsLib;clean
[error]                ^
Result: 1
jar:
[info] Set current project to default (in build file:/home/anli/.sbt/plugins/)
[info] Set current project to default (in build file:/wrk/x/zgs-kit/zgs-lib/)
[error] Expected project ID
[error] ;project zgsLib;;package;package-src
[error]                ^
Result: 1
BUILD SUCCESSFUL (total time: 4 seconds)

Here zgsLib is that prj1, /wrk/x/ is the build root.
Where is my fault?

Vasil Remeniuk

unread,
May 19, 2011, 8:27:30 PM5/19/11
to simple-b...@googlegroups.com
Hi,

Your use-case is correct - some changes has to be done in the plugin to support this scenario.
I've changed the template for build.xml, so Ant-tasks should be generated and work fine, now. Also, I've added `sbtExecutable` setting, in case SBT executable name differs from default ("sbt") in the local system.

Artifacts of the latest build are already published:
set libraryDependencies += "org.netbeans" %% "sbt-netbeans-plugin" % "0.0.6_0.9.7"

Thanks+regards,
Vasil

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 20, 2011, 6:06:08 AM5/20/11
to simple-b...@googlegroups.com
Still have the problem. As far as I'm not sure how to force plugin updating, I have deleted ~/.sbt and reinstalled plugin. Then I have deleted all files/dirs related to netbeans(I mean nbproject, buid.xml and build.xbt) and started 'netbeans create' again.

Can be a problem with versions? To use Scala 2.9 I have for root project:

object AllBuild extends Build {
  private lazy val scalaInUse = "2.9.0"
  ...
  override lazy val settings = super.settings ++ Seq(
    scalaVersion := scalaInUse,
    resolvers += "Java.net-2 Repository" at "http://download.java.net/maven/2/"
  )
  ...
}

As for executable, I have 'sbt' in PATH.

Vasil Remeniuk

unread,
May 20, 2011, 7:56:22 AM5/20/11
to simple-b...@googlegroups.com
Hmm, I feel like the plugin is still not removed completely.
Can you create a new plain project and run `netbeans` (just in case, `netbeans` = `netbeans create`) here? What build.xml is generated (could you please copy-paste it here)? 

--Vasil

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 20, 2011, 8:08:49 AM5/20/11
to simple-b...@googlegroups.com
It is newly created (starting from empty dir) build.xml:

<project default="default" name="default">
    <description>Builds, tests, and runs the project sbt-netbeans-plugin.</description>
    <import file="nbproject/build-impl.xml"></import>

    <target name="clean" description="Clean build products.">
        <exec executable="sbt">
            <arg value=";project default;clean"></arg>
        </exec>
    </target>

    <target name="jar" description="Build JAR.">
        <exec executable="sbt">
            <arg value=";project default;;package;package-src"></arg>
        </exec>
    </target>

    <target name="compile" description="Compile project.">
        <exec executable="sbt">
            <arg value=";project default;compile"></arg>
        </exec>
    </target>

    <target name="test" description="Run unit tests.">
        <exec executable="sbt">
            <arg value=";project default;test"></arg>
        </exec>
    </target>

</project>

And the session:

tt $ sbt
Getting net.java.dev.jna jna 3.2.3 ...
:: retrieving :: org.scala-tools.sbt#boot-app
    confs: [default]
    1 artifacts copied, 0 already retrieved (838kB/33ms)
Getting Scala 2.8.1 (for sbt)...
:: retrieving :: org.scala-tools.sbt#boot-scala
    confs: [default]
    4 artifacts copied, 0 already retrieved (15296kB/70ms)
Getting org.scala-tools.sbt sbt_2.8.1 0.9.7 ...
:: retrieving :: org.scala-tools.sbt#boot-app
    confs: [default]
    34 artifacts copied, 0 already retrieved (5918kB/49ms)

[info] Set current project to default (in build file:/home/anli/.sbt/plugins/)
[info] Set current project to default (in build file:/wrk/x/tt/)
> netbeans
[info] Creating Netbeans files for project `default`
[info] Writing plugin settings for project `default`
[info] Updating Netbeans files for project `default`...
[info] Updating...
[info] Done updating.
[info] default: successfully updated Ant-script (build.xml)
[info] default: successfully updated project configuration (nbproject/project.xml)
[info] default: successfully updated project properties (nbproject/project.properties)
[info] Executing command transitively...

[info] Set current project to default (in build file:/home/anli/.sbt/plugins/)
[info] Set current project to default (in build file:/wrk/x/tt/)


Vasil Remeniuk

unread,
May 20, 2011, 8:22:25 AM5/20/11
to simple-b...@googlegroups.com
Weird, that's clearly an old version.
As a last resort, you can remove the artifact from ivy's cache/local + clean ~/.sbt/plugins, and try to `update` again (nothing else should be removed).
You can also clone the plugin sources into ~/.sbt/plugins (they will be compiled and used in this case, as if you'd add a library dependency to the plugin).

--Vasil

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 20, 2011, 12:00:27 PM5/20/11
to simple-b...@googlegroups.com
OK, I have deleted both ~/.sbt and ~/.ivy2 and building of self-contained project is OK now, thanks!

But it isn't the case for dependent project. Starting sbt in project dir


    <target name="jar" description="Build JAR.">
        <exec executable="sbt" dir="/wrk/x/zgs-kit/zgs-test">
            <arg value=";package;package-src"></arg>
        </exec>
    </target>

results in lost of all Build information (scala version, deps, resolvers and so on). I have tried to replace tasks this way (below) and was able to clean/build without any nested prj/build.sbt (as expected):


   <target name="clean" description="Clean build products.">
        <exec executable="sbt" dir="/wrk/x">
            <arg value=";project zgsTest;clean"></arg>

        </exec>
    </target>

    <target name="jar" description="Build JAR.">
        <exec executable="sbt" dir="/wrk/x">
            <arg value=";project zgsTest;package;package-src"></arg>
        </exec>
    </target>
   
Probably any sbt call must stay in terms of that build root which was used at netbeanizing. I mean

sbt <---- selected build root with Build successor, global build settings and so on...
project prjX
netbeans

Vasil Remeniuk

unread,
May 20, 2011, 1:15:13 PM5/20/11
to simple-b...@googlegroups.com
Yes, Andrew, it makes sense. I've been thinking about it too.
Have just made the fix and published 0.0.7_0.9.7 - everything seems to work fine.

Thx for suggestions!

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 20, 2011, 1:29:03 PM5/20/11
to simple-b...@googlegroups.com
Vasil, great, thanks! I'm all in impatience to try, but also dream to understand that secret official way of plugin updating :) I mean those problems with plugin updating I already had had. Will you, please, find a second to open this secret? Deleting of ~/.sbt and ~/ivy2 isn't constructive way, I guess...

Vasil Remeniuk

unread,
May 20, 2011, 2:08:04 PM5/20/11
to simple-b...@googlegroups.com
Normally, you wouldn't have to clean ivy repo manually (this time you had to, because the artifact was published twice under the same version --> my bad). Generally, when you switch to another version of a plugin, it's enough to `upgrade` (maybe, making `clean`, first).
I'm far from understanding all the magic happening behind the scenes, too :)

On Fri, May 20, 2011 at 8:29 PM, anli <andrew....@gmail.com> wrote:
Vasil, great, thanks! I'm all in impatience to try, but also dream to understand that secret official way of plugin updating :) I mean those problems with plugin updating I already had had. Will you, please, find a second to open this secret? Deleting of ~/.sbt and ~/ivy2 isn't constructive way, I guess...

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 20, 2011, 3:47:56 PM5/20/11
to simple-b...@googlegroups.com
OK, now we have F11 on any (also dependent) project with all sbt power. Fine, thanks!

Hope, it will not be too bothering to ask: what do you think about Shift-F6? :) I have tried and got

/wrk/x/zgs-kit/zgs-test/nbproject/build-impl.xml:42: You must set SCALA_HOME or environment property and append "-J-Dscala.home=scalahomepath"
                    property to the end of "netbeans_default_options" in NetBeansInstallationPath/etc/netbeans.conf to point to
                    Scala installation directory.
BUILD FAILED (total time: 0 seconds)

Of course, I have installed Scala set SCALA_HOME.

Vasil Remeniuk

unread,
May 20, 2011, 4:48:33 PM5/20/11
to simple-b...@googlegroups.com
I didn't think of implementing "Run"/"Run File" so far (they require "main" method to be present, right?), but it shouldn't be too complex - both can be mapped to `run-main` of SBT, or, if web-plugin is present, "Run" can trigger `jetty-run`.

>>/wrk/x/zgs-kit/zgs-test/nbproject/build-impl.xml:42: You must set SCALA_HOME or environment property and append "-J-

This error is thrown by Ant, as far as I can see, which won't be used, if the actions are overridden with SBT-tasks.

Thanks+regards,
Vasil

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 20, 2011, 5:30:47 PM5/20/11
to simple-b...@googlegroups.com
Vasil, frankly speaking, I guess both run and debug must be implemented "NB way" - probably by overwriting netbeans ant tasks (at netbeanizing phase). Have you estimated a possibility to cooperate with Caoyuan Deng?

Vasil Remeniuk

unread,
May 21, 2011, 1:55:06 AM5/21/11
to simple-b...@googlegroups.com
Can you kindly elaborate more on the "nb-way". It's more or less clear, what Sbt commands should be invoked, when run/debug is called for a web project ('jetty-run', I assume). But what behavior should be used for standard projects? Running the main file, probably?

As for cooperation with Caoyuan, it's simply unavoidable, and will definitely happen over time :)

Отправлено с iPhone

21.05.2011, в 0:30, anli <andrew....@gmail.com> написал(а):

Vasil, frankly speaking, I guess both run and debug must be implemented "NB way" - probably by overwriting netbeans ant tasks (at netbeanizing phase). Have you estimated a possibility to cooperate with Caoyuan Deng?

--

anli

unread,
May 21, 2011, 4:58:37 AM5/21/11
to simple-b...@googlegroups.com
I mean startup time and RAM consumption, especially for cases with frequent Shife-F6 and multiple concurrently running different mains (BTW, is it safe to have multiple sbt started against the same build root concurrently?). SBT (with it's analysing capabilities) is excellent in a build process  - well, it is build tool :) But for running, to my taste, can be slightly heavy. It's just a guess, probably I'm wrong.

anli

unread,
May 21, 2011, 8:58:19 AM5/21/11
to simple-b...@googlegroups.com
Continuing discussion. I have estimated time (for empty main()) and RAM usage of sbt (of course forked) run-main:

$ time sbt "; project zgsTest; run-main zgstest.TestCommon"

[info] Set current project to default (in build file:/home/anli/.sbt/plugins/)
[info] Set current project to root (in build file:/wrk/x/)
[info] Set current project to zgsTest (in build file:/wrk/x/)
[info] Triggered update dependencies task for proect ProjectRef(file:/wrk/x/,zgsLib)
[info] Cache file exists: /wrk/x/zgs-kit/zgs-lib/target/scala-2.9.0.final/classes:/home/anli/.ivy2/cache/org.scala-lang/scala-swing/jars/scala-swing-2.9.0.jar:/wrk/x/project/boot/scala-2.9.0/lib/scala-library.jar:/home/anli/.ivy2/cache/javax.mail/mail/jars/mail-1.4.4.jar:/home/anli/.ivy2/cache/javax.activation/activation/jars/activation-1.1.jar
[success] Total time: 2 s, completed May 21, 2011 4:44:11 PM

real    0m4.767s
user    0m8.806s
sys    0m0.203s

So, on i5 760 running Arch Linux x86_64 we have about 5 seconds (and 9 seconds of total cores usage). As for RAM, I have started another long-running test (also forked) and got about 240 MiB consumed by sbt.

I see, interpretation of these numbers is subjective matter :)

Vasil Remeniuk

unread,
May 22, 2011, 11:43:35 AM5/22/11
to simple-b...@googlegroups.com
Sorry for responding that late.
In theory, some work can be done to decrease SBT bootstrap costs (~3 seconds, in your case) for the scenarios, when SBT is stopped immediately after running the action (e.g. console support can be limited for this case).

Personally I'm not suffering that much from memory/time wasting problems, because I have SBT console running all the time, submitting all the build workflow commands (compilation, packaging, testing, etc.) there, and using Netbeans only for editing. 

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

--
-----

Twitter: twitter.com/remeniuk
Blog: vasilrem.com
Github: github.com/remeniuk
Scala Enthusiasts Belarus: twitter.com/scalaby

anli

unread,
May 22, 2011, 12:04:45 PM5/22/11
to simple-b...@googlegroups.com
On Sunday, May 22, 2011 7:43:35 PM UTC+4, Vasil Remeniuk wrote:
 
In theory, some work can be done to decrease SBT bootstrap costs (~3 seconds, in your case) for the scenarios, when SBT is stopped immediately after running the action (e.g. console support can be limited for this case).
Fine!
Personally I'm not suffering that much from memory/time wasting problems, because I have SBT console running all the time, submitting all the build workflow commands (compilation, packaging, testing, etc.) there, and using Netbeans only for editing. 
In fact I don't mean I personally strongly prefer to stay with ant-based Shift-F6. Just shared some thoughts :) Thinking about sbt-based Shift-F6 I imagine daemon-like sbt using - as far as all mains are forked, it can be probably possible to use the only sbt instanse for multiple concurrent run-mains (probably with daemon's timeout to auto-exit). This way we would get both almost instant start and limited RAM usage.

What do you think? Is it too complicated (or even impossible) dream? :)

Vasil Remeniuk

unread,
May 22, 2011, 12:40:33 PM5/22/11
to simple-b...@googlegroups.com
>>  I imagine daemon-like sbt using

One of the options I can think of is exposing SBT plugin functionalities to the world via, say, remote actor. Thus, the plugin will either be called directly by the IDE (in this case, some modifications need to be done in nbscala plugin), or from the Ant-script. Just one thing - I'm in doubt, it's thread safe to work concurrently with one SBT instance. It needs to be investigated more deeply.
 

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 23, 2011, 6:19:10 AM5/23/11
to simple-b...@googlegroups.com
Vasil, it seems you have not published 0.0.8_0.9.7 artifact while README refers to this version.

Vasil Remeniuk

unread,
May 23, 2011, 6:22:28 AM5/23/11
to simple-b...@googlegroups.com
Aaah, indeed, thanks for pointing out!
Will publish later this day!

Thanks+regards,
Vasil

On Mon, May 23, 2011 at 1:19 PM, anli <andrew....@gmail.com> wrote:
Vasil, it seems you have not published 0.0.8_0.9.7 artifact while README refers to this version.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 24, 2011, 9:52:35 AM5/24/11
to simple-b...@googlegroups.com
With my impatience can not wait for maven artifacts, so have built 0.0.8_0.9.8 from git :) Few thoughts:

1. nb project isn't obligated to have default main class at all.
2. In project's properties- Libraries - Compile target/classes is listed. Why? For project with another project as dep that project's classes dir is also listed.
3. In project's properties - Libraries - Compile scala-library.jar is listed twice.
4. Probably a ref to dependency project sources must be added somewhere in dependent project configuration to get interprojects Crtl-click working.
5. main() select dialog has lost current sbt project tracking. I have selected prj1 and started netbeanizing. Have got dialog to select main() among 5 variants, selected 5th. Then I switched to prj2 and also started netbeanizing. Have got dialog to select main() among 42 :) variants, selected 28th. Have got error message saying I have 5 mains only. OK, have selected something small :)
6. After all these steps prj1 dir contains build.sbt file while prj2/ doesn't.

Vasil Remeniuk

unread,
May 24, 2011, 10:25:31 AM5/24/11
to simple-b...@googlegroups.com
>> 0.0.8_0.9.8
It's on the repo already :)  ~> https://github.com/remeniuk/remeniuk.github.com/commit/44b3cf050d1c054b19d8a021fc2e8850a2235925


>> so have built 0.0.8_0.9.8 from git
You're half-way to start contributing the code ;) Maybe it's very time, given that you have a great insight into the problem?


>> 1. nb project isn't obligated to have default main class at all.
I agree. But, if there're no main class, behavior for "Run" in undefined. Or I miss something?


>> 2. In project's properties- Libraries - Compile target/classes is listed. Why? For project with another project as dep that project's classes dir is also listed.
>> 3. In project's properties - Libraries - Compile scala-library.jar is listed twice.
I need to look into this. Probably, some redundant entries has been added to the classpath @project.properties.


>> Probably a ref to dependency project sources must be added somewhere in dependent project configuration to get interprojects Crtl-click working.
Does it work for standard Ant-based project?


>> 5. main() select dialog has lost current sbt project tracking. I have selected prj1 and started netbeanizing. Have got dialog to select main() among 5 variants, >> selected 5th. Then I switched to prj2 and also started netbeanizing. Have got dialog to select main() among 42 :) variants, selected 28th. Have got error           >> message saying I have 5 mains only. OK, have selected something small :)
If you want to netbeanize a hierarchy of projects, simply pass `netbeans` or `netbeans create transitive` (`transitive` modifier can be added to any command, in order to apply it for all used/dep projects).

In future, please don't hesitate to add bugs straight here ~> https://github.com/remeniuk/sbt-netbeans-plugin/issues

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.

anli

unread,
May 24, 2011, 11:08:12 AM5/24/11
to simple-b...@googlegroups.com


On Tuesday, May 24, 2011 6:25:31 PM UTC+4, Vasil Remeniuk wrote:
>> 0.0.8_0.9.8
It's on the repo already :)  ~> https://github.com/remeniuk/remeniuk.github.com/commit/44b3cf050d1c054b19d8a021fc2e8850a2235925

I have looked for here: http://remeniuk.github.com/maven/
 
>> so have built 0.0.8_0.9.8 from git
You're half-way to start contributing the code ;) Maybe it's very time, given that you have a great insight into the problem?

Don't feel to have enought skills and knowledge yet.
 

>> 1. nb project isn't obligated to have default main class at all.
I agree. But, if there're no main class, behavior for "Run" in undefined. Or I miss something?

Probably some standard message ("Project main() isn't configured") can be used.

>> Probably a ref to dependency project sources must be added somewhere in dependent project configuration to get interprojects Crtl-click working.
Does it work for standard Ant-based project?

Yes, it does.
 

>> 5. main() select dialog has lost current sbt project tracking. I have selected prj1 and started netbeanizing. Have got dialog to select main() among 5 variants, >> selected 5th. Then I switched to prj2 and also started netbeanizing. Have got dialog to select main() among 42 :) variants, selected 28th. Have got error           >> message saying I have 5 mains only. OK, have selected something small :)
If you want to netbeanize a hierarchy of projects, simply pass `netbeans` or `netbeans create transitive` (`transitive` modifier can be added to any command, in order to apply it for all used/dep projects).

There are possible situations when some of sbt's projects are not intended to be netbeanized.

Vasil Remeniuk

unread,
May 24, 2011, 11:40:25 AM5/24/11
to simple-b...@googlegroups.com
>> I have looked for here: http://remeniuk.github.com/maven/

Aaah, pom.md5 has been calculated incorrectly for the artifact (how could it happen?!..), and, therefore, it couldn't be downloaded.
Fixed now.

--
You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
To post to this group, send email to simple-b...@googlegroups.com.
To unsubscribe from this group, send email to simple-build-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-build-tool?hl=en.
Reply all
Reply to author
Forward
0 new messages