Multi-project build questions

24 views
Skip to first unread message

Robin Green

unread,
Mar 1, 2013, 9:12:11 AM3/1/13
to simple-b...@googlegroups.com
I have some questions about multi-project build in sbt 0.12, that are not clear to me from the Getting Started page on multi-projects in the docs:

1. Is a root project required, or optional?

2. Does it work well with revision control in Eclipse? For example, is the Mercurial Eclipse plugin able to cope with the fact that the Eclipse project root directory for each subproject (i.e. the subproject root directory) is not the repository root directory?

3. Why is there both a project id and a project name?
3a. Is there anything wrong with using the same name for the id and the name?

4. Which one is used when publishing a project - the id or the name?

Mark Harrah

unread,
Mar 2, 2013, 8:13:33 PM3/2/13
to simple-b...@googlegroups.com
On Fri, 1 Mar 2013 06:12:11 -0800 (PST)
Robin Green <gre...@gmail.com> wrote:

> I have some questions about multi-project build in sbt 0.12, that are not
> clear to me from the Getting Started page on multi-projects in the docs:
>
> 1. Is a root project required, or optional?

It is required to have a project in the base directory (file(".")). It does not have to aggregate other projects or anything else.

> 2. Does it work well with revision control in Eclipse? For example, is the
> Mercurial Eclipse plugin able to cope with the fact that the Eclipse
> project root directory for each subproject (i.e. the subproject root
> directory) is not the repository root directory?

I can't comment on Eclipse, but I would guess it can because Maven does things similarly. If you want, though, you can make all projects have the same base directory. You have to change `target` and `sourceDirectory` to avoid collisions.

> 3. Why is there both a project id and a project name?

`name` is a human readable name that forms the basis for many other settings. The project ID is used as a unique ID in several places, such as the command line or in scopes. This has been discussed in some other places, such as:

https://github.com/sbt/sbt/issues/554

> 3a. Is there anything wrong with using the same name for the id and the
> name?

No, but you might want `name` to use capitals and spaces. It is the basis for the title of scaladoc, but you could override that directly instead.

> 4. Which one is used when publishing a project - the id or the name?

You can `inspect` your way to more information (project-id -> module-name -> normalized-name -> name -> project ID), but for most projects, it will be determined by the normalized name (normalized-name). This is the `name` but lower-cased and with spaces removed to be suitable for Maven/Ivy.

-Mark

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

Reply all
Reply to author
Forward
0 new messages