[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-jigsaw-dev
Subject:    Extract to Modular JAR <was> Re: Convert to Modular JAR was: Publish and fetch a modular jar to a re
From:       paul.sandoz () oracle ! com (Paul Sandoz)
Date:       2012-07-17 14:06:55
Message-ID: 4E144307-0E79-4419-B2B3-26E2EA4842B1 () oracle ! com
[Download RAW message or body]

Hi

Baby steps:

1) create a class that extracts a modular jar from a jmod file. This is rather simple \
using Chris's ModuleFileParser.

2) add a command to jpkg to extract a modular jar from a jmod file

3) add a command to jmod to extract a modular jar from a module installed in a \
library.

4) add method Repository.fetchClasses
    The implementation can simple call fetch and hook up with 1) if the module type \
is jmod.

The latter is really an interim solution until this area is overhauled.

Paul.


On Jul 17, 2012, at 11: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. 
> 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. 
> -- 
> 
> A repository could offer an extraction service using the Jigsaw API, that works \
> appropriately with HTTP caching and local file caching e.g. if the URL to a module \
> is: 
> GET /repository/{mid}/module
> 
> The URL to the class data could be:
> 
> GET /repository/{mid}/module/classes
> 
> and there could be a method:
> 
> InputStream fetchClasses(ModuleId mid, String mediaType);
> 
> In general the mid location will be a container for multiple content (src docs etc) \
> so we need to work out how to identify that content, perhaps using link relations \
> (as tags) + media types for content negotiation. 
> Paul.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic