JkImlGenerator { public String generate() { try { return _generate(); } catch (final Exception e) { throw JkUtilsThrowable.unchecked(e); } } private  JkImlGenerator(JkJavaIdeSupport ideSupport); static JkImlGenerator of(JkJavaIdeSupport ideSupport); String generate(); JkImlGenerator setImportedTestModules(Iterable<String> importedTestModules); JkImlGenerator setForceJdkVersion(boolean forceJdkVersion); JkImlGenerator setUseVarPath(boolean useVarPath); JkImlGenerator setFailOnDepsResolutionError(boolean fail); JkImlGenerator setDefDependencyResolver(JkDependencyResolver defDependencyResolver); JkImlGenerator setDefDependencies(JkDependencySet defDependencies); JkImlGenerator setWriter(XMLStreamWriter writer);  }
@Test public void generate() throws Exception { final Path top = unzipToDir("sample-multi-scriptless.zip"); final Path base = top.resolve("base"); final JkJavaProject baseProject = JkJavaProject.of() .apply(this::configureCompileLayout) .apply(this::configureEmptyTestCompileLayout) .setBaseDir(base) .getJarProduction() .getDependencyManagement() .addDependencies(JkDependencySet.of() .and(JkPopularModules.APACHE_HTTP_CLIENT, "4.5.6")).__.__; final JkImlGenerator baseGenerator = JkImlGenerator.of(baseProject.getJavaIdeSupport()); final String result0 = baseGenerator.generate(); System.out.println("\nbase .classpath"); System.out.println(result0); final Path core = top.resolve("core"); final JkJavaProject coreProject = JkJavaProject.of() .apply(this::configureCompileLayout) .setBaseDir(core) .getJarProduction() .getDependencyManagement() .addDependencies(JkDependencySet.of().and(baseProject.toDependency())).__ .getTesting() .getCompilation() .getLayout() .emptySources().addSource("test") .emptyResources().addResource("res-test").__.__ .getTestProcessor() .setForkingProcess(true).__.__.__; final JkImlGenerator coreGenerator = JkImlGenerator.of(coreProject.getJavaIdeSupport()); final String result1 = coreGenerator.generate(); System.out.println("\ncore .classpath"); System.out.println(result1); final Path desktop = top.resolve("desktop"); final JkJavaProject desktopProject = JkJavaProject.of() .apply(this::configureCompileLayout) .apply(this::configureEmptyTestCompileLayout) .setBaseDir(desktop) .getJarProduction() .getDependencyManagement() .addDependencies(JkDependencySet.of() .and(coreProject.toDependency())).__.__; final JkImlGenerator desktopGenerator = JkImlGenerator.of(desktopProject.getJavaIdeSupport()); final String result2 = desktopGenerator.generate(); System.out.println("\ndesktop .classpath"); System.out.println(result2); desktopProject.getPublication().getArtifactProducer().makeAllArtifacts(); JkPathTree.of(top).deleteContent(); }