modulepath layout and version number in output directories

Sahoo sanjeeb.sahoo at oracle.com
Wed Mar 21 22:33:46 PDT 2012


Hope to see some response from relevant developers...

On Monday 19 March 2012 09:35 AM, Sahoo wrote:
> According to [1], for an input source structure like:
> src/m1/module-info.jar #let's say m1's version is 1.0 in module-info.java
> src/m1/...
> src/m2/module-info.java #let's m2's version is 2.0 in module-info.java
> src/m2/...
>
> javac -d modules -modulepath modules `find src -name "*.java"` 
> produces following output directory structure:
>
> modules/m1/module-info.class
> modules/m1/...
> modules/m2/module-info.class
> modules/m2/...
>
> Since every module has always got a version (if not explictly 
> specified, there is always a default version), is there not a benefit 
> in encoding the version number in output directory structure? e.g., 
> how about the output directory structure looking like:
> modules/m1/1.0/module-info.class
> modules/m1/1.0/...
> modules/m2/2.0/module-info.class
> modules/m2/2.0/...
>
> The example in [1] that uses multiple module versions recommends 
> encoding version number in src directory structure (e.g., src/m1-1.0, 
> src/m2-2.0, etc), but I am not so sure how practical it is. How often 
> do we find version number encoded in svn or hg or cvs directory name?
>
> Thanks,
> Sahoo
>
> [1] http://openjdk.java.net/projects/jigsaw/doc/ModulesAndJavac.pdf




More information about the jigsaw-dev mailing list