openfaas / templates

OpenFaaS Classic templates
https://www.openfaas.com
MIT License
276 stars 228 forks source link

Generated Java templates have unresolved dependency #181

Closed s1monw1 closed 3 years ago

s1monw1 commented 4 years ago

Both the java8 and java12 template consist of multiple Gradle modules: function, entrypoint and model with both function and entrypoint pulling a local project dependency of model.

If used via faas-cli, the generated code (everything from function) cannot be compiled since the model dependency is not resolvable (since it is not being generated as part of the user-facing template). This submodule needs to be decoupled and made available as a remote dependency.

Expected Behaviour

If I generate a function based on a template via faas-cli, I expect to get a project I can build without seeing any compilation issues.

Current Behaviour

Using java8 and java12, the generated function cannot be built due to compilation errors (unresolved dependency to model)

Possible Solution

I propose the following solution:

Your Environment

SchulteMarkus commented 4 years ago

I can just agree here. Creating a Java OpenFaas function can be improved regarding developer experience.

In my opinion, AWS Java lambda is easy to use for creating custom Java functions, for details have a look at https://docs.aws.amazon.com/lambda/latest/dg/java-programming-model-handler-types.html

alexellis commented 3 years ago

I started publishing the dependencies to jcenter but ran into issues with all of the admin requirements and JIRA system. I will bump it up on the list to review again.

alexellis commented 3 years ago

Closed by https://github.com/openfaas/templates/issues/210