graalvm / native-build-tools

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

Make java-agent binding configurable #555

Open AFulgens opened 6 months ago

AFulgens commented 6 months ago

Is your feature request related to a problem? Please describe.

In the maven plugin the agent execution is currently hard-coded for an execution with ID java-agent (cf. https://github.com/graalvm/native-build-tools/blob/92fe418a40adec17bde83b97fb7c9d4c4d871bdd/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeExtension.java#L150).

In some projects execution IDs are renamed (e.g., for easier build-log correlation). Thus, it would be nice to have a dynamic binding for the ID instead of hard-coding it.

Describe the solution you'd like

Proposed solution is to have a new configuration value for the org.graalvm.buildtools:native-maven-plugin e.g.,

<configuration>
  <agentExecutionId>myId</agentExecutionId>
</configuration>

Describe alternatives you've considered

It could be left as it is, but hard-coding is never nice.

Additional context

N/A