diff --git a/plugins/clojure/clojure.go b/plugins/clojure/clojure.go index efc45384..39e979fb 100644 --- a/plugins/clojure/clojure.go +++ b/plugins/clojure/clojure.go @@ -60,6 +60,7 @@ func (p *Plugin) Build(fn *function.Function, zip *archive.Zip) error { if fn.Runtime != Runtime { return nil } + fn.Runtime = RuntimeCanonical jar := filepath.Join(fn.Path, "target", jarFile) diff --git a/plugins/java/java.go b/plugins/java/java.go index 730ae39d..a0f56d26 100644 --- a/plugins/java/java.go +++ b/plugins/java/java.go @@ -67,14 +67,13 @@ func (p *Plugin) Build(fn *function.Function, zip *archive.Zip) error { fn.Runtime = RuntimeCanonical fn.Log.Debugf("searching for JAR (%s) in directories: %s", jarFile, strings.Join(jarSearchPaths, ", ")) - expectedJarPath := findJar(fn.Path) - if expectedJarPath == "" { - return errors.New("Expected jar file not found") + jar := findJar(fn.Path) + if jar == "" { + return errors.Errorf("missing jar file %q", jar) } - fn.Log.Debugf("found jar path: %s", expectedJarPath) fn.Log.Debug("appending compiled files") - reader, err := azip.OpenReader(expectedJarPath) + reader, err := azip.OpenReader(jar) if err != nil { return err }