Search in sources :

Example 1 with ConfigurationValueAccessPreparer

use of org.wildfly.swarm.jolokia.access.ConfigurationValueAccessPreparer in project wildfly-swarm by wildfly-swarm.

the class JolokiaWarDeploymentProducer method jolokiaWar.

@Produces
public Archive jolokiaWar() throws Exception {
    if (this.context == null) {
        this.context = this.fraction.context();
    }
    Archive deployment = this.lookup.artifact(DEPLOYMENT_GAV, DEPLOYMENT_NAME);
    deployment.as(WARArchive.class).setContextRoot(this.context);
    Consumer<Archive> preparer = new ConfigurationValueAccessPreparer(this.jolokiaAccessXML);
    if (this.fraction.jolokiaWarPreparer() != null) {
        preparer = preparer.andThen(this.fraction.jolokiaWarPreparer());
    }
    preparer.accept(deployment);
    return deployment;
}
Also used : WARArchive(org.wildfly.swarm.undertow.WARArchive) Archive(org.jboss.shrinkwrap.api.Archive) ConfigurationValueAccessPreparer(org.wildfly.swarm.jolokia.access.ConfigurationValueAccessPreparer) WARArchive(org.wildfly.swarm.undertow.WARArchive) Produces(javax.enterprise.inject.Produces)

Aggregations

Produces (javax.enterprise.inject.Produces)1 Archive (org.jboss.shrinkwrap.api.Archive)1 ConfigurationValueAccessPreparer (org.wildfly.swarm.jolokia.access.ConfigurationValueAccessPreparer)1 WARArchive (org.wildfly.swarm.undertow.WARArchive)1