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

Enable metadata copy when agent is enabled from cmd #407

Conversation

dnestoro
Copy link
Collaborator

@dnestoro dnestoro commented Feb 27, 2023

This PR should fix this issue. Previously metadata-copy mojo didn't check if agent is enabled via command line

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Feb 27, 2023
@dnestoro dnestoro changed the title Dnestoro/enable metadata copy when agent is enabled from cmd Enable metadata copy when agent is enabled from cmd Feb 27, 2023
Copy link
Collaborator

@alvarosanchez alvarosanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the way to fix the issue.

Instead, you need to use the property attribute of the @Parameter annotation in AgentConfiguration:

@Parameter(property = "agent")
private boolean enabled;

Quoting their documentation:

Property to use to retrieve a value. Can come from -D execution, setting properties or pom properties.

@dnestoro dnestoro force-pushed the dnestoro/EnableMetadataCopyWhenAgentIsEnabledFromCMD branch from c1e7dae to 83f2ea3 Compare March 7, 2023 15:38
@dnestoro dnestoro merged commit 199ce20 into graalvm:master Mar 8, 2023
@melix melix added this to the 0.9.21 milestone Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

For Maven Plugin 0.9.20, the native:metadata-copy task cannot be executed normally
3 participants