You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/01/01 20:09:05 UTC

[maven] branch MNG-7658 updated (55bb855dd -> 7b0006938)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch MNG-7658
in repository https://gitbox.apache.org/repos/asf/maven.git


 discard 55bb855dd [MNG-7658] CI-friendly versions should only come from/rely on user properties
     add c2c6dd092 Add TODO about property source of maven.repo.local
     new 7b0006938 [MNG-7658] CI-friendly versions should only come from/rely on user properties

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (55bb855dd)
            \
             N -- N -- N   refs/heads/MNG-7658 (7b0006938)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java | 2 ++
 1 file changed, 2 insertions(+)


[maven] 01/01: [MNG-7658] CI-friendly versions should only come from/rely on user properties

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-7658
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 7b0006938800b3fb15a12afd5851da4a52d8bdfa
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Jan 1 19:52:02 2023 +0100

    [MNG-7658] CI-friendly versions should only come from/rely on user properties
    
    This closes #945
---
 .../model/interpolation/DefaultModelVersionProcessor.java  | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java
index a80490e4a..a01c4e6d7 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/DefaultModelVersionProcessor.java
@@ -46,18 +46,16 @@ public class DefaultModelVersionProcessor implements ModelVersionProcessor {
                 || SHA1_PROPERTY.equals(property);
     }
 
-    // TODO This class MUST test for user properties and THEN for system properties
     @Override
     public void overwriteModelProperties(Properties modelProperties, ModelBuildingRequest request) {
-        if (request.getSystemProperties().containsKey(REVISION_PROPERTY)) {
-            modelProperties.put(REVISION_PROPERTY, request.getSystemProperties().get(REVISION_PROPERTY));
+        if (request.getUserProperties().containsKey(REVISION_PROPERTY)) {
+            modelProperties.put(REVISION_PROPERTY, request.getUserProperties().get(REVISION_PROPERTY));
         }
-        if (request.getSystemProperties().containsKey(CHANGELIST_PROPERTY)) {
-            modelProperties.put(
-                    CHANGELIST_PROPERTY, request.getSystemProperties().get(CHANGELIST_PROPERTY));
+        if (request.getUserProperties().containsKey(CHANGELIST_PROPERTY)) {
+            modelProperties.put(CHANGELIST_PROPERTY, request.getUserProperties().get(CHANGELIST_PROPERTY));
         }
-        if (request.getSystemProperties().containsKey(SHA1_PROPERTY)) {
-            modelProperties.put(SHA1_PROPERTY, request.getSystemProperties().get(SHA1_PROPERTY));
+        if (request.getUserProperties().containsKey(SHA1_PROPERTY)) {
+            modelProperties.put(SHA1_PROPERTY, request.getUserProperties().get(SHA1_PROPERTY));
         }
     }
 }