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

JVM resources are not copied into jar #106

Closed
hohonuuli opened this issue Jun 23, 2020 · 1 comment · Fixed by #108
Closed

JVM resources are not copied into jar #106

hohonuuli opened this issue Jun 23, 2020 · 1 comment · Fixed by #108

Comments

@hohonuuli
Copy link

tl;dr

Files in the resource directory are not being copied into the built jar file.

the sordid details

I've set up a project that mimics a sbt/maven layout (src/main/scala, src/main/resources, etc). The source for the project is at https://github.com/hohonuuli/demoseed. In this project there is a resource file at src/main/resources/logback.xml. My module is configured like so:

[module.demoseed.jvm]
root = "."
resources = [
  "src/main/resources"
]
sources = [
  "src/main/scala",
  "src/main/java"
]
scalaDeps = [
  ["io.circe", "circe-core", "0.13.0"]
]

I ran the following:

seed all
seed package demoseed --libs

Everything compiles just fine, but I can't find the logback.xml file from resources in the built jar. e.g.

❯ jar -tvf build/dist/demoseed.jar
   702 Mon Jun 22 17:39:16 PDT 2020 META-INF/MANIFEST.MF
     0 Mon Jun 22 17:39:14 PDT 2020 demoseed/
   925 Mon Jun 22 17:39:14 PDT 2020 demoseed/Main$.class
   301 Mon Jun 22 17:39:14 PDT 2020 demoseed/Foo.class
   635 Mon Jun 22 17:39:14 PDT 2020 demoseed/Main.class

At this point, I can't tell if this is a bug in seed or if I've missed some configuration. Any help is appreciated. (BTW, seed is pretty cool!)

@tindzk
Copy link
Owner

tindzk commented Jun 27, 2020

Thanks for the detailed bug report! I agree that package should copy resource files too. #108 will fix this.

tindzk added a commit that referenced this issue Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants