On Thu, 30 Aug 2012 03:38:15 -0700 (PDT)
Roman Timushev <
rti...@gmail.com> wrote:
> Hi Mark,
>
> Thank you for your answer. We have a properly configured aggregation
> hierarchy and when I call "publish-local" manually it publishes everything.
> As you already explained, the problem I have is that I run this task as a
> dependency and therefore an aggregation is not taken into account.
>
> Currently I've solved the issue by adding dependencies to all
> "publish-local" tasks I need, but it is a bit verbose.
Yes, explicit dependencies is perhaps the simplest, if repetitive, approach for now.
> Anyway, I think that it is possible to avoid such hard-coding, just my
> sbt-fu is not strong enough — sbt is able to run "compile" for
> dependencies, so there probably is a way to run "publish-local" for
> dependencies. May be I'll have some time to dive deeper into sbt sources
> next week, the answer must be there :-)
Right, sbt can do it and there is a way, but it hasn't been made very accessible. I doubt it would make your build more readable or maintainable as it is currently.
There are a couple of examples in sbt's default settings here:
http://harrah.github.com/xsbt/latest/sxr/Defaults.scala.html#330509
Pick the task ('publishLocal', for example), a default if the project doesn't contain the task, whether to include aggregate dependencies, and whether to include the task in the current project. Then, run all of them. Again, I don't claim this is easy now or that it is intrinsically complicated, just that there isn't a clean API for it right now.
-Mark
> --
> Roman
> > > To post to this group, send email to
simple-b...@googlegroups.com<javascript:>.
> >
> > > To unsubscribe from this group, send email to
> >
simple-build-t...@googlegroups.com <javascript:>.
> --
> You received this message because you are subscribed to the Google Groups "simple-build-tool" group.
> To view this discussion on the web visit
https://groups.google.com/d/msg/simple-build-tool/-/wEvxoICL6DcJ.