protected String determineName() { return DefaultDeploymentFactory.determineName(".jar"); }
public DefaultDeploymentCreator(Iterable<DefaultDeploymentFactory> factories) { for (DefaultDeploymentFactory factory : factories) { final DefaultDeploymentFactory current = this.factories.get(factory.getType()); if (current == null) { this.factories.put(factory.getType(), factory); } else { // if this one is high priority than the previously-seen factory, replace it. if (factory.getPriority() > current.getPriority()) { this.factories.put(factory.getType(), factory); } } } }
public boolean setup(Archive<?> archive) throws Exception { return setupUsingAppPath(archive) || setupUsingAppArtifact(archive) || setupUsingMaven(archive); }
final DefaultDeploymentFactory current = factories.get(factory.getType()); if (current == null) { factories.put(factory.getType(), factory); } else { if (factory.getPriority() > current.getPriority()) { factories.put(factory.getType(), factory); return factory != null ? factory.create() : ShrinkWrap.create(JARArchive.class); } catch (Exception e) { throw new RuntimeException(e);
public static RARArchive archiveFromCurrentApp() throws Exception { final RARArchive archive = ShrinkWrap.create(RARArchive.class, determineName()); final DefaultDeploymentFactory factory = new DefaultRarDeploymentFactory(); factory.setup(archive); return archive; }
/** @return {@code null} if there's no {@link DefaultDeploymentFactory} for given deployment {@code type} */ public Archive<?> createDefaultDeployment(String type) { DefaultDeploymentFactory factory = getFactory(type); if (factory == null) { return null; } try { return factory.create(); } catch (Exception e) { throw new RuntimeException(e); } }
@Override protected boolean setupUsingAppArtifact(Archive<?> archive) throws IOException { File exploded = ExplodedApplicationArtifactLocator.get(); if (exploded != null && exploded.canRead()) { // Use exploded deployment from tmp dir archive.as(ExplodedImporter.class).importDirectory(exploded); return true; } return super.setupUsingAppArtifact(archive); }
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { Path simple = path.relativize(file); archive.add(new FileAsset(file.toFile()), convertSeparators(simple)); return super.visitFile(file, attrs); } });
public static WARArchive archiveFromCurrentApp() throws Exception { final WARArchive archive = ShrinkWrap.create(WARArchive.class, determineName()); final DefaultDeploymentFactory factory = new DefaultWarDeploymentFactory(); factory.setup(archive); //archive.addModule("org.wildfly.swarm.undertow", "runtime"); archive.add(EmptyAsset.INSTANCE, MARKER_PATH); return archive; }
/** @return {@code null} if there's no {@link DefaultDeploymentFactory} for given deployment {@code type} */ public Archive<?> createDefaultDeployment(String type) { DefaultDeploymentFactory factory = getFactory(type); if (factory == null) { return null; } try { return factory.create(); } catch (Exception e) { throw new RuntimeException(e); } }
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { Path simple = path.relativize(file); archive.add(new FileAsset(file.toFile()), convertSeparators(simple)); return super.visitFile(file, attrs); } });
protected String determineName() { return DefaultDeploymentFactory.determineName(".jar"); }
public static WARArchive archiveFromCurrentApp() throws Exception { final WARArchive archive = ShrinkWrap.create(WARArchive.class, determineName()); final DefaultDeploymentFactory factory = new DefaultWarDeploymentFactory(); factory.setup(archive); archive.addModule("org.wildfly.swarm.undertow", "runtime"); return archive; }
public DefaultDeploymentCreator(Iterable<DefaultDeploymentFactory> factories) { for (DefaultDeploymentFactory factory : factories) { final DefaultDeploymentFactory current = this.factories.get(factory.getType()); if (current == null) { this.factories.put(factory.getType(), factory); } else { // if this one is high priority than the previously-seen factory, replace it. if (factory.getPriority() > current.getPriority()) { this.factories.put(factory.getType(), factory); } } } }
public boolean setup(Archive<?> archive) throws Exception { return setupUsingAppPath(archive) || setupUsingAppArtifact(archive) || setupUsingMaven(archive); }
/** @return {@code null} if there's no {@link DefaultDeploymentFactory} for given deployment {@code type} */ public Archive<?> createDefaultDeployment(String type) { DefaultDeploymentFactory factory = getFactory(type); if (factory == null) { return null; } try { return factory.create(); } catch (Exception e) { throw new RuntimeException(e); } }
protected static String determineName() { return DefaultDeploymentFactory.determineName(".vdb"); }
public static VDBArchive archiveFromCurrentApp() throws Exception { final VDBArchive archive = ShrinkWrap.create(VDBArchive.class, determineName()); final DefaultDeploymentFactory factory = new DefaultVDBDeploymentFactory(); factory.setup(archive); archive.addAllDependencies(); return archive; }
public DefaultDeploymentCreator(Iterable<DefaultDeploymentFactory> factories) { for (DefaultDeploymentFactory factory : factories) { final DefaultDeploymentFactory current = this.factories.get(factory.getType()); if (current == null) { this.factories.put(factory.getType(), factory); } else { // if this one is high priority than the previously-seen factory, replace it. if (factory.getPriority() > current.getPriority()) { this.factories.put(factory.getType(), factory); } } } }
protected static String determineName() { return DefaultDeploymentFactory.determineName(".war"); }