Dump classpath used for sbt run?

Showing 1-3 of 3 messages
Dump classpath used for sbt run? Sean Rhea 3/4/11 8:59 AM
All,

In development I run my program like this:

  sbt run "--foo bar"

and that works fine.  But in production use, I want to pass particular
arguments to the JVM, and I don't need to load sbt.  So I end up doing
something like

  CLASSPATH=`find lib* -name '*.jar' | xargs echo | sed -e 's/
/:/g'`:project/boot/scala-2.8.1/lib/scala-library.jar:target/scala_2.8.1/classes
java -Xmx32M my.class.Name --foo bar

Is there a better way to do that?  Something like

  CLASSPATH=`sbt dump-classpath` java -Xmx32M my.class.Name --foo bar

Any pointers on how I might write one if not?

Thanks,
Sean
--
"I refuse to accept the idea that the ‘isness’ of man’s present nature
makes him morally incapable of reaching up for the eternal ‘oughtness’
that forever confronts him." --MLK

Re: [sbt] Dump classpath used for sbt run? Hristo Deshev 3/4/11 11:56 AM
Hi Sean,

On Fri, Mar 4, 2011 at 6:59 PM, Sean Rhea <sean....@gmail.com> wrote:
[snip]

Any pointers on how I might write one if not?

I was dumping my classpaths as a way to troubleshoot my build recently and maybe this task can help you too:

lazy val printClasspath = task { this.runClasspath.getPaths.foreach(println); None }

runClasspath is a PathFinder [1] instance and you can interrogate it even further. I guess building a ':'-separated list of those paths will be easy.

Hristo

Re: [sbt] Dump classpath used for sbt run? Sean Rhea 3/5/11 3:58 PM
Perfect, thanks!

Sean

> --
> 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.


>

--
"I refuse to accept the idea that the ‘isness’ of man’s present nature
makes him morally incapable of reaching up for the eternal ‘oughtness’
that forever confronts him." --MLK