You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2022/12/13 21:23:00 UTC

[jira] [Comment Edited] (MNG-7563) User properties now override model properties in dependencies

    [ https://issues.apache.org/jira/browse/MNG-7563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17645645#comment-17645645 ] 

Michael Osipov edited comment on MNG-7563 at 12/13/22 9:22 PM:
---------------------------------------------------------------

Let me crunch on this, [~hg@apteryx.fr]. I think we need also other comitters to think about this. What I could maybe do is to revert this change for 3.8.7, but I don't know whether this would be wise since it will be different in 3.9.0 and 4.x anyway. Also consider that doing {{MAVEN_OPTS=-Dver=x}} should yield the same result even without the change. WDYT?


was (Author: michael-o):
Let me crunch on this, [~hg@apteryx.fr]. I think we need also other comitters to think about this. What I could maybe do is to revert this change for 3.8.7, but I don't know whether this would be wise since it will be different in 3.9.0 and 4.x anyway. Also consider that doning {{MAVEN_OPTS=-Dver=x}} should yield the same result even without the change. WDYT?

> User properties now override model properties in dependencies
> -------------------------------------------------------------
>
>                 Key: MNG-7563
>                 URL: https://issues.apache.org/jira/browse/MNG-7563
>             Project: Maven
>          Issue Type: Bug
>          Components: Dependencies, POM
>    Affects Versions: 3.8.5, 3.8.6
>            Reporter: Hervé Guillemet
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>         Attachments: poms.zip
>
>
> An important change has been introduced in 3.8.5 that breaks some existing builds: Java system properties now take precedence over default values of user properties in dependency POMs. This look like a bug since it's now easy to affect dependency behaviors with system properties, a practice that has been discouraged. But maybe do you consider this as a new feature ?
> As an example, 3 poms are attached to this ticket.
> After installing projects b and c, building project a with:
> {{mvn package -Ddep=x}}
> used to succeed until 3.8.4 (-D is ignored) but throws error with 3.8.5 and 3.8.6 (-D override the default).
> Note that without the setting of the default value for property {{dep}} in project b, the build fails with any version of Maven.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)