You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Giovanni van der Schelde (Jira)" <ji...@apache.org> on 2021/12/13 12:48:00 UTC

[jira] [Commented] (MNG-7244) Change from deprecated WARNING to FAIL the build for usage of pom.X placeholders

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

Giovanni van der Schelde commented on MNG-7244:
-----------------------------------------------

I'm currently working on this and I found that the user is shown a deprecation warning in two cases.

1. As described in the issue when the prefix is used, for example, {{{}$\{pom.version{}}}}.
2. But also when no prefix is used, for example, {{{}$\{version{}}}}.

Do we want the build to fail in the second case as well?
{noformat}
$ mvn validate
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.maven.its.mng7244:deprecated-pom-placeholders:jar:1.0
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------< org.apache.maven.its.mng7244:deprecated-pom-placeholders >------
[INFO] Building deprecated-pom-placeholders 1.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.138 s
[INFO] Finished at: 2021-12-13T13:30:58+01:00
{noformat}

> Change from deprecated WARNING to FAIL the build for usage of pom.X placeholders
> --------------------------------------------------------------------------------
>
>                 Key: MNG-7244
>                 URL: https://issues.apache.org/jira/browse/MNG-7244
>             Project: Maven
>          Issue Type: Improvement
>    Affects Versions: 4.0.0-alpha-1
>            Reporter: Karl Heinz Marbaise
>            Assignee: Maarten Mulders
>            Priority: Minor
>             Fix For: 4.0.x-candidate
>
>
> Currently we produce a {{WARNING}} in case of using {{pom.version}} or alike.
> I would suggest to change {{WARNING}} into a failing build in such use cases.
> {code}
> [WARNING] 
> [WARNING] Some problems were encountered while building the effective model for 'com.soebes.examples.j2ee:appasm:pom:1.0-SNAPSHOT'
> [WARNING] The expression ${pom.version} is deprecated. Please use ${project.version} instead. 
> {code}
> WDYT?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)