[sbteclipse] run 'eclipse' before running a task

343 views
Skip to first unread message

Lukas Rytz

unread,
Aug 15, 2012, 12:44:29 PM8/15/12
to simple-b...@googlegroups.com
Hi,

I have a task that puts some files into a .zip, including the eclipse project files. I'd like to
make sure that "eclipse" is executed before the task, make my task "depend" on eclipse.

I don't know anything about sbt commands (yet), but afaict "eclipse" is a command.

How can I achieve that?

Thanks,
Lukas

Heiko Seeberger

unread,
Aug 15, 2012, 1:24:46 PM8/15/12
to simple-b...@googlegroups.com
AFAIK that is not possible.

Heiko

Lukas Rytz

unread,
Aug 15, 2012, 1:40:12 PM8/15/12
to simple-b...@googlegroups.com
OK thanks for letting me know.

Joshua Serrin

unread,
Aug 15, 2012, 1:52:53 PM8/15/12
to simple-b...@googlegroups.com
Really? In my Build.scala I have a dist task to run assembly and copy
files to a directory.

https://gist.github.com/3361920

Why can't we do something like...

dist <<= (assembly in Compile, eclipse, ...

BTW: I get a 'not found: value eclipse' when I try it.
> --
> 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.
>

Jesse C

unread,
Aug 15, 2012, 4:40:51 PM8/15/12
to simple-b...@googlegroups.com
Is it possible to write a command that calls another command?  I feel like that might be the only way to do it.

Harald Meland

unread,
Aug 16, 2012, 3:08:34 AM8/16/12
to simple-b...@googlegroups.com
On Wed, Aug 15, 2012 at 10:40 PM, Jesse C <crimson...@gmail.com> wrote:
> Is it possible to write a command that calls another command? I feel like
> that might be the only way to do it.

If that is an acceptable way of solving the OP's problem, then why not
simply define an alias:

alias eclipse-dist=; eclipse; dist-task

in a .sbtrc file?
--
Harald

Heiko Seeberger

unread,
Aug 16, 2012, 9:57:45 AM8/16/12
to simple-b...@googlegroups.com
On Aug 16, 2012, at 12:08 AM, Harald Meland wrote:

> alias eclipse-dist=; eclipse; dist-task

Awesome. That would work!

Heiko

Heiko Seeberger

unread,
Aug 16, 2012, 10:02:01 AM8/16/12
to simple-b...@googlegroups.com
On Aug 15, 2012, at 10:52 AM, Joshua Serrin wrote:

> Really? In my Build.scala I have a dist task to run assembly and copy
> files to a directory.
>
> https://gist.github.com/3361920
>
> Why can't we do something like...
>
> dist <<= (assembly in Compile, eclipse, ...
>
> BTW: I get a 'not found: value eclipse' when I try it.

eclipse, as compared to assembly, is not a task, but a command. Tasks have associated keys and those are referred in expressions like the one you tried. Commands have no such keys.

Heiko

Reply all
Reply to author
Forward
0 new messages