Skip to content

Commit

Permalink
Publish nexus storage fat jar
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergrabinski committed Nov 6, 2023
1 parent c901cb8 commit a4a26f3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:
echo ${{ secrets.DOCKER_PASS }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
sbt -Dsbt.color=always -Dsbt.supershell=false \
app/Docker/publish \
storage/Docker/publish
storage/Docker/publish \
storage/Universal/publish
- name: Publish to Github Packages
run: |
sbt -Dsbt.color=always -Dsbt.supershell=false publish
14 changes: 13 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -724,13 +724,14 @@ lazy val cargo = taskKey[(File, String)]("Run Cargo to build 'nexus-fixer'")

lazy val storage = project
.in(file("storage"))
.enablePlugins(UniversalPlugin, JavaAppPackaging, JavaAgent, DockerPlugin, BuildInfoPlugin)
.enablePlugins(UniversalPlugin, UniversalDeployPlugin, JavaAppPackaging, JavaAgent, DockerPlugin, BuildInfoPlugin)
.settings(
shared,
compilation,
assertJavaVersion,
kamonSettings,
storageAssemblySettings,
storageFatJar,
coverage,
release,
servicePackaging,
Expand Down Expand Up @@ -882,6 +883,17 @@ lazy val kamonSettings = Seq(
javaAgents += kanelaAgent
)

lazy val storageFatJar = Seq(
Universal / mappings := {
val fatJar = (Compile / assembly).value
val filteredMappings = (Universal / mappings).value filter {
case (_, name) if name.contains("kanela-agent") => true
case (_, name) => !name.endsWith(".jar")
}
filteredMappings :+ (fatJar -> ("lib/" + fatJar.getName))
}
)

lazy val storageAssemblySettings = Seq(
assembly / test := {},
assembly / assemblyOutputPath := baseDirectory.value / "nexus-storage.jar",
Expand Down

0 comments on commit a4a26f3

Please sign in to comment.