You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+4-11
Original file line number
Diff line number
Diff line change
@@ -548,21 +548,15 @@ lazy val app = (project in file("app"))
548
548
549
549
### Publishing (Not Recommended)
550
550
551
-
Publishing über JARs out to the world is discouraged because non-modular JARs cause much sadness. One might think non-modularity is convenience but it quickly turns into a headache the moment your users step outside of Hello World example code. If you still wish to publish your assembled artifact along with the `publish` task
552
-
and all of the other artifacts, add an `assembly` classifier (or other):
551
+
We discourage you from publishing non-shaded über JARs beyond deployment. The moment your über JAR is used as a library, it becomes a **parasitized über JAR**, bringing in parasite libraries that can not be excluded or resolved. One might think non-modularity is convenience, but it turns into others' headache down the road.
553
552
554
-
```scala
555
-
assembly / artifact := {
556
-
valart= (assembly / artifact).value
557
-
art.withClassifier(Some("assembly"))
558
-
}
553
+
Here are some example of parasitized über JARs:
559
554
560
-
addArtifact(assembly / artifact, assembly)
561
-
```
555
+
- hive-exec 2.3.9 and 3.1.3 contain com.google.common, com.google.protobuf, io.airlift, org.apache.parquet, org.codehaus.jackson, org.joda.time, etc.
562
556
563
557
### Q: Despite the concerned friends, I still want publish über JARs. What advice do you have?
564
558
565
-
You would likely need to set up a front business to lie about what dependencies you have in `pom.xml` and `ivy.xml`.
559
+
Shade everything. Next, you would likely need to set up a front business to lie about what dependencies you have in `pom.xml` and `ivy.xml`.
566
560
To do so, make a subproject for über JAR purpose only where you depend on the dependencies, and make a second cosmetic subproject that you use only for publishing purpose:
0 commit comments