Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-3423

pom elements should be in the recommended order

    XMLWordPrintable

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Reorder the elements of this pom to match the recommended order.
    • Highlighting:
      Hide

      "project" part of <project> tag

      Show
      "project" part of <project> tag
    • Default Severity:
      Minor
    • Impact:
      Low
    • Likelihood:
      Low
    • Covered Languages:
      Java
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      10min
    • Analysis Scope:
      Main Sources

      Description

      The POM Code Convention is the Maven project's internal recommendation for POM element ordering. It calls for listing modifiers in the following order:

      1. <modelVersion/>
      2. <parent/>
      3. <groupId/>
      4. <artifactId/>
      5. <version/>
      6. <packaging/>
      7. <name/>
      8. <description/>
      9. <url/>
      10. <inceptionYear/>
      11. <organization/>
      12. <licenses/>
      13. <developers/>
      14. <contributors/>
      15. <mailingLists/>
      16. <prerequisites/>
      17. <modules/>
      18. <scm/>
      19. <issueManagement/>
      20. <ciManagement/>
      21. <distributionManagement/>
      22. <properties/>
      23. <dependencyManagement/>
      24. <dependencies/>
      25. <repositories/>
      26. <pluginRepositories/>
      27. <build/>
      28. <reporting/>
      29. <profiles/>

      Not following this convention has no technical impact, but will reduce the pom's readability because most developers are used to the standard order.

      See

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ann.campbell.2 Ann Campbell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: