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

[3.8.x][MNG-7395] - Support system-properties in extension.xml #673

Merged
merged 1 commit into from Feb 19, 2022

Conversation

laeubi
Copy link

@laeubi laeubi commented Feb 2, 2022

We at Tycho have a combination of a core-extension and a build-plugin. What always is a source of confusion, that one is able to define e.g. a <tycho-version> property that could be overridden on the commandline using -D but no such thing exits for the .mvn/extensions.xml

This makes it also hard to make some regression-testing e.g. to check fast if a certain problem occurs also in the previous version as one always has to take in mind that the .mvn/extensions.xml must be edited by hand.

For that reason it would help if at least basic interpolation using the "maven-properties" would be possible.

This PR adds support for having basic interpolation in .mvn/extensions.xml to either:

  1. Specify a (default) version in maven.config
  2. Specify a version on the commandline with mvn -Dsome.version=1.2.3

FYI @mickaelistria @akurtakov

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    for the change (usually before you start working on it). Trivial changes like typos do not
    require a JIRA issue. Your pull request should address just this issue, without
    pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [MNG-XXX] SUMMARY, where you replace MNG-XXX
    and SUMMARY with the appropriate JIRA issue. Best practice is to use the JIRA issue
    title in the pull request title and in the first line of the commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the Core IT successfully.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@laeubi laeubi force-pushed the MNG-7395_maven-3.8.x branch 2 times, most recently from b613227 to cf108a6 Compare February 6, 2022 18:51
@michael-o
Copy link
Member

michael-o commented Feb 6, 2022

@laeubi Instead of or additionally jvm.config you can also use maven.config. This will make it a user property.

@laeubi
Copy link
Author

laeubi commented Feb 6, 2022

@michael-o thanks for the hint with maven.config! I'm currently try to derive a Integration test and probably will use maven.config there as well.

@michael-o
Copy link
Member

Good, jvm.config should really be for JVM-related options only.

@laeubi
Copy link
Author

laeubi commented Feb 6, 2022

I have updated the PR description accordingly.

This adds support for property interpolation in extensions.xml to allow
advanced use cases where one wants to contribute certain things via the
commandline.

This closes apache#673
@asfgit asfgit merged commit a5acd3e into apache:maven-3.8.x Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants