Maven
  1. Maven
  2. MNG-2782

Version property in dependencies is not expanded correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Dependencies
    • Labels:
      None

      Description

      The Spring poms, for example spring-beans, version 2.0.2 use the following dependencies:
      <dependency>
      <groupId>$

      {project.groupId}

      </groupId>
      <artifactId>spring-core</artifactId>
      <version>$

      {project.version}

      </version>
      </dependency>
      Which means, they are using variables in the poms. In some cases, these variables are resolved correctly, but in some cases however they are not, causing problems.

      Imho, it would be better to resolve variables for released poms to avoid any problems (or if variables are allowed, this is a maven bug then)

        Issue Links

          Activity

          Carsten Ziegeler created issue -
          Hide
          Carlos Sanchez added a comment -

          in what cases are not resolved correctly? it shouldn't be a problem

          Show
          Carlos Sanchez added a comment - in what cases are not resolved correctly? it shouldn't be a problem
          Hide
          Carsten Ziegeler added a comment -

          Yes, this works in standard scenarios. However, we have the situation in Apache Cocoon where during site generation the project version is resolved to 2.4.1 (I haven't found out where this version comes from).
          So we depend on spring-beans-2.0.2 which is resolved correctly and then Maven tries to get spring-core-2.4.1.

          Would a log with option -X perhaps help you? (It's rather long)

          Show
          Carsten Ziegeler added a comment - Yes, this works in standard scenarios. However, we have the situation in Apache Cocoon where during site generation the project version is resolved to 2.4.1 (I haven't found out where this version comes from). So we depend on spring-beans-2.0.2 which is resolved correctly and then Maven tries to get spring-core-2.4.1. Would a log with option -X perhaps help you? (It's rather long)
          Carlos Sanchez made changes -
          Field Original Value New Value
          Key MEV-490 MNG-2782
          Component/s Dependencies [ 12028 ]
          Workflow jira [ 66129 ] Maven New [ 66209 ]
          Complexity Intermediate
          Priority Major [ 3 ]
          Project Maven Evangelism [ 10940 ] Maven 2 [ 10500 ]
          Group ID org.springframework
          Component/s Invalid POM [ 11491 ]
          Version 2.0.x
          Hide
          Carlos Sanchez added a comment -

          yes, please provide an example as small as possible to see the incorrect behaviour

          Show
          Carlos Sanchez added a comment - yes, please provide an example as small as possible to see the incorrect behaviour
          Carlos Sanchez made changes -
          Summary Invalid or problematic Spring POMS Version property in dependencies is not expanded correctly
          Show
          Grzegorz Slowikowski added a comment - Look at this: http://jira.codehaus.org/browse/MNG-2653#action_79317
          Hide
          Carsten Ziegeler added a comment -

          Thanks for the link, Grzegorz. This sounds exactly like the problem we are experiencing.
          So I think we can close this bug here.

          Show
          Carsten Ziegeler added a comment - Thanks for the link, Grzegorz. This sounds exactly like the problem we are experiencing. So I think we can close this bug here.
          Jason Dillon made changes -
          Link This issue is related to MNG-2796 [ MNG-2796 ]
          Jason van Zyl made changes -
          Fix Version/s Reviewed [ 13555 ]
          kenneyw made changes -
          Link This issue duplicates MNG-2339 [ MNG-2339 ]
          kenneyw made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Duplicate [ 3 ]
          Brett Porter made changes -
          Fix Version/s Reviewed Pending Version Assignment [ 13555 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
          Mark Thomas made changes -
          Workflow jira [ 12713318 ] Default workflow, editable Closed status [ 12753095 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
          Mark Thomas made changes -
          Workflow jira [ 12950198 ] Default workflow, editable Closed status [ 12986417 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          150d 23h 41m 1 kenneyw 16/Jun/07 03:59

            People

            • Assignee:
              Unassigned
              Reporter:
              Carsten Ziegeler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development