protected TopologyArchive doAdvertise() { if (!as(ServiceActivatorArchive.class).containsServiceActivator(SERVICE_ACTIVATOR_CLASS_NAME)) { as(ServiceActivatorArchive.class).addServiceActivator(SERVICE_ACTIVATOR_CLASS_NAME); //as(JARArchive.class).addModule("org.wildfly.swarm.topology", "deployment"); } StringBuilder registrationConf = new StringBuilder(); List<String> names = getServiceNames(); for (String name : names) { Collection<String> tags = tagsByService.getOrDefault(name, Collections.emptyList()); registrationConf.append(name); if (!tags.isEmpty()) { registrationConf.append(" ") .append( tags.stream().collect(Collectors.joining(TAG_SEPARATOR)) ); } registrationConf.append("\n"); } as(JARArchive.class).add(new StringAsset(registrationConf.toString()), REGISTRATION_CONF); return this; }
if (node == null) { webXmlAsset = new WebXmlAsset(); archive.as(JARArchive.class).add(webXmlAsset); } else { Asset asset = node.getAsset(); if (!(asset instanceof WebXmlAsset)) { webXmlAsset = new WebXmlAsset(asset.openStream()); archive.as(JARArchive.class).add(webXmlAsset); } else { webXmlAsset = (WebXmlAsset) asset;
MatchResult result = matcher.toMatchResult(); String newPath = "/META-INF/resources/" + result.group(2); relocatedJar.add(asset, newPath);
MatchResult result = matcher.toMatchResult(); String newPath = "/META-INF/resources/" + result.group(2); relocatedJar.add(asset, newPath);
/** * Constructs a new instance using the underlying specified archive, which is required * * @param archive */ public SecuredImpl(ArchiveBase<?> archive) { super(archive); Node node = getArchive().as(JARArchive.class).get("WEB-INF/web.xml"); if (node == null) { this.asset = new WebXmlAsset(); getArchive().as(JARArchive.class).add(this.asset); } else { Asset asset = node.getAsset(); if (!(asset instanceof WebXmlAsset)) { this.asset = new WebXmlAsset(asset.openStream()); getArchive().as(JARArchive.class).add(this.asset); } else { this.asset = (WebXmlAsset) asset; } } // Setup web.xml this.asset.setContextParam("resteasy.scan", "true"); this.asset.setLoginConfig("KEYCLOAK", "ignored"); }
/** * Constructs a new instance using the underlying specified archive, which is required * * @param archive */ public SecuredImpl(ArchiveBase<?> archive) { super(archive); Node node = getArchive().as(JARArchive.class).get("WEB-INF/web.xml"); if (node == null) { this.asset = new WebXmlAsset(); getArchive().as(JARArchive.class).add(this.asset); } else { Asset asset = node.getAsset(); if (!(asset instanceof WebXmlAsset)) { this.asset = new WebXmlAsset(asset.openStream()); getArchive().as(JARArchive.class).add(this.asset); } else { this.asset = (WebXmlAsset) asset; } } // Setup web.xml this.asset.setContextParam("resteasy.scan", "true"); this.asset.setLoginConfig("KEYCLOAK", "ignored"); }