Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Classpath for gradle built jar not the same as maven jar, aot.jar produced by gradle plugin is last in classpath #1463

@hdeadman

Description

@hdeadman

After this refresh scope issue was fixed, I was able to get passed the error with a native build but if I tried to build and run the aot enabled jar in java, it didn't work, but it worked in a maven reproducer project. I believe the issue has to do with the classpath in the gradle produced jar. I think the maven plugin puts aot files in BOOT-INF/classes (before the jars) and the gradle plugin adds a jar projectname-aot.jar but it is listed last in the classpath.idx file.

I have a reproducer project that can be built with gradle and maven here: https://github.com/hdeadman/spring-native-reproducer

You can see the maven build and gradle build in the Github Actions workflow or you can run ./test-maven.sh and ./test-gradle.sh to see the problem locally. The gradle built jar doesn't start up b/c some AOT code doesn't override the regular code.

A similar problem was fixed for tests by this issue: #1272 fixed by eba6bc4

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions