Op Mon, 04 Jan 2016 00:28:24 +0100 schreef Igor Fedorenko <i...@ifedorenko.com>:

Good you agreed we don't need to add modulepath to MavenProject :-)

I see few ways forward with java 9 module system support in maven

* Convince jep authors to provide a mechanism to specify modulepath in a
way that does not require specific file/directory naming convention. I
only had very cursory look at the jsr, so can't suggest anything more
specific at this point, but I think this approach will be the best fit
for maven and m2e/eclipse usecases.

That would be nice, but I think it has to do with source mixtures. They probably don't want to force a module-info , but need a way to decide the name of the module. This way it becomes an auto-module which exports everything and requires all available modules. If this is indeed the reason, I think they've been too sweet. IMHO if you have source AND want it to be a module, just add that module-info.


* use symbolic and/or hard links to "assemble" per-project modulepath
directory structure. This should have virtually zero cpu and i/o
overhead, and unless I misunderstand jsr proposal, should work with the
current proposed apis and tools. Much more expensive variation of this
approach is to use filesystem copy to create per-project modulepath
directory structure.

I had this idea as well. I know this has always been tricky with Windows, but let's see if this has been improved.


* require project build output and testOutput directories follow
modulepath naming convention. this is my least favourite approach
because I think it makes module system support too invasive. we can
probably make it almost invisible to the enduser with some clever
super-pom profile, so it may be not so bad.



Even though I agree, this is probably the easiest to implement. For that reason I'll add it just to get the experience with the whole module system. Just like the copying of the jars, which is by now the most solid solution, but I will remove it once the modulepath allows explicit references to jars.

thanks for these helpful comments!
Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to