-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cannot use sbt-native-packager to build a setup for test classes #1157
Comments
I found newer plugin releases (strange - github tells me 1.3.6 is the latest release and offers me to show newer tags?), but the problem persisted also with the plugin version 1.3.9. |
Thanks for your detailed issue 🤗 This question is similar to #1136 I guess. Your attempt doesn't work, because adding something to the // adds the test jar to mappings
mappings in Universal += {
// generates the test package
val testjar = (packageBin in Test).value
// maps this file to your lib folder in your output package
testjar -> s"lib/${testjar.getName}"
},
scriptClasspath += (packageBin in Test).value.getName If you
|
This approach works for a single project, but in a multi-project (e.g. https://github.com/muuki88/sbt-native-packager-examples/blob/master/multi-module-build/build.sbt) doesn't include any of the |
I attempted to figure out one of my issues. But it doesn't look like it's supported? Should something like this work?
Looks like it's hard coded to Line 132 in f39bf3b
|
Expected behaviour
I wanted to use the sbt-native-packager plugin to create a setup for certain test classes (for internal use in our team).
I tried to use the method shown in https://stackoverflow.com/questions/31186204/how-to-add-a-project-test-jar-to-a-package/31367788#31367788 (i.e. add a mapping for the test-jar).
Actual behaviour
This works insofar as the "stage" command now also creates and adds the test jar. But it complains that no mainClass was found and thus no start script was created.
If I call "test/stage", the result is the same.
When I set the "mainClass in Compile" setting to the wanted class, a start script is created, but it fails because the test-jar is not present in this script's classpath!
Information
I am using
The text was updated successfully, but these errors were encountered: