Whirr
  1. Whirr
  2. WHIRR-53

Adopt the standard Java SPI interface

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.0
    • Component/s: core
    • Labels:
      None

      Description

      The SPI implemented in WHIRR-47 makes it difficult to generate a executable JAR (for a CLI in WHIRR-33) since the whirr.properties files clobber each other. By implementing an SPI described in http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider (or http://java.sun.com/j2se/1.4.2/docs/guide/sound/programmer_guide/chapter13.html) we can use the Maven Shade plugin to produce an executable JAR which avoids this problem (see http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html).

        Issue Links

          Activity

          Tom White made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Tom White added a comment -

          I've just committed this.

          Show
          Tom White added a comment - I've just committed this.
          Hide
          Patrick Hunt added a comment -

          +1, this looks good to me if you want to commit.

          Show
          Patrick Hunt added a comment - +1, this looks good to me if you want to commit.
          Tom White made changes -
          Attachment WHIRR-53.patch [ 12448611 ]
          Hide
          Tom White added a comment -

          Here's an implementation. To use the ServiceLoader class I refactored Service (to give it a zero arg constructor). We may want to combine ClusterSpec and ServiceSpec now, but that could be done in a separate patch.

          Show
          Tom White added a comment - Here's an implementation. To use the ServiceLoader class I refactored Service (to give it a zero arg constructor). We may want to combine ClusterSpec and ServiceSpec now, but that could be done in a separate patch.
          Show
          Tom White added a comment - http://java.sun.com/javase/6/docs/api/java/util/ServiceLoader.html is the class to use.
          Tom White made changes -
          Field Original Value New Value
          Link This issue blocks WHIRR-33 [ WHIRR-33 ]
          Tom White created issue -

            People

            • Assignee:
              Tom White
              Reporter:
              Tom White
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development