Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments on post "Defining Multi-project Builds with sbt" #53

Open
pbassiner opened this issue Oct 16, 2017 · 5 comments
Open

Comments on post "Defining Multi-project Builds with sbt" #53

pbassiner opened this issue Oct 16, 2017 · 5 comments

Comments

@pbassiner
Copy link
Owner

Here you can leave your comments about the blogpost https://pbassiner.github.io/blog/defining_multi-project_builds_with_sbt.html

@wayoung
Copy link

wayoung commented Jul 10, 2018

Hey, great article. I noticed that this is a nice way to do single degree project dependencies within sbt. But what if you had a 2 degree dependency? For example, what if it was common -> multi1 -> multi2 instead of common -> multi1; common -> multi2? I tried doing this with my own code, and I realized I needed to do (multi1.dependsOn(common), and multi2.dependsOn(common, multi1). It fails if I just do multi2.dependsOn(multi1). In this case, it tries to find common in maven, even though it's a project in my folder structure. Do you know a more elegant way to solve this?

@pbassiner
Copy link
Owner Author

Hi @wayoung,
Thanks, I'm glad you find it useful.

I've tried myself to make multi2 depend on multi1 instead of common and I don't see any fetching from maven. Actually, after cleaning the whole project, compiling only multi2 actually triggers the compilation of common and multi1 in the proper order.

@atulkSq1
Copy link

Great article! Very useful - Many thanks!!!

@Sparker0i
Copy link

In the artifacts generation section, is there a way to generate artifacts only for multi1 or multi2 at a given time but not both together?

@pbassiner
Copy link
Owner Author

Hi @Sparker0i,
you can either have specific assembly settings in each project instead of a single one in the parent one, or you can disable the plugin in a specific subproject using .disablePlugins(sbtassembly.AssemblyPlugin).
If you need to generate both but not at the same time, you can run sbt commands only for a subproject navigating first into it (project multi1, in sbt 1.x).
That said, bear in mind that this post is already 4 years old so, even this still works, there might be changes or improvements in sbt or the plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants