gpt4 book ai didi

java - 如何在 Maven 中导入 Wildfly 依赖项

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:48:36 25 4
gpt4 key购买 nike

我正在尝试使用 Maven 编译一个项目 (webapp),该项目“使用”Wildfly 安装目录 (.../Wildfly.../modules/...) 中的 .jar。有没有一种简单的方法可以通过 POM 导入所有这些模块?我试过使用:

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-client-all</artifactId>
<version>10.1.0.Final</version>
</dependency>

但它没有用。之后我尝试使用:

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-ejb-client-bom</artifactId>
<version>10.1.0.Final</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-jms-client-bom</artifactId>
<version>10.1.0.Final</version>
<type>pom</type>
</dependency>

也没有效果,给我以下错误:

Could not resolve dependencies for project 
someproject:someproject:war:0.0.1-SNAPSHOT: The following artifacts
could not be resolved: org.apache.activemq:artemis-
commons:jar:1.1.0.wildfly-017, org.apache.activemq:artemis-core-
client:jar:1.1.0.wildfly-017, org.apache.activemq:artemis-hqclient-
protocol:jar:1.1.0.wildfly-017, org.apache.activemq:artemis-jms-
client:jar:1.1.0.wildfly-017, org.slf4j:jcl-over-slf4j:jar:1.7.7.jbossorg-1:
Could not find artifact org.apache.activemq:artemis-
commons:jar:1.1.0.wildfly-017 in central
(https://repo.maven.apache.org/maven2)

如有任何提示,我们将不胜感激。

最佳答案

wildlfy 功能包 [1][2] 几乎包含 Wildlfy 用于分发的所有内容。但是,在大多数情况下,这具有您实际需要的更多依赖项。所以,请注意它。

您还可以查看 Wildlfy BOMs [3][4],它也可能对您有用。

编码愉快!


[1] https://mvnrepository.com/artifact/org.wildfly/wildfly-feature-pack/11.0.0.Final

[2] https://github.com/wildfly/wildfly/tree/master/feature-pack/src/main/resources/modules/system/layers/base

[3] https://mvnrepository.com/artifact/org.wildfly.bom/wildfly-javaee7

[4] https://github.com/wildfly/boms

关于java - 如何在 Maven 中导入 Wildfly 依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47551986/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com