Skip to content

Testing clj-jgit (unsuccessful) #69

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions clj-jgit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/target
/classes
/checkouts
profiles.clj
pom.xml
pom.xml.asc
*.jar
*.class
/.lein-*
/.nrepl-port
.hgignore
.hg/
13 changes: 13 additions & 0 deletions clj-jgit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Clj-jgit

Testing whether [clj-jgit](https://github.com/clj-jgit/clj-jgit) library can be used in a native binary image with GraalVM.

## Usage

Currently testing:

[clj-jgit "1.1.0"]

Test with:

lein do clean, uberjar, native, run-native
39 changes: 39 additions & 0 deletions clj-jgit/project.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
(defproject clj-jgit "0.1.0-SNAPSHOT"

:dependencies [[org.clojure/clojure "1.12.0"]
[clj-jgit "1.1.0"]
[borkdude/graal.locking "0.0.2"]
[cheshire "6.0.0"]]

:main simple.main

:uberjar-name "simple-main.jar"
:profiles {:uberjar {:aot :all}
:dev {:plugins [[lein-shell "0.5.0"]]}}

:aliases
{"native"
["shell"
"native-image" "--report-unsupported-elements-at-runtime" "--no-server"
; "--initialize-at-run-time=java.util.Random"
"--initialize-at-run-time=java.util.Random"
"--initialize-at-run-time=org.eclipse.jgit.util.FileUtils"
"--initialize-at-run-time=org.eclipse.jgit.transport.HttpAuthMethod\\$Digest"
"--initialize-at-run-time=org.eclipse.jgit.lib.internal.WorkQueue"
"--initialize-at-run-time=org.eclipse.jgit.internal.storage.file.WindowCache"

;; java.util.jar.JarException: The JCE Provider simple-main.jar is not signed
"--initialize-at-run-time=org.apache.sshd.common.config.keys.loader.AESPrivateKeyObfuscator\\$LazyKeyLengthsHolder"

"--initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG\\$Default"

"--initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG\\$NonceAndIV"

;; Configure simple/reflection.clj and run `lein run -m simple.reflection`
"-H:ReflectionConfigurationFiles=resources/reflect-config.json"

"--initialize-at-build-time"
"-jar" "./target/${:uberjar-name:-${:name}-${:version}-standalone.jar}"
"-H:Name=./target/${:name}"]

"run-native" ["shell" "./target/${:name}"]})
Loading