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

Project URL should not be extended with artifactId when inherited

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Information Provided
    • None
    • None
    • None
    • None

    Description

      According to the POM reference, the "url" element is informational and a "nice gesture" to users (https://maven.apache.org/pom.html ):

      name: Projects tend to have conversational names, beyond the artifactId. The Sun engineers did not refer to their project as "java-1.5", but rather just called it "Tiger". Here is where to set that value.
      description: Description of a project is always good. Although this should not replace formal documentation, a quick comment to any readers of the POM is always helpful.
      url: The URL, like the name, is not required. This is a nice gesture for projects users, however, so that they know where the project lives.
      inceptionYear: This is another good documentation point. It will at least help you remember where you have spent the last few years of your life.

      However, Maven chooses to append the artifact ID when the "url" is inherited. IMHO that does not make any sense. In particular it does not make any sense to have to re-declare the project URL in every child module of a complex project which is usually inheriting from some project-specific top-level POM. It should be sufficient to declare the URL in the project's top-level POM and just have the children inherit it.

      An inheriting project can usually not be expected to "live" under "url/artifactId". If the project truly lives somewhere else, then the POM should explicitly overwrite the URL. Otherwise, it should IMHO be assumed that the project continues to live in the same place.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rec Richard Eckart de Castilho
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: