我有一个非常标准的 ear 项目试图从 Weblogic 迁移到 JBoss EAP 7。我有以下工件:
ear 文件 war 文件 ejb-jar 文件 ebj-client 文件(本地接口)
当我使用“mvn clean install”从命令行构建项目然后部署到eap时,它加载得很好。如果我打开同一个 maven 项目并导入 jboss 开发人员工作室,当我尝试从 IDE 在服务器上部署/运行时,我会收到一堆类未找到错误:
"WFLYCTL0080: Failed services" => {
"jboss.deployment.subunit.\"HansenIntegtationFramework.ear\".\"HansenIntegrationFramework-ejb-1.0.jar\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"HansenIntegtationFramework.ear\".\"HansenIntegrationFramework-ejb-1.0.jar\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of subdeployment \"HansenIntegrationFramework-ejb-1.0.jar\" of deployment \"HansenIntegtationFramework.ear\"
Caused by: java.lang.NoClassDefFoundError: Failed to link com/hsntech/hif/logging/HIFLogData (Module \"deployment.HansenIntegtationFramework.ear:main\" from Service Module Loader): org/apache/logging/log4j/message/MapMessage",
"jboss.deployment.subunit.\"HansenIntegtationFramework.ear\".\"HansenIntegrationFramework-web-1.0.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"HansenIntegtationFramework.ear\".\"HansenIntegrationFramework-web-1.0.war\".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of subdeployment \"HansenIntegrationFramework-web-1.0.war\" of deployment \"HansenIntegtationFramework.ear\"
Caused by: java.lang.NoClassDefFoundError: org/apache/logging/log4j/Logger
关于如何解决这个问题的任何建议?为什么 IDE 的行为不同?
更新:我发现了问题,但不知道如何解决。IDE 不会将依赖的 jar 文件复制到 jboss 部署的 lib 文件夹中。maven 命令行安装可以。有什么线索吗?