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

should the MultiStartMojo.startArtifact require the "swarm" classifier to be configured manually?

    Details

    • Story Points:
      5

      Description

      The multistart goal of the Swarm Maven plugin (the MultiStartMojo class) can either run the start goal on a Maven submodule (the startProject method), if the multi-started artifacts are submodules of the given module, or start a Swarm uberjar of a dependency (the startArtifact method).

      So if I want to multi-start a couple of dependencies that are not my submodules, the 1st approach fails and the 2nd one is used. However, it expects that the swarm classifier is configured manually:

      <process>
        <artifactId>example-ribbon-frontend</artifactId>
        <classifier>swarm</classifier>
      </process>
      

      And that, in turn, requires the dependency on that artifact, to also specify the classifier:

      <dependency>
        <groupId>org.wildfly.swarm.examples</groupId>
        <artifactId>example-ribbon-frontend</artifactId>
        <version>${project.version}</version>
        <classifier>swarm</classifier>
      </dependency>
      

      Is that intentional? If yes, this should be documented and/or there should be a clear error message. Right now, if I don't configure the classifier, I only get

      no main manifest attribute, in /home/lthon/projects/swarm/examples/ribbon/frontend/target/example-ribbon-frontend.jar
      

      And it takes some time to realize that this isn't really a Swarm uberjar, and then I need to dig into the MultiStartMojo source code to realize that I can configure the classifier.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: