Anadi Misra
Anadi Misra

Reputation: 2103

how to configure channel for wildfly-maven-plugin provision

Going by the documentation here https://docs.wildfly.org/wildfly-maven-plugin/releases/4.2/provision-mojo.html and correlating it with Galleon blog over here https://www.mastertheboss.com/howto/jboss-config/provisioning-wildfly-with-galleon/ I was trying to provision a specific version for Wildfly using the Wildfly-maven-plugin like so

<plugin>
    <groupId>org.wildfly.plugins</groupId>
    <artifactId>wildfly-maven-plugin</artifactId>
    <version>4.2.0.Final</version>
    <executions>
        <execution>
            <id>provision</id>
            <goals>
                <goal>provision</goal>
            </goals>
            <configuration>
                <channels>
                    <channel>22.0/final</channel>
                </channels>
                <provisioningDir>${project.basedir}/local</provisioningDir>
            </configuration>
        </execution>
    </executions>
</plugin>

I get the error

Cannot find default setter in class org.wildfly.plugin.provision.ChannelConfiguration

when I run the build. The documentation doesn't mention examples of how to use channels attribute nor examples of provisioning a specific version. How to get a spefici version when using this plugin?

Upvotes: 0

Views: 266

Answers (1)

I believe the configuration to provision a specific version of Wildfly would be:

<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>4.2.0.Final</version>
<executions>
    <execution>
        <id>server-provisioning</id>
        <goals>
            <goal>provision</goal>
        </goals>
        <phase>compile</phase>
        <configuration>
            <provisioning-dir>${basedir}/target/wildfly</provisioning-dir>
            <feature-packs>
                <feature-pack>                        
                   <location>wildfly@maven(org.jboss.universe:community-universe):current/#27.0.0.Final</location>
                </feature-pack> 
            </feature-packs>
        </configuration>
    </execution>
</executions>

Or using the feature pack Maven coordinates:

<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>4.2.0.Final</version>
<executions>
    <execution>
        <id>server-provisioning</id>
        <goals>
            <goal>provision</goal>
        </goals>
        <phase>compile</phase>
        <configuration>
            <provisioning-dir>${basedir}/target/wildfly</provisioning-dir>
            <feature-packs>
                <feature-pack>
                    <groupId>org.wildfly</groupId>
                    <artifactId>wildfly-galleon-pack</artifactId>
                    <version>29.0.0.Final</version>
                </feature-pack>
            </feature-packs>
        </configuration>
    </execution>
</executions>

Upvotes: 3

Related Questions