maven - Java - modular library project - how to? -



maven - Java - modular library project - how to? -

i supposed deliver sdk in java company work for. have few years of java ee experience not much when comes develop api , sdk.

the problem here, sdk available in .net c# , working fine. made myself. switching java nightmare. tried several solutions. failed, inconclusive due fact not progress.

as title says, need develop java library has modules. internal modules. modules world out there not supposed see / utilize / modify.

in c#, it's easy pie : create modules respective namespace, create classes , methods privates, expose 1 or more wrappers (bridges) entire assembly (project) internal "main module", through it's own public wrapper accessible world, can utilize tools provided within these internals modules.

the keyword, here, internal. think it's pretty easy understand. let's take example. let's sdk consisting of 4 modules.

the 1st module, main module, 1 public , exposed whole world. in other words, unique entry point of sdk. it's master of own universe. can utilize internal modules @ will, never show them world. never. the 2nd module network-related. in, deals network manage connexions remote services, read , write info , stream. offers own little wrapper main module not need utilize 2nd module internal tools. universe within universe. the 3rd module info processing module. receives packets (hand-made 2nd module) can processed , relevant info dealt with.

so here are. how can in java using netbeans ?

i tried maven pom project, , netbeans modules. nightmare.

i tried creating multiple libraries (one per module), tweaked main module library include (modules) dependancies not work. in standard java ee console application, effort instanciate sdk manager (ergo main wrapper main module), fails because class not found exception : not find classes related internal sub-modules. if add together modules respective jar java console app, can access wrappers. fun in ?

thanks help !

project jigsaw give want when java 9 comes out.

see article how jigsaw works, in particular,

an exports clause in module declaration makes public types in bundle names available other modules, can jigsaw defines boundaries, , not public types used other modules, must explicitly specify types visible.

java maven netbeans module sdk

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -