Maven
  1. Maven
  2. MNG-2293

maven-plugin-descriptor: Not possible to define a default implementation for a field defined by its interface

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: Sites & Reporting
    • Labels:
      None

      Description

      MOJO-393 is about letting the user define an alternate configuration element, thus changing the way the webstart plugin works.

      For that the idea was to make the mojo field an interface, provide a default implementation in the plugin and let the user use plexus to instanciate a new implemenation.

      so for most users we would have:

      <configuration>
        <bla>
        </bla>
      </configuration>

      and for some:

      <configuration>
        <bla implementation="com....bla">
        </bla>
      </configuration>

      Unfortunately, today I am forced to specify the implementation in both cases. There's no way to inform the plugin to use the default implementation.

      The plugin.xml contains:

              <parameter>
                <name>bla</name>
                <type>...BlaInterface</type> <!-- that will fail -->
                 ...
              </parameter>

      I tried to use

       /**@parameter implementation="...BlaImplementation"*/
       BlaInterface bla;

      but that fails as well.

      Marking critical because it doesn't allow me add new features to the plugin without breaking the config.xml.

      1. dependency-mistery.log
        12 kB
        Jerome Lacoste
      2. it0106.tar.bz2
        2 kB
        Jerome Lacoste
      3. MNG-2293.diff
        20 kB
        Jerome Lacoste
      4. MNG-2293.diff
        27 kB
        Jerome Lacoste
      5. MNG-2293-plugins.diff
        1.0 kB
        Jerome Lacoste
      6. patch-MNG-2293.diff
        6 kB
        Jerome Lacoste
      7. patch-MNG-2293-source2.tar.bz2
        0.7 kB
        Jerome Lacoste

        Activity

        Jerome Lacoste created issue -
        Jerome Lacoste made changes -
        Field Original Value New Value
        Link This issue is depended upon by MOJO-393 [ MOJO-393 ]
        Jerome Lacoste made changes -
        Link This issue depends upon PLX-219 [ PLX-219 ]
        Jerome Lacoste made changes -
        Attachment patch-MNG-2293.diff [ 20560 ]
        Attachment it0106.tar.bz2 [ 20562 ]
        Attachment patch-MNG-2293-source2.tar.bz2 [ 20561 ]
        kenneyw made changes -
        Attachment testcase.diff [ 20555 ]
        Jerome Lacoste made changes -
        Attachment dependency-mistery.log [ 20929 ]
        Attachment MNG-2293.diff [ 20928 ]
        Attachment MNG-2293-plugins.diff [ 20930 ]
        Jerome Lacoste made changes -
        Link This issue depends upon MNG-2352 [ MNG-2352 ]
        Jerome Lacoste made changes -
        Attachment MNG-2293.diff [ 20969 ]
        kenneyw made changes -
        Fix Version/s 2.1 [ 11704 ]
        Resolution Fixed [ 1 ]
        Assignee Kenney Westerhof [ kenneyw ]
        Status Open [ 1 ] Closed [ 6 ]
        Jerome Lacoste made changes -
        Link This issue depends upon MNG-2352 [ MNG-2352 ]
        kenneyw made changes -
        Fix Version/s 2.0.5 [ 12294 ]
        Brett Porter made changes -
        Fix Version/s 2.1-alpha-1 [ 13143 ]
        Fix Version/s 2.0.5 [ 12294 ]
        Fix Version/s 2.0-alpha-1 [ 11002 ]
        Brett Porter made changes -
        Component/s Plugin Creation Tools [ 11382 ]
        Component/s Sites & Reporting [ 12030 ]
        Benjamin Bentmann made changes -
        Fix Version/s 2.0.5 [ 12294 ]
        Fix Version/s 3.0-alpha-1 [ 13143 ]
        Hervé Boutemy made changes -
        Description MOJO-393 is about letting the user define an alternate configuration element, thus changing the way the webstart plugin works.

        For that the idea was to make the mojo field an interface, provide a default implementation in the plugin and let the user use plexus to instanciate a new implemenation.

        so for most users we would have:
        <configuration>
          <bla>
          </bla>
        </configuration>

        and for some:

        <configuration>
          <bla implementation="com....bla">
          </bla>
        </configuration>

        Unfortunately, today I am forced to specify the implementation in both cases. There's no way to inform the plugin to use the default implementation.

        The plugin.xml contains:

                <parameter>
                  <name>bla</name>
                  <type>...BlaInterface</type> <!-- that will fail -->
                   ...
                </parameter>

        I tried to use

         /**@parameter implementation="...BlaImplementation"*/
         BlaInterface bla;

        but that fails as well.

        Marking critical because it doesn't allow me add new features to the plugin without breaking the config.xml.
        MOJO-393 is about letting the user define an alternate configuration element, thus changing the way the webstart plugin works.

        For that the idea was to make the mojo field an interface, provide a default implementation in the plugin and let the user use plexus to instanciate a new implemenation.

        so for most users we would have:
        {code:xml}<configuration>
          <bla>
          </bla>
        </configuration>{code}

        and for some:

        {code:xml}<configuration>
          <bla implementation="com....bla">
          </bla>
        </configuration>{code}

        Unfortunately, today I am forced to specify the implementation in both cases. There's no way to inform the plugin to use the default implementation.

        The plugin.xml contains:

        {code:xml} <parameter>
                  <name>bla</name>
                  <type>...BlaInterface</type> <!-- that will fail -->
                   ...
                </parameter>{code}

        I tried to use

        {code:java} /**@parameter implementation="...BlaImplementation"*/
         BlaInterface bla;{code}

        but that fails as well.

        Marking critical because it doesn't allow me add new features to the plugin without breaking the config.xml.
        Mark Thomas made changes -
        Project Import Sun Apr 05 08:49:45 UTC 2015 [ 1428223785911 ]
        Mark Thomas made changes -
        Workflow jira [ 12712930 ] Default workflow, editable Closed status [ 12752809 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 21:45:26 UTC 2015 [ 1428270326204 ]
        Mark Thomas made changes -
        Workflow jira [ 12949972 ] Default workflow, editable Closed status [ 12986193 ]

          People

          • Assignee:
            kenneyw
            Reporter:
            Jerome Lacoste
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development