Skip to content

Commit 0a75d4c

Browse files
authored
Merge pull request #2717 from VirtusLab/stable
Back port of documentation changes to main
2 parents 05f1466 + 9e30ea7 commit 0a75d4c

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

website/docs/commands/package.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,25 @@ Hello
127127
Hello
128128
-->
129129

130+
By default assemblies are self-executable, just like the default package format. With the `--preamble=false` option, you can build an assembly that just contains the JAR and does not contain any built-in Bash code, and therefore can be launched directly with Java and is more portable:
131+
132+
<ChainedSnippets>
133+
134+
```bash
135+
scala-cli --power package Hello.scala -o hello.jar --assembly --preamble=false
136+
java -jar hello.jar
137+
```
138+
139+
```text
140+
Hello
141+
```
142+
143+
</ChainedSnippets>
144+
145+
<!-- Expected:
146+
Hello
147+
-->
148+
130149
## Docker container
131150

132151
Scala CLI can create an executable application and package it into a docker image.
@@ -506,4 +525,3 @@ The using directive allows you to define the image repository.
506525
```scala compile power
507526
//> using packaging.dockerImageRepository scala-cli
508527
```
509-

0 commit comments

Comments
 (0)