You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2011/09/16 14:46:17 UTC

[jira] Issue Comment Edited: (MJARSIGNER-19) Make mojo code reusable from another mojo + customize the working directory.

    [ https://jira.codehaus.org/browse/MJARSIGNER-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279174#comment-279174 ] 

Benjamin Bentmann edited comment on MJARSIGNER-19 at 9/16/11 7:44 AM:
----------------------------------------------------------------------

Look at the maven-filtering or maven-invoker components as examples of shared functionality.

As for the subclassing approach, see http://en.wikipedia.org/wiki/Composition_over_inheritance as a general hint. Maintenance of the JAR Signer Plugin should be possible without having to think about plugin A, B or whoever feels like reusing JAR signing. Maven plugins are not libraries with an API contract, their only purpose is to be invoked by Maven to handle a given use case during a user's build. For instance, your patch adds a new parameter to configure the working directory to the plugin which seems to have no real value in the context of the JAR signer plugin, i.e. pollutes the JAR signer plugin's user interface with external requirements.

      was (Author: bentmann):
    Look at the maven-filtering or maven-invoker components as examples of shared functionality.

As for the subclassing approach, see http://en.wikipedia.org/wiki/Composition_over_inheritance as a general hint. Maintenance of the JAR Signer Plugin should be possible to have to think about plugin A, B or whoever feels like reusing JAR signing. Maven plugins are not libraries with an API contract, their only purpose is to be invoked by Maven to handle a given use case during a user's build. For instance, your patch adds a new parameter to configure the working directory to the plugin which seems to have no real value in the context of the JAR signer plugin, i.e. pollutes the JAR signer plugin's user interface with external requirements.
  
> Make mojo code reusable from another mojo + customize the working directory.
> ----------------------------------------------------------------------------
>
>                 Key: MJARSIGNER-19
>                 URL: https://jira.codehaus.org/browse/MJARSIGNER-19
>             Project: Maven 2.x Jar Signer Plugin
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Tony Chemit
>            Priority: Trivial
>         Attachments: MJARSIGNER-19.patch
>
>
> In the webstart-maven-plugin We used the old jarsigner mojo (from the jar plugin).
> We'd like to use now this plugin as the mojo from the jar plugin is deprecated for this one (see MWEBSTART-149)
> Moreover, we want to use yet another working directory and at the moment in the mojo this is hardcoed to project.getBasedir().
> Here is a patch which fix our needs.
> Hope this patch will be apply soon, I would really like to use your mojo :)
> Thanks for your work.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira