jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2.x JAR Plugin
  • MJAR-35

Abstraction for JarSignMojo so that webstart plugin can allow the user to choose how their jars are signed

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: 2.1
  • Component/s: None
  • Labels:
    None

Description

The webstart Maven 2 plugin signs jar files as part of its operation. At the moment, it relies upon JarSignMojo to do this.
While this is going to be correct 90% of the time, sometimes users (like myself!) need to ask the webstart plugin to sign jars in a different way.

Specifically, my company keeps its private key separate and provides an HTTP Post interface to allow me to submit jars for signing. I've got a Mojo to do this.

What I need is for the webstart plugin to use an abstraction defined in an interface called JarSignerMojo (attached to this issue) rather than JarSignMojo. That way, I can plug my own Mojo in to be used instead of JarSignMojo. Jerome Lacoste is doing the webstart plugin development and is happy to accommodate this change if we can get the interface added to the jar plugin project.

The only change to the existing code is that JarSignMojo's class declaration needs to be changed to:
public class JarSignMojo extends AbstractMojo implements JarSignerMojo

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Java Source File
    JarSignerMojo.java
    10/Mar/06 5:06 AM
    2 kB
    David Boden
  2. Hide
    Zip Archive
    lehmanjarsigner-1.0-src.zip
    13/Apr/06 4:22 AM
    7 kB
    David Boden
    1. XML File
      lehmanjarsigner-1.0/pom.xml 2 kB
    2. Java Source File
      lehmanjarsigner-1.0/.../LehmanJarSignerClient.java 3 kB
    3. Java Source File
      lehmanjarsigner-1.0/.../LehmanJarSignerClientException.java 0.2 kB
    4. Java Source File
      lehmanjarsigner-1.0/.../LehmanJarSignerMojo.java 2 kB
    5. Java Source File
      lehmanjarsigner-1.0/.../LehmanJarSignerTask.java 1 kB
    6. Java Source File
      lehmanjarsigner-1.0/.../JarSignerMojo.java 2 kB
    Download Zip
    Show
    Zip Archive
    lehmanjarsigner-1.0-src.zip
    13/Apr/06 4:22 AM
    7 kB
    David Boden
  3. File
    MJAR-35.diff
    13/Apr/06 12:19 AM
    3 kB
    Jerome Lacoste

Issue Links

is depended upon by

Improvement - An improvement or enhancement to an existing feature or task. MWEBSTART-88 HttpJarSignClient - New goal "httpsign" which will sign jar files by submitting them to a signing service via HTTP Post

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.
is superceded by

Improvement - An improvement or enhancement to an existing feature or task. MWEBSTART-18 Allow different pluggable jar signers to be used

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Jerome Lacoste added a comment - 10/Mar/06 5:42 AM

Please apply

Show
Jerome Lacoste added a comment - 10/Mar/06 5:42 AM Please apply
Hide
Permalink
Jerome Lacoste added a comment - 12/Apr/06 9:03 PM

Can this file be added and the one line change to JarSignMojo be made or should I write a patch for that?

David, do you think you could make your HttpPostJarSignMojo available?

Show
Jerome Lacoste added a comment - 12/Apr/06 9:03 PM Can this file be added and the one line change to JarSignMojo be made or should I write a patch for that? David, do you think you could make your HttpPostJarSignMojo available?
Hide
Permalink
Jerome Lacoste added a comment - 13/Apr/06 12:19 AM

Made a patch. Maybe it will be easier to apply it.

Show
Jerome Lacoste added a comment - 13/Apr/06 12:19 AM Made a patch. Maybe it will be easier to apply it.
Hide
Permalink
David Boden added a comment - 13/Apr/06 4:22 AM

Here's the source for the Mojo that I'm using. You can see that LehmanJarSignerMojo implements JarSignerMojo.

Important:
Please note that I've changed the method signature on the JarSignerMojo.execute() method to also allow the throwing of MojoFailureException. This brings it in line with AbstractMojo.execute(). Sorry for not getting this right first time!

If you think that this plugin (in a slightly more generic form) could be useful to other teams, then I'd be happy to tidy up the code as you see fit and submit it to the relevant project (perhaps the jar plugin project?).

Show
David Boden added a comment - 13/Apr/06 4:22 AM Here's the source for the Mojo that I'm using. You can see that LehmanJarSignerMojo implements JarSignerMojo. Important: Please note that I've changed the method signature on the JarSignerMojo.execute() method to also allow the throwing of MojoFailureException. This brings it in line with AbstractMojo.execute(). Sorry for not getting this right first time! If you think that this plugin (in a slightly more generic form) could be useful to other teams, then I'd be happy to tidy up the code as you see fit and submit it to the relevant project (perhaps the jar plugin project?).
Hide
Permalink
David Boden added a comment - 13/Apr/06 8:56 AM

Better diff and new file zip have been added to MJAR-37 . Ignore the attachments to this issue. Thanks!

Show
David Boden added a comment - 13/Apr/06 8:56 AM Better diff and new file zip have been added to MJAR-37 . Ignore the attachments to this issue. Thanks!
Hide
Permalink
John Casey added a comment - 17/Apr/06 10:54 AM

IMO, this issue needs to be reassigned to the webstart plugin in the MOJO project. I'll wait to move it, to see if there are reasons against.

To me, this sort of abstraction only serves the webstart plugin, and should be defined there in the form of an adapter. Later, when that framework has evolved, we can make it an independent project that other mojos can use.

Show
John Casey added a comment - 17/Apr/06 10:54 AM IMO, this issue needs to be reassigned to the webstart plugin in the MOJO project. I'll wait to move it, to see if there are reasons against. To me, this sort of abstraction only serves the webstart plugin, and should be defined there in the form of an adapter. Later, when that framework has evolved, we can make it an independent project that other mojos can use.
Hide
Permalink
Jerome Lacoste added a comment - 20/Apr/06 9:52 AM

OK thanks.

Show
Jerome Lacoste added a comment - 20/Apr/06 9:52 AM OK thanks.
Hide
Permalink
Jerome Lacoste added a comment - 15/May/06 3:22 AM

We decided to solve this in the webstart plugin (MOJO-393), then maybe move this to the jar sign mojo later on.

Show
Jerome Lacoste added a comment - 15/May/06 3:22 AM We decided to solve this in the webstart plugin (MOJO-393), then maybe move this to the jar sign mojo later on.
Hide
Permalink
Jerome Lacoste added a comment - 22/Jun/06 6:12 PM

Please close that one. Issue was moved to Webstart mojo.

Show
Jerome Lacoste added a comment - 22/Jun/06 6:12 PM Please close that one. Issue was moved to Webstart mojo.
Hide
Permalink
Brett Porter added a comment - 22/Jun/06 7:24 PM

moved to MOJO, as I understand it

Show
Brett Porter added a comment - 22/Jun/06 7:24 PM moved to MOJO, as I understand it

People

  • Assignee:
    Brett Porter
    Reporter:
    David Boden
Vote (3)
Watch (1)

Dates

  • Created:
    10/Mar/06 5:06 AM
    Updated:
    22/Aug/06 7:51 AM
    Resolved:
    22/Jun/06 7:24 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.