Skip to content
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

Using SubstrateVM SDK as gradle dependency fails the build #148

Open
sbaier1 opened this issue Aug 30, 2019 · 2 comments
Open

Using SubstrateVM SDK as gradle dependency fails the build #148

sbaier1 opened this issue Aug 30, 2019 · 2 comments

Comments

@sbaier1
Copy link

sbaier1 commented Aug 30, 2019

What happened?

  • Used dependency implementation "com.oracle.substratevm:svm:19.2.0"

  • Tried building image:

> Task :nativeImage FAILED
Error: Invalid or corrupt jarfile /Users/sbaier/.gradle/caches/modules-2/files-2.1/com.oracle.substratevm/svm-hosted-native-linux-amd64/19.2.0/16d976b1538bfe6d6a47c9acb1f6a47454c38707/svm-hosted-native-linux-amd64-19.2.0.tar.gz
Caused by: java.util.zip.ZipException: zip END header not found

What did you want to happen?

nativeImage to execute as expected

@sbaier1
Copy link
Author

sbaier1 commented Aug 30, 2019

The cause seems to be pulling in the com.oracle.substratevm:svm dependency. It has the svm archives as a transitive dependency which gradle then pulls into the classpath.

The plugin probably needs to filter out anything that isn't a .jar from the classpath arguments to fix this.

@sbaier1 sbaier1 changed the title Plugin does not work with 19.1.x and 19.2.x Using SubstrateVM SDK as gradle dependency fails the build Aug 30, 2019
@jvican
Copy link
Contributor

jvican commented Sep 25, 2020

I've fixed this issue by putting the Graal configuration before the declaration of my dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants