英文:
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:
<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>
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>
</plugin>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论