Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5297

Site should tell 'prerequisites.maven is deprecated'

    Details

      Description

      MNG-4840 said 'enforcement of the build environment is left to the Maven Enforcer Plugin'.
      http://jira.codehaus.org/browse/MNG-4840?focusedCommentId=253900&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-253900

      But currently, there is no 'deprecated' mark at Maven site.
      http://maven.apache.org/ref/3.0.4/maven-model/maven.html#prerequisites

      I think site should has 'deprecated' mark like 'reports' element.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user josephw opened a pull request:

          https://github.com/apache/maven/pull/51

          MNG-5297: Mark <prerequisites> as deprecated.

          MNG-4840 indicates that the Enforcer plugin should be
          preferred to <prerequisites>. Indicate that in the documentation.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/josephw/maven MNG-5297-mark-prerequisites-maven-as-deprecated

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/maven/pull/51.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #51


          commit c307e4ec0cb9997b20fc4aa67eefa836986fc484
          Author: Joseph Walton <joe@kafsemo.org>
          Date: 2015-06-11T15:32:38Z

          MNG-5297: Mark <prerequisites> as deprecated.

          MNG-4840 indicates that the Enforcer plugin should be
          preferred to <prerequisites>. Indicate that in the documentation.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user josephw opened a pull request: https://github.com/apache/maven/pull/51 MNG-5297 : Mark <prerequisites> as deprecated. MNG-4840 indicates that the Enforcer plugin should be preferred to <prerequisites>. Indicate that in the documentation. You can merge this pull request into a Git repository by running: $ git pull https://github.com/josephw/maven MNG-5297 -mark-prerequisites-maven-as-deprecated Alternatively you can review and apply these changes as the patch at: https://github.com/apache/maven/pull/51.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #51 commit c307e4ec0cb9997b20fc4aa67eefa836986fc484 Author: Joseph Walton <joe@kafsemo.org> Date: 2015-06-11T15:32:38Z MNG-5297 : Mark <prerequisites> as deprecated. MNG-4840 indicates that the Enforcer plugin should be preferred to <prerequisites>. Indicate that in the documentation.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user kwin commented on a diff in the pull request:

          https://github.com/apache/maven/pull/51#discussion_r32460741

          — Diff: maven-model/src/main/mdo/maven.mdo —
          @@ -3459,6 +3459,7 @@
          <type>String</type>
          <defaultValue>2.0</defaultValue>
          <description><![CDATA[
          + <b>Deprecated</b>. Use the Maven Enforcer Plugin's <a href="https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html"><code>requireMavenVersion</code></a> rule instead.<br>
          — End diff –

          This <prerequisites> is still supported for Maven Plugins (https://issues.apache.org/jira/browse/MNG-5501?focusedCommentId=14419813&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14419813), therefore rather than deprecating that I would add a hint, that this should only be used for packaging "plugin".

          Show
          githubbot ASF GitHub Bot added a comment - Github user kwin commented on a diff in the pull request: https://github.com/apache/maven/pull/51#discussion_r32460741 — Diff: maven-model/src/main/mdo/maven.mdo — @@ -3459,6 +3459,7 @@ <type>String</type> <defaultValue>2.0</defaultValue> <description><![CDATA[ + <b>Deprecated</b>. Use the Maven Enforcer Plugin's <a href="https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html"><code>requireMavenVersion</code></a> rule instead.<br> — End diff – This <prerequisites> is still supported for Maven Plugins ( https://issues.apache.org/jira/browse/MNG-5501?focusedCommentId=14419813&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14419813 ), therefore rather than deprecating that I would add a hint, that this should only be used for packaging "plugin".
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user mosabua commented on the pull request:

          https://github.com/apache/maven/pull/51#issuecomment-112198560

          Enforcer plugin is for build time enforcement. Prerequisite is build time as well as plugin runtime requirement. As such it should not be deprecated. Documentation update would however be useful.

          Show
          githubbot ASF GitHub Bot added a comment - Github user mosabua commented on the pull request: https://github.com/apache/maven/pull/51#issuecomment-112198560 Enforcer plugin is for build time enforcement. Prerequisite is build time as well as plugin runtime requirement. As such it should not be deprecated. Documentation update would however be useful.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user josephw commented on the pull request:

          https://github.com/apache/maven/pull/51#issuecomment-112843851

          @kwin , @mosabua: thanks. I've rewritten it to reflect that distinction, that it's only deprecated for compile-time enforcement.

          Show
          githubbot ASF GitHub Bot added a comment - Github user josephw commented on the pull request: https://github.com/apache/maven/pull/51#issuecomment-112843851 @kwin , @mosabua: thanks. I've rewritten it to reflect that distinction, that it's only deprecated for compile-time enforcement.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user josephw commented on the pull request:

          https://github.com/apache/maven/pull/51#issuecomment-138286028

          @kwin, @mosabua - is this current form acceptable as a fix?

          Show
          githubbot ASF GitHub Bot added a comment - Github user josephw commented on the pull request: https://github.com/apache/maven/pull/51#issuecomment-138286028 @kwin, @mosabua - is this current form acceptable as a fix?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jvanzyl commented on the pull request:

          https://github.com/apache/maven/pull/51#issuecomment-138295450

          No. The enforcer plugin is for build-time enforcement. The <prerequisite/> element is for runtime enforcement. We certainly don't want to have to inspect the any plugin configuration elements to help Maven know that the current environment won't run the plugin. Also, if we ever get around to having the build vs consumption POM this information would not be available at all.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/51#issuecomment-138295450 No. The enforcer plugin is for build-time enforcement. The <prerequisite/> element is for runtime enforcement. We certainly don't want to have to inspect the any plugin configuration elements to help Maven know that the current environment won't run the plugin. Also, if we ever get around to having the build vs consumption POM this information would not be available at all.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user josephw commented on the pull request:

          https://github.com/apache/maven/pull/51#issuecomment-138297080

          @jvanzyl although the original change was unconditional deprecation, I changed it after comments so the current language in the patch is intended to reflect that distinction:

          > For a plugin project, the minimum version of Maven required to use
          the resulting plugin.
          > For specifying the minimum version of Maven required to build a project, this element is <b>deprecated</b>.

          My intention here is to make clear that it's deprecated for some purposes.

          Show
          githubbot ASF GitHub Bot added a comment - Github user josephw commented on the pull request: https://github.com/apache/maven/pull/51#issuecomment-138297080 @jvanzyl although the original change was unconditional deprecation, I changed it after comments so the current language in the patch is intended to reflect that distinction: > For a plugin project, the minimum version of Maven required to use the resulting plugin. > For specifying the minimum version of Maven required to build a project, this element is <b>deprecated</b>. My intention here is to make clear that it's deprecated for some purposes.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jvanzyl commented on the pull request:

          https://github.com/apache/maven/pull/51#issuecomment-138297887

          I'm reasonably sure it's never been used for build-time enforcement. Anything to make it clear that the enforcer is for build-time and the prerequisite element is for runtime is good.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/51#issuecomment-138297887 I'm reasonably sure it's never been used for build-time enforcement. Anything to make it clear that the enforcer is for build-time and the prerequisite element is for runtime is good.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user josephw commented on the pull request:

          https://github.com/apache/maven/pull/51#issuecomment-138302328

          Even if it wasn't the intended use, way back in Maven 2:

          <prerequisites>
          <maven>4</maven>
          </prerequisites>

          would give:

          $ mvn2 validate
          [INFO] Scanning for projects...
          [INFO] ------------------------------------------------------------------------
          [ERROR] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Unable to build project '/tmp/pom.xml; it requires Maven version 4

          The current language in the documentation is still:

          The minimum version of Maven required to build the project.

          so I think this PR clarifies the current intent.

          Show
          githubbot ASF GitHub Bot added a comment - Github user josephw commented on the pull request: https://github.com/apache/maven/pull/51#issuecomment-138302328 Even if it wasn't the intended use, way back in Maven 2: <prerequisites> <maven>4</maven> </prerequisites> would give: $ mvn2 validate [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Unable to build project '/tmp/pom.xml; it requires Maven version 4 The current language in the documentation is still: The minimum version of Maven required to build the project. so I think this PR clarifies the current intent.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jvanzyl commented on the pull request:

          https://github.com/apache/maven/pull/51#issuecomment-138307685

          Fair enough, I cannot remember that far back

          Show
          githubbot ASF GitHub Bot added a comment - Github user jvanzyl commented on the pull request: https://github.com/apache/maven/pull/51#issuecomment-138307685 Fair enough, I cannot remember that far back
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/maven/pull/51

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/maven/pull/51
          Hide
          hudson Hudson added a comment -

          ABORTED: Integrated in maven-3.x #1113 (See https://builds.apache.org/job/maven-3.x/1113/)
          MNG-5297: Mark <prerequisites> as deprecated for compile-time enforcement. (jason: rev a839e55e7e5e057be2dafbd9eb1ebfb82d7598ed)

          • pom.xml
          • maven-model/src/main/mdo/maven.mdo
          Show
          hudson Hudson added a comment - ABORTED: Integrated in maven-3.x #1113 (See https://builds.apache.org/job/maven-3.x/1113/ ) MNG-5297 : Mark <prerequisites> as deprecated for compile-time enforcement. (jason: rev a839e55e7e5e057be2dafbd9eb1ebfb82d7598ed) pom.xml maven-model/src/main/mdo/maven.mdo
          Hide
          hboutemy Hervé Boutemy added a comment -

          fixed model comment in 37c3f57f which caused site generation failure

          Show
          hboutemy Hervé Boutemy added a comment - fixed model comment in 37c3f57f which caused site generation failure
          Show
          khmarbaise Karl Heinz Marbaise added a comment - Fixed in a839e55e7e5e057be2dafbd9eb1ebfb82d7598ed
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build maven-3.x #1374 (See https://builds.apache.org/job/maven-3.x/1374/)
          MNG-5297 improved explanations on prerequisites.maven in Maven 3 (hboutemy: rev 950a90ececca385f60c336814fb8a48c3b42bb54)

          • (edit) maven-model/src/main/mdo/maven.mdo
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-3.x #1374 (See https://builds.apache.org/job/maven-3.x/1374/ ) MNG-5297 improved explanations on prerequisites.maven in Maven 3 (hboutemy: rev 950a90ececca385f60c336814fb8a48c3b42bb54) (edit) maven-model/src/main/mdo/maven.mdo
          Hide
          michael-o Michael Osipov added a comment -

          950a90ececca385f60c336814fb8a48c3b42bb54 is missing on post-reset-master.

          Show
          michael-o Michael Osipov added a comment - 950a90ececca385f60c336814fb8a48c3b42bb54 is missing on post-reset-master .
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Jenkins build maven-3.x #1545 (See https://builds.apache.org/job/maven-3.x/1545/)
          MNG-5297 improved explanations on prerequisites.maven in Maven 3 (hboutemy: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=19d5b9dfa108a94c0825215a013ac21253cb0a17)

          • (edit) maven-model/src/main/mdo/maven.mdo
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Jenkins build maven-3.x #1545 (See https://builds.apache.org/job/maven-3.x/1545/ ) MNG-5297 improved explanations on prerequisites.maven in Maven 3 (hboutemy: http://git-wip-us.apache.org/repos/asf/?p=maven.git&a=commit&h=19d5b9dfa108a94c0825215a013ac21253cb0a17 ) (edit) maven-model/src/main/mdo/maven.mdo

            People

            • Assignee:
              jvanzyl Jason van Zyl
              Reporter:
              eller86 Kengo TODA
            • Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development