Skip to content

Conversation

@michael-o
Copy link
Member

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.

@michael-o
Copy link
Member Author

I hope that I didn't miss a spot...

@michael-o
Copy link
Member Author

This is intended to be backported to 3.9.0.

@michael-o michael-o marked this pull request as ready for review October 7, 2022 11:40
@michael-o
Copy link
Member Author

@slawekjaranowski Any objections, opinions?

Comment on lines -2675 to 2676
<version>4.0.0+</version>
<description>Specifies that this profile will be activated when this system property is
<description>Specifies that this profile will be activated when this property is
specified.</description>
Copy link
Member

Choose a reason for hiding this comment

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

We can't use project property for profile activation - right?
It can be user or system property.
Maybe it should be clear here?

Copy link
Member Author

Choose a reason for hiding this comment

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

This needs to be checked...

Copy link
Member Author

Choose a reason for hiding this comment

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

I checked PropertyProfileActivator. It DOES use user and then system properties. No project/model properties, but the passed ProfileActivationContext contains a getProjectProperties() method so we could make this happen.

@cstamas
Copy link
Member

cstamas commented Oct 28, 2022

What about org.apache.maven.cli.MavenCli#populateProperties ? I thought this is to stop doing that?

@cstamas
Copy link
Member

cstamas commented Oct 28, 2022

What about org.apache.maven.cli.MavenCli#populateProperties ? I thought this is to stop doing that?

Oh, this is against master, and am looking at 3.9.x.... my point was, will this stop injecting Maven user properties into Java System.properties?

@cstamas
Copy link
Member

cstamas commented Oct 28, 2022

Also, this seems very much related to this PR #831 (the plexus context bit). As today Plexus uses java system properties for interpolation, while with that PR the plexus context is prepopulated with "config properties" (system + user) and there is no need that Plexus goes to System.properties as values are in context....

@michael-o
Copy link
Member Author

What about org.apache.maven.cli.MavenCli#populateProperties ? I thought this is to stop doing that?

Oh, this is against master, and am looking at 3.9.x.... my point was, will this stop injecting Maven user properties into Java System.properties?

This will also be applied to 3.9.x. This PR does not change any behavior. This just clarifies that Maven CLI accepts user properties, system properties cannot be passed via CLI. Please must know that mvn -Dfoo=bar are not system properties.

The promotion is a seperate issue which requires preparation with Maven Invoker first. I have discussed this with @slawekjaranowski already.

@asfgit asfgit force-pushed the MNG-7556 branch 2 times, most recently from 48ff3f4 to 0a8d246 Compare October 29, 2022 17:40
@asfgit asfgit closed this in 9c60138 Oct 29, 2022
@asfgit asfgit merged commit 9c60138 into master Oct 29, 2022
@michael-o michael-o deleted the MNG-7556 branch October 29, 2022 18:45
@jira-importer
Copy link

Resolve #8894

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants