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

option to exclude scala-library explicitly #716

Closed
scalame opened this issue Dec 15, 2015 · 4 comments
Closed

option to exclude scala-library explicitly #716

scalame opened this issue Dec 15, 2015 · 4 comments

Comments

@scalame
Copy link

scalame commented Dec 15, 2015

I have a multi-module project and one of the module depends on scala-library. I have tried putting ExclusionRules on both the root's build.sbt and the module's build.sbt to avoid pulling the scala-library artifacts in 'sbt stage'. The exclusionRule works for other artifacts (i.e. an exclusion rule with just organization = "org.scala" would exclude every other scala library except scala-library.jar) but just can't get rid of scald-library.jar!!

@muuki88
Copy link
Contributor

muuki88 commented Dec 19, 2015

Can you post a minimal setup to reproduce this?

@scalame
Copy link
Author

scalame commented Dec 21, 2015

Hi,

Here is a minimal project setup. This includes a root project and submodule in lib/core (sbt project as well). I have added some dependencies to mimic the issue. I know we can exclude scala libraries by setting the 'autoScalaLibrary' to false in the build.sbt or using ExclusionRules but then each scala library jar will need to be included in each submodule's dependency as 'test'.

Unzip the file.. cd into the directory and run sbt stage and you will see that the scala library dependencies are in target/universal/stage/lib

I was hoping that we can exclude the scala library dependencies with another option in one place (at the root project)

Hope this helps, let me know if I can provide any more info

Thanks!

sbtnativepackager.zip

@muuki88 muuki88 closed this as completed Jul 14, 2019
@AceHack
Copy link

AceHack commented Jun 30, 2020

What was the resolution, I'm trying to do the same?

@muuki88
Copy link
Contributor

muuki88 commented Jul 6, 2020

You can always filter the mappings, e.g.

Universal / mappings := (Universal / mappings).value.filter {
   case (_, path) => !path.contains("org.scala")
}

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

3 participants