Configure NBT so that it works consistently

This commit configures the Native Build Tools plugin to use Maven's
`target/classes` rather than the default generated JAR of the project.
Previously, this would fail with the default repackage option as the
default JAR is the repackaged archive and it has a specific format that
NBT can't understand.

Closes gh-31848
This commit is contained in:
Stephane Nicoll 2022-07-22 17:36:25 +02:00
parent 85c41d6698
commit f962f2a430

View File

@ -238,25 +238,20 @@ publishing.publications.withType(MavenPublication) {
delegate.goal('aot-generate')
}
}
execution {
delegate.id('repackage')
configuration {
delegate.classifier('exec')
}
}
}
}
plugin {
delegate.groupId('org.graalvm.buildtools')
delegate.artifactId('native-maven-plugin')
configuration {
delegate.classesDirectory('${project.build.outputDirectory}')
metadataRepository {
delegate.enabled('true')
}
}
executions {
execution {
delegate.id('build-native')
delegate.id('native-build')
goals {
delegate.goal('build')
}