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

Throw validation error upon multiple repository declarations with the same id

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0-alpha-1
    • 3.0-alpha-3
    • POM
    • None

    Description

      Within the same POM, we should be more strict with regard to the uniqueness of identifiers. For instance

      <repositories>
        <repository>
          <id>one</id>
          <url>http://repo1.maven.org/maven2</url>
        </repository>
        <repository>
          <id>one</id>
          <url>http://repository.codehaus.org/</url>
        </repository>
      </repositories>
      

      is currently considered valid. However, this usually results from copy&paste errors and the missing uniqueness makes it unnecessary complicated to define Maven's behavior during inheritance or profile injection when we want to merge elements with the same id.

      Of course, this extended validation must only apply to local builds and not to the metadata retrieval.

      Attachments

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              bentmann Benjamin Bentmann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: