Convert to Modular JAR was: Publish and fetch a modular jar to a repository
Sean Mullan
sean.mullan at oracle.com
Tue Jul 17 05:12:49 PDT 2012
On 7/17/12 5:16 AM, Paul Sandoz wrote:
> Hi,
>
> On Jul 17, 2012, at 10:17 AM, Jaroslav Tulach wrote:
>
>> Dne Po 16. července 2012 18:42:16, Alan Bateman napsal(a):
>>> On 16/07/2012 17:21, Paul Sandoz wrote:
>>>> OK, converted to upper case. I have no strong preference on the style,
>>>>
>> just wanna be consistent, like with code formatting (but wanna automate
>> that bit):
>>>> http://cr.openjdk.java.net/~psandoz/jigsaw/repo-add-jar/webrev.3/
>>>
>>> Thanks looks fine to me.
>>
>> Hello Paul, my comment may not be related to this particular webrev, but I
>> think it is good time to remind that we plan to base the NetBeans IDE
>> support for Jigsaw on modular JAR files and we need a way to convert any
>> module to modular JAR format.
>>
>> There is method
>>
>> public abstract InputStream fetch(ModuleId mid);
>>
>> in the Repository class. Should not it be
>>
>> public abstract InputStream fetch(ModuleId mid, ModuleType format);
>>
>> so we can request any module in modular JAR format?
>
> I did think about transformation but I opted for an initial solution of what
> you publish is what you get. So it would currently be up to the client to do
> such a transformation, using a Jigsaw API, TBD as i don't think it exists,
> but we can easily add an option to jmod and the API, at least that will move
> in the right direction.
>
> If transformation is performed by the repository then we need to think
> carefully about what to do if the original published content is signed.
Are you talking about being able to extract modules from the library as a
modular JAR? If the module is signed, you have a bit of a problem. In order to
create a signed modular JAR you would have to re-sign the JAR and this is not
possible without having access to the private key, which isn't stored in the
library. However, if the primary use case is for NetBeans, I believe you may be
able to leverage the KeyStore you use to create signed JARs and use that
(probably with some configuration involved to choose the right key).
--Sean
>
> Maybe extraction of class files/resources is the right way to think about
> this? since there could be information loss when transforming from jmod to
> jar.
>
More information about the jigsaw-dev
mailing list