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

Uninterpolated expressions should cause an error for dependency versions

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1, 3.0-alpha-2
    • Fix Version/s: 3.0-alpha-3
    • Component/s: Dependencies
    • Labels:
      None

      Description

      I declared a dependency as such:

      <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
          <version>${slf4j.version}</version>
      </dependency>

      But did not define the slf4j.version property. Obviously ${...} is an expression and if the expression is not resolved, why allow it? Here was the output:

       Downloading: http://repo1.maven.org/maven2/org/slf4j/slf4j-api/${slf4j.version}/slf4j-api-${slf4j.version}.pom

      In terms of usability, an obvious expression should be interpolated. If it cannot, it should be a runtime error.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bentmann Benjamin Bentmann
                Reporter:
                pbenedict Paul Benedict
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: