Comments (6)
I've used the sbt ivyXML override to exclude particular dependencies, which seems to work also (removes those deps from the assembly)l
from sbt-assembly.
At the point that I am constructing an assembly, all I see is a list of dirs and jars, so likely it'll be some sort of exclusion mechanism for a set of jars.
from sbt-assembly.
You can write something like
excludedJars in Assembly <<= baseDirectory { base =>
(base / "lib" / "compile" ** "*.jar").classpath
}
or
excludedJars in Assembly <<= (fullClasspath in Assembly) map { cp =>
cp filter {_.data.getName == "compile-0.1.0.jar"}
}
from sbt-assembly.
Awesome - thanks!
from sbt-assembly.
I haven't found docs about the "provided" scope but it seams that it is working in SBT 12.x end up here looking how to use "provided" dependency scope. It works in recent version of SBT as follows
libraryDependencies += "net.liftweb" %% "lift-json" % "2.4" % "provided"
Then this dependency will be excluded from runtime class path. At least it seems so from: show update
from sbt-assembly.
This is what I say in README now:
To exclude some jar file, first consider using
"provided"
dependency. The dependency will be part of compilation, but excluded from the runtime. Next, try creating a custom configuration that describes your classpath. If all efforts fail, here's a way to exclude jars...
from sbt-assembly.
Related Issues (20)
- Inconsistent merge strategy logging vs counts
- Logback does not work with รผber-JAR HOT 1
- Migrate to `com.github.sbt`? HOT 1
- Assembly no longer creating directories defined in assemblyOutputPath HOT 4
- executable jar args
- Concatenating files without a newline HOT 4
- META-INF/javax.annotation.processing.Processor is included empty when shading is enabled - log4j HOT 1
- Add setting to allow adding arbitrary files to output Jar HOT 1
- Merge error not comprehensible HOT 3
- Definition of a repeatable build HOT 1
- InvalidPathException on Assembly 2.1.1 HOT 13
- Current alternative to assembledMappings HOT 6
- Document log4j2 plugins custom merge strategy HOT 2
- sbt clean assembly fails
- issue with zip64 headers in jars generated using sbt-assembly HOT 1
- Files from project's sources overwrite merged dependencies (2.0.0 regression)
- Shading breaks META-INF/services (1.2.0 regression) HOT 1
- Exception thrown "pomProperties" is null
- Abort build if shading fails HOT 1
- question about Mappings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-assembly.