Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3788

specVersion incorrectly determined, depends on class order

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: maven-scr-plugin-1.8.0, scr ant task 1.2.0, scr generator 1.2.0
    • Component/s: SCR Tooling
    • Labels:
      None
    • Environment:
      Linux 3.5.0-18-generic (Ubuntu 12.10) x64, Oracle Java 1.6.0_31, Apache Maven 3.0.4 (r1232337)

      Description

      When running the generate-scr-scrdescriptor goal the scr-plugin will not properly detect what specVersion to use. I have not explicitly specified the specVersion to use (either in pom.xml or in the @Component annotation) and yet it tries to use version 1.1, because the first class that it finds is compatible with it. However, the next classes use 1.2 features (e.g. ReferencePolicyOption.GREEDY), so the build fails.

      This becomes quite the heisenbug when the build works for some users (e.g. Jenkins), but doesn't for others, because the order in which it processes classes is different.

        Attachments

          Activity

            People

            • Assignee:
              cziegeler Carsten Ziegeler
              Reporter:
              foghina Felix Oghină
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: