@Test void fatJar() throws IOException { final String junitMarker = Test.class.getName().replace('.', '/') + ".class"; final File junitApi = toFile(Thread.currentThread().getContextClassLoader().getResource(junitMarker)); final String osgiCoreMarker = Bundle.class.getName().replace('.', '/') + ".class"; final File osgiCore = toFile(Thread.currentThread().getContextClassLoader().getResource(osgiCoreMarker)); final File output = new File("target/farjartest/fatJar.jar"); if (output.exists()) { output.delete(); } new FatJar(new FatJar.Configuration( asList(junitApi, osgiCore), output, false, null )).run(); assertTrue(output.exists()); final List<String> entries; try (final JarFile files = new JarFile(output)) { entries = list(files.entries()).stream().map(JarEntry::getName).collect(toList()); } assertTrue(entries.size() > 450); assertTrue(entries.contains("org/junit/jupiter/api/AfterAll.class")); assertTrue(entries.contains("org/osgi/framework/FrameworkUtil.class")); assertTrue(entries.contains("WINEGROWER-INF/index.properties")); assertTrue(entries.contains("WINEGROWER-INF/manifests.properties")); }
public FatJar(final Configuration configuration) { this.configuration = configuration; }
FatJar implements Runnable { public FatJar(final Configuration configuration) { this.configuration = configuration; } }
FatJar implements Runnable { public FatJar(final Configuration configuration) { this.configuration = configuration; } FatJar(final Configuration configuration); }
FatJar implements Runnable { public FatJar(final Configuration configuration) { this.configuration = configuration; } FatJar(final Configuration configuration); @Override void run(); }
FatJar implements Runnable { public FatJar(final Configuration configuration) { this.configuration = configuration; } FatJar(final Configuration configuration); @Override void run();  }