-
Notifications
You must be signed in to change notification settings - Fork 227
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
Fix java8 template to support resources #86
base: master
Are you sure you want to change the base?
Conversation
it works for me, thanks ! |
Great :) |
What is the impact on the build time before/after? |
With this change all resources within function's `src/main/resources` will be added to function.jar. Before that they used to be omited. The distribution, created after `gradle build` was modifying the jars, excluding all resources. Fixed that by deleting this distribution and creating a controlled one with `gradle distZip` Signed-off-by: Ivana Yovcheva (VMware) <[email protected]>
c98eb6d
to
27b2e10
Compare
Build time before:
After:
I've updated the description with test for reading resource contents. |
@alexellis are you likely to merge this anytime soon? |
@ivanayov Is this still applicable? I am unable to duplicate the issue with the java8 template pulled as of this morning (21 Feb 2019). I followed your test procedure and was able to find the resource and load the content of the file without the changes suggested in this PR. |
@tessellator When I run the current template, it does not find resources, I wrote functions to lists all files etc and it never found them |
Hmm, that is really weird. Here are the changes I made to the sample function to list the file contents, and I get the following output:
Would you mind trying my version of the function and seeing what you get (repo link)? I just want to establish some common ground for debugging purposes. |
@tessellator @burf2000 please could you both test and report back? |
Hi @erlendv, please could you take a quick look at this? Alex |
Im not able to reproduce this using the latest templates. Resources are included in the built jar-file. |
With this change all resources within function's
src/main/resources
will be added to function.jar.Before that they used to be omited.
The distribution, created after
gradle build
was modifying the jars, excluding all resoursed.Fixed that by deleting this distribution and creating a controlled one with
gradle distZip
Signed-off-by: Ivana Yovcheva (VMware) [email protected]
Motivation and Context
Which issue(s) this PR fixes
Fixes #72
How Has This Been Tested?
Tested function from @spacedoudou with updated template:
https://github.com/spacedoudou/openfaas1
Fixed code in Handler.java to prefix resource file with
/
:After modifying code to read contents:
Types of changes
Checklist:
git commit -s