Skip to content
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

Ability to pack test scoped jars #110

Open
stevejagodzinski opened this issue Jan 26, 2017 · 3 comments
Open

Ability to pack test scoped jars #110

stevejagodzinski opened this issue Jan 26, 2017 · 3 comments
Labels
help_wanted Need a pull request for addressing the issue

Comments

@stevejagodzinski
Copy link

Ability to pack test scoped jars only
Or, both test & runtime scoped jars

@liebichw
Copy link

liebichw commented Jan 2, 2020

The ability to also pack a test project would (in some instances) be rather useful. Is there some way to do this with sbt-pack? Calling just "test:pack" does not what I want - it only packs the main project

@xerial
Copy link
Owner

xerial commented Jan 7, 2020

I think we need to fix these settings so that we can change the scope:

packMainDiscovered := Def.taskDyn {
val mainClasses = getFromSelectedProjects(thisProjectRef.value, discoveredMainClasses in Compile, state.value, packExclude.value)
Def.task { mainClasses.value.flatMap(_._1.map(mainClass => hyphenize(mainClass.split('.').last) -> mainClass).toMap).toMap }
}.value,
packAllUnmanagedJars := Def.taskDyn {
val allUnmanagedJars = getFromSelectedProjects(thisProjectRef.value, unmanagedJars in Runtime, state.value, packExclude.value)
Def.task { allUnmanagedJars.value }
}.value,
packLibJars := Def.taskDyn {
val libJars = getFromSelectedProjects(thisProjectRef.value, packageBin in Runtime, state.value, packExcludeLibJars.value)
Def.task { libJars.value }
}.value,

@xerial xerial added the help_wanted Need a pull request for addressing the issue label Jan 7, 2020
Marc-Ducret added a commit to Marc-Ducret/fork-sbt-pack that referenced this issue Nov 21, 2022
xerial pushed a commit that referenced this issue Nov 24, 2022
* Ability to pack test scoped jars #110

* Fix publish pack archives
@liebichw
Copy link

liebichw commented Apr 4, 2024

This is not complete yet in the version v0.19 (itseems) - test-scoped main classes are ignored by "Test/pack".
It seems that packDiscoveredMain is not yet test-scoped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help_wanted Need a pull request for addressing the issue
Projects
None yet
Development

No branches or pull requests

3 participants