如何配置Wildfly-Maven插件的通道供应。

huangapple go评论99阅读模式
英文:

how to configure channel for wildfly-maven-plugin provision

问题

根据这里的文档 https://docs.wildfly.org/wildfly-maven-plugin/releases/4.2/provision-mojo.html 并与这里的 Galleon 博客 https://www.mastertheboss.com/howto/jboss-config/provisioning-wildfly-with-galleon/ 进行关联,我尝试使用 Wildfly-maven-plugin 为 Wildfly 提供特定版本,如下所示:

<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>

我在构建时遇到了错误:

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

文档没有提到如何使用 channels 属性的示例,也没有提到如何为特定版本进行提供的示例。在使用此插件时如何获取特定版本?

英文:

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?

答案1

得分: 2

我认为配置以提供特定版本的Wildfly应该是:

<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>
</plugin>

或者使用特性包Maven坐标:

<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>
</plugin>
英文:

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

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

</plugin>

Or using the feature pack Maven coordinates:

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

</plugin>

huangapple
  • 本文由 发表于 2023年7月24日 17:26:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76753079.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定