sbt / sbt-native-packager

sbt Native Packager
https://sbt-native-packager.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
1.59k stars 439 forks source link

SBT native packager: reference to undefined setting Universal / mappings #1507

Closed joesan closed 2 years ago

joesan commented 2 years ago

Expected behaviour

Adding a file under a folder location gets added to the Docker destination directory:

Universal / mappings += (file("data/housing.tgz"), "/opt/docker/data/housing.tgz")

Actual behaviour

[info] welcome to sbt 1.5.7 (Private Build Java 1.8.0_312)
[info] loading settings for project housing-price-prediction-data-preparation-build from plugins.sbt ...
[info] loading project definition from /home/joesan/Projects/Private/ml-projects/housing-price-prediction-data-preparation/project
[info] loading settings for project housing-price-prediction-data-preparation from build.sbt ...
[info] resolving key references (10159 settings) ...
Reference to undefined setting: 

  Universal / mappings from Universal / mappings (/home/joesan/Projects/Private/ml-projects/housing-price-prediction-data-preparation/build.sbt:58)

Information

guizmaii commented 2 years ago

@joesan Did you add this .enablePlugins(UniversalPlugin) or that .enablePlugins(JavaAppPackaging) somewhere in your build.sbt file?

joesan commented 2 years ago

I solved it. The problem was that I was specifying the mapping outside of .settings(......). As soon as I had it added inside the .settings(......), it kind of worked.