projectriff / java-function-buildpack Goto Github PK
View Code? Open in Web Editor NEWA Cloud Native Buildpack for riff java functions
License: Apache License 2.0
A Cloud Native Buildpack for riff java functions
License: Apache License 2.0
Not sure whether that works or not at this point.
I have a plain Java function that has a required dependency and to include that I use the shade plugin for Maven.
The build fails with the following error:
unable to determine built artifact in /workspace/app/target, candidates: [/workspace/app/target/capitalize-java-0.0.1.jar /workspace/app/target/original-capitalize-java-0.0.1.jar]
2018/12/07 00:10:47 Error: failed to : exit status 103
Error: failed with status code: 7
This currently fails if part of the mandatory subproject configuration is set by the parent project.
Default command line defined in this buildpack:
$ FUNCTION_URI=file:///workspace java -cp /layers/io.projectriff.java/riff-invoker-java/ org.springframework.boot.loader.JarLauncher
...
INFO: Started application in 4.117 seconds (JVM running for 5.107)
Tweaked:
$ FUNCTION_URI=file:///workspace java -Dspring.jmx.enabled=false -Dspring.config.location=file:///layers/io.projectriff.java/riff-invoker-java/BOOT-INF/classes/application.properties -noverify -XX:TieredStopAtLevel=1 -cp /layers/io.projectriff.java/riff-invoker-java:/layers/io.projectriff.java/riff-invoker-java/BOOT-INF/classes:`echo /layers/io.projectriff.java/riff-invoker-java/BOOT-INF/lib/*.jar | tr ' ' ':'` io.projectriff.invoker.JavaFunctionInvokerApplication
[2019-09-04 13:02:43.201] - 513 INFO [Thread-1] --- org.springframework.boot.SpringApplication: Started application in 1.538 seconds (JVM running for 1.935)
And updated to Spring Boot 2.2:
$ FUNCTION_URI=file:///workspace java -Dspring.main.lazy-initialization=true -Dspring.jmx.enabled=false -Dspring.config.location=file:///layers/io.projectriff.java/riff-invoker-java/BOOT-INF/classes/application.properties -noverify -XX:TieredStopAtLevel=1 -cp $CP io.projectriff.invoker.JavaFunctionInvokerApplication
...
[2019-09-04 12:54:52.147] - 446 INFO [Thread-1] --- org.springframework.boot.SpringApplication: Started application in 1.114 seconds (JVM running for 1.514)
It would probably be faster with Java 8. Maybe that ought to be an option (since it is supported with the openjdk buildpack it probably already is if you know how to tweak the build)?
Most of the boost comes from -noverify
which the JVM purists don't like. We could also probably remove the -noverify
for the sake of cleanliness if we used JDK 11 and App CDS (expect similar cold start times). Requires more munging of the invoker artifact (and maybe should be a feature of the openjdk build pack).
Dependabot couldn't parse the go.mod found at /go.mod
.
The error Dependabot encountered was:
go: github.com/cloudfoundry/[email protected] requires
cloud.google.com/[email protected] requires
honnef.co/go/[email protected] requires
github.com/rogpeppe/[email protected] requires
gopkg.in/[email protected]: reading gopkg.in/errgo.v2/go.mod at revision v2.1.0: unknown revision v2.1.0
Currently, the buildpack takes ${JAVA_OPTS}
as an input, however the documentation and the buildpack configuration metadata does not mention it. These things should be updated to reflect reality.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.