Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-858

additional fractions: unintuitive behavior if the fraction is not found

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2016.12.0
    • Component/s: plugins
    • Labels:
      None

      Description

      If I configure the Swarm Maven plugin to add an additional fraction, but make a mistake:

      <plugin>
        ...
        <configuration>
          <fractions><fraction>servlet</fraction></fractions>
        </configuration>
        ...
      </plugin>
      

      then the build fails with Invalid fraction spec: servlet. That's wrong, the fraction spec is perfectly valid, the problem is that no such fraction exist (because the fraction is looked up in the FractionList).

      If I write org.wildfly.swarm:servlet instead of just servlet, which is basically the same, the behavior is different: the build passes just fine, even if the fraction doesn't exist (because in this case, the fraction isn't looked up in the FractionList at all).

      This all happens in the FractionDescriptor.fromGav method.

      Two possible solutions:

      1. Check if given fraction exists in all cases.
      2. Never check if given fraction exists, use some heuristic to figure out the version number when creating the FractionDescriptor only from artifact ID.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lthon Ladislav Thon
                Reporter:
                lthon Ladislav Thon
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: