graalvm / native-build-tools

Native-image plugins for various build tools
https://graalvm.github.io/native-build-tools/
Other
371 stars 60 forks source link

Update Default Target Directory for MetadataCopy Task #580

Closed dnestoro closed 8 months ago

dnestoro commented 8 months ago

As described in this issue we should specify default output directory for metadataCopy task according to the recommendation from GraalVM website

Note: currently we don't have default value for the Gradle plugin, while we do have one for the Maven

dnestoro commented 8 months ago

so adding this explicitly could overwrite legit metadata

But it will override metadata only if we explicitly call metadataCopy task? Otherwise the metadata will be stored as usual into directory specified in agent-output-dir. The point here is that we should make metadataCopy task coping metadata to the directory we are suggesting in our docs (so that user can just say ./gradlew metadataCopy and all metadata will be on recommended location). If I am not missing something.

So I think we should either:

  • remove the default from the Maven plugin, then document how to set the target directory for metadata copy
  • or change the Gradle plugin so that it also introduces a default value (which again I'm not sure is a good idea)

Yes, I agree that we should sync Maven and Gradle solutions.

fniephaus commented 8 months ago

The original issue as well as this PR is confusing

When I opened the ticket, I was not aware that this is another part where our Maven and Gradle plugins diverge. Yes, we should fix that and align those. This PR is still an improvement: while it doesn't fix the misalignment, it improves the recommendation. Does it make sense to merge this and align the plugins in a follow up (after a discussion it seems)?