2

I'd like to generate some additional stuff into ./idea/workspace.xml after executing gen-idea command from sbt-idea plugin. I either need to modify gen-idea command to append my code after it's executed or create a new command that runs gen-idea command. The question would be how to do that?

More generally, how to execute a command from sbt task or command?

nau
  • 1,145
  • 8
  • 20
  • What about [this Question](http://stackoverflow.com/questions/7344477/adding-new-task-dependencies-to-built-in-sbt-tasks)? – Jan Oct 17 '12 at 14:36
  • You can't depend on commands this way in sbt. Only on tasks. – nau Oct 17 '12 at 15:31
  • see this discussion on the sbt list: https://groups.google.com/d/topic/simple-build-tool/BY3o3lWWnbU/discussion – Lukas Rytz Oct 17 '12 at 15:55

1 Answers1

1

According to this discussion it's not possible with sbt up to 0.12.x.

One possible workaround would be defining an alias:

alias genidea=; gen-idea; my-gen-stuff

in .sbtrc file

nau
  • 1,145
  • 8
  • 20