Convert to Modular JAR

Jaroslav Tulach jaroslav.tulach at oracle.com
Wed Jul 18 07:44:18 PDT 2012


Hello Paul,
right, I have not thought about signed modules. The IDE does not need signed 
modules for its internal purposes. That is why it is always OK to export into 
unsigned JAR files.

I've also give second thought to the idea of repository. Now I think the 
repository should primarily be about listing its content and downloading it to 
local library[1]. If you want to encourage 3rd party implementations of 
repositories, it does not make sense to put additional requirements on the 
implementors. Thus the conversion logic might be too complex to be part of a 
repository.

If the conversion is not part of a repository, then it probably belongs to a 
library (right)? In such case the IDE could always create a library and load 
necessary modules into it and then do the conversion. 

-jt

[1] I hope I am not confusing the repository/library terms again.

Dne Út 17. července 2012 11:16:06, Paul Sandoz napsal(a):
> 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.
> 
> 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